close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Show discount code used in confirmation email

Thread began 4/16/2018 3:44 am by Mags | Last modified 4/18/2018 2:28 pm by Ray Borduin | 1347 views | 6 replies |

Mags

Show discount code used in confirmation email

It's a while since I set up eCart but my client would like to be able to see which discount code was used within the confirmation email they receive - it currently shows the amount but not the code itself. Could you advise?

Sign in to reply to this post

Ray BorduinWebAssist

The discount code is usually saved in the session. You should be able to easily display the value from that session variable in the email receipt. Just update the email body file and add the value.

Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

That's what I would have thought, however there isn't a session value showing in the confirmation email. If I open the cart page I can see the cart session values and there's one called [Present Discount Title], however if I echo that on the email page it just gives me the first of the discount codes set up, not the one that's been used:

<?php echo $VetProCart->RuleLooperName("Discounts"); ?>

There are also cart session values for each individual discount code I have set up, for example:

<?php echo $VetProCart->GetRuleValueByName("Discounts", urldecode("discountcodename")); ?>

but I'm not sure how I would use these to only display the one that's been used?

Sign in to reply to this post

Ray BorduinWebAssist

Can I see the cart page where the user enters the discount code? That might help me identify which session variable you can use.

Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

Cart page attached.

Sign in to reply to this post

Ray BorduinWebAssist

You should be able to use:

php:
<?php

if (isset($_SESSION["PromoCode"])) {
?>
Used promo code: <?php echo($_SESSION["PromoCode"]); ?>
<?php
}
?>
Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

That works, many thanks!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...