How to add email address and phone number to Shopp receipt

To add the customer’s email address, or phone number to the receipt, all you have to do is edit the receipt.php file.

If you haven’t setup Shopp template files, this is the moment to do so.

Once set up, you can access the Shopp template files through the WordPress editor.
In your WordPress admin go to Appearance -> Editor and click the receipt.php file in the list on the right.

NOTE: this file needs to be writable, if not, a warning will appear below the text.

In the file you will find code that displays name, address and so on. All information is retrieved using the Shopp-tag:

shopp('purchase', 'some_detail');

The tags for email address and phone number are:

shopp('purchase', 'email');
shopp('purchase', 'phone');

A good spot to put these tags would be right below the address fields.

In the receipt.php file find

Shipping: <?php shopp('purchase', 'shipmethod'); ?>

Change this to:

Shipping: <?php shopp('purchase', 'shipmethod'); ?>
    Email - <?php shopp('purchase', 'email'); ?>
    Phone - <?php shopp('purchase', 'phone'); ?>

That’s it!

How to add your own Shopp tag shopp-logo
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *