| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Add 2 Cart Product Variants Error | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Add 2 Cart Product Variants Error
Hello everyone,
Working with x-cart 4.7.7. I've been having trouble implementing a solution that allows the customer to add product variants to their cart from the product list page without the page reloading. I've enabled the Buy Now buttons in the admin. The problem I'm running into is that I've placed the {include_cache file="customer/main/buy_now.tpl" in a smarty foreach loop so that a button gets created for each variant there is. And it works, but only on the first variant you add to the cart, after that the variables from the foreach loop like the classid and the optionid disappear so when you attempt to add more variants to the cart it causes an error and it redirects you to the product page. The $products variable is still available though, and when I reload the page the foreach loop variables come back. Can anyone tell me what is happening and how I can fix it? Thanks.
__________________
Orlando Grimany Web Developer ogrimany@gmail.com |
|||||||
#2
|
|||||||
|
|||||||
Add 2 Cart Product Variants Error
Hello everyone,
Working with X-Cart 4.7.7. I'm trying to implement a solution that allows customers to add product variants directly from the product list page. I've enabled Buy Now in the product list page and I put the {include_cache file="customer/main/buy_now.tpl" line in a smarty foreach loop so that it creates a buy now button for each product variant. When ajax finishes it's like the variables in the foreach loop disappear and I get an error when I try to add more of that variant to the cart. Can anyone tell me what's happening and what I can do to fix it? Thanks.
__________________
Orlando Grimany Web Developer ogrimany@gmail.com |
|||||||
#3
|
|||||||||
|
|||||||||
Re: Add 2 Cart Product Variants Error
It's hard to guess without more details. From what you describe it sounds as X-Cart loads a different template file when doing the ajax request, that's why your custom code is replaced with something else.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|