I wish to disable a buy button when an item is added to the cart and re-enable the button if the item is removed from the cart. How can I interogate the carts contents to do this?
created
Sep '09last reply
Sep '09- 4
replies
- 846
views
- 3
users
I wish to disable a buy button when an item is added to the cart and re-enable the button if the item is removed from the cart. How can I interogate the carts contents to do this?
thanks for the reply, however thats not quite what I asked. My site is developed in ASP and all of the buttons are generated and controlled programatically. I can disable and reenable the buttons myself.
I'm trying to determine if I can read the contents of the Cart after its been closed down so that I can decided, or not, to change the state of my buttons.
Do you store the carts contents in cookie (or in some similar state file) on the users PC?
frouboyI wish to disable a buy button when an item is added to the cart and re-enable the button if the item is removed from the cart. How can I interogate the carts contents to do this?
In your view cart button code, please add this -
function EJEJC_config() { EJEJC_POSTCALL=true; }
function EJEJC_shown() {
if (EJEJC_added('YOUR_ITEM_NUMBER')===true){
// write JS code to disable your button
}
}
Topic | Category | Replies | Views | Activity |
---|---|---|---|---|
E-junkie Webhook Integration vs Cloudflare's Super Bot Mode | E-junkie Discussions | 1 | 359 | Jan '24 |
Google Wallet SetUp | E-junkie Discussions | 1 | 340 | Feb '24 |
Ebay delivery | E-junkie Discussions | 2 | 277 | Dec '24 |
Alt Texts in Buttons? | E-junkie Discussions | 2 | 210 | Jul '24 |
Loved the product! | E-junkie Discussions | 0 | 168 | Jul '24 |