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

rating

Add discount; but also remove discount when clear cart button pressed

Thread began 7/20/2022 2:51 pm by yogastudents362523 | Last modified 7/21/2022 2:17 pm by yogastudents362523 | 63 views | 6 replies |

yogastudents362523

Add discount; but also remove discount when clear cart button pressed

Hello,

(1) I followed your tutorial and added a discount field that would add a 10% discount when appropriate text entered and button pressed.
But also:
(2) would like the discount to be cleared if the user presses the "Clear Cart" button.

I have a session variable in place for the former, and have used the webAssist "Clear Session Values" option under the "Cookies" menu, which I thought would be appropriate.

But unfortunately, eCart does not seem to want to apply the discount at all, with the Clear Session Values in place.

I am not certain what I am doing wrong.

Relevant URL's in upcoming reply.

Thank you..

Sign in to reply to this post

yogastudents362523

Hello,

URL and data underneath

Sign in to reply to this post

Ray BorduinWebAssist

The clear session variable code was below the redirect so it never ran. I moved it up on the page and that should fix your problem.

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

yogastudents362523

Hello,

I tested it***, but there are unfortunately still issues.

On the very first time I ran it, I got a discount code to appear.
I then hit the clear cart button. The discount code disappeared.
BUT ... ...
when I keep trying on second, third, and n occasions to try again and enter the relevant discount code (it is "SEED"), nothing is now working.
No discount is applied.

Thank you.

Sign in to reply to this post

Ray BorduinWebAssist

I see now... you have your trigger for setting the PromoCode set to only trigger when the session variable is not set. This happens when the page first opens and then it can't be reset. Instead the trigger should be based on the submission of the promocode like I have it now.

It seems to be working as you want it to now.

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

yogastudents362523

Thank you,
I am grateful

Sign in to reply to this post

yogastudents362523

This post has been deleted.

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