0

I wish to display at random one of several different lines of text on my website's "order processing" screen (presented before the user is taken to PayPal).

I'm not at all technical, but the relevant (I think) part of the php file (which in the address bar is https://www.mywebsite.com/?eStore_checkout=process&eStore_gateway=paypal) is ...

    function eStore_redirector_body() {
    echo '<div class="content"><p>';
    if ( !isset( $_SESSION['eStore_cart'] ) || empty( $_SESSION['eStore_cart'] ) ) {
    echo 'Many thanks for your order';
    echo '</p>
    </div>
  

What I'd like is to break the monotony and for customers instead to see e.g. "Many thanks for your order" or "Thanks a million for your order" or any number of other lines of text that I can come up with.

Any pointers in the right direction would be much appreciated.

Paul Vincent
  • 43
  • 1
  • 9
  • 4
    Does this answer your question? [Get random phrases from an array in PHP?](https://stackoverflow.com/questions/14116035/get-random-phrases-from-an-array-in-php) – El_Vanja Apr 09 '21 at 10:34
  • Thanks. It probably does! Problem is, I don't know how to implement the solution(s) in the context of the existing code. Time for some self-education perhaps! – Paul Vincent Apr 09 '21 at 10:46
  • 1
    All you need to do is `echo` the result of the function from the answer in place of your `echo 'Many thanks for your order';`. – El_Vanja Apr 09 '21 at 10:49

0 Answers0