close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Changing the discount description.

Thread began 5/30/2011 4:05 am by CraigR | Last modified 5/31/2011 1:25 pm by CraigR | 829 views | 5 replies

CraigRBeta Tester

Changing the discount description.

In my store, discounts vary depending on the customer logged in

I have a number of discount rules, which use session values, allocated from a recordset, filtered by the current customer
This all seems to work pretty well, but I would like to alter the description of the discount rule, as it appears in the cart.
(I realise I will need to hand code this on the cart_PHP.php page and not be able to re-enter the ecart object interface)

As an example, I have a discounts rule which appears as


$this->Discounts[] = new WA_eCart_Rule(urldecode("10%25%20Summer%20Special"), true, "WAEC_cscart_10SummerSpecial");

If I replace the string 10%25%20Summer%20Special with a different string, the function WAEC_cscart_10SummerSpecial is still called, so that’s great.


So

$this->Discounts[] = new WA_eCart_Rule(urldecode("15%25%20Winter%20Special "), true, "WAEC_cscart_10SummerSpecial");

Gives me a different description


However if I try to replace the string or part of the string with say, a session value, nothing appears for the session value, which I know is set.
I have tried the following, and neither work for me


$this->Discounts[] = new WA_eCart_Rule(urldecode($_SESSION[‘'VoucherCode']."%25%20Winter%20Special "), true, "WAEC_cscart_10SummerSpecial");


$this->Discounts[] = new WA_eCart_Rule($_SESSION['VoucherCode'].urldecode("10%25%20Summer%20Special"), true, "WAEC_cscart_10SummerSpecial");



I assume I'm missing something

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...