Adding an item from the More Items In Category control bugs the product page's main add-to-cart button when the browser back button is used to return to the product page.
Steps To Reproduce
From the shopper side...
Clear your basket
Find a product that doesn't have variants or choices.
Scroll down and find a product in the 'More Products In Category...' control. This product should have "Add To Cart" button text, not "More Details".
Click the Add-to-Cart button for the product in the More Products In Category... control.
You should now be on the basket page and see the more-products-in-category product you clicked.
Now click the browser back button. You should now be on the product page you were on before.
Click the product page Add-to-Cart button.
You should now be on the basket page again.
But instead of two different products in the basket, you now have a quantity 2 of the more-products-in-category product you added first.
Is there a quick fix to this? I've got a client rather concerned about it as they do a lot of related-product business.
R10 issue with adding to cart after adding from More Items
R10 issue with adding to cart after adding from More Items
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
Re: R10 issue with adding to cart after adding from More Items
I can reproduce it in Gold R11 as well. It works if I add the main product first. The problem only happens if you add the item from the "Also in..." section, then back to the product itself.
It can be reproduced by using either the "Product Display in Rows" or "Basic Product" display template. You have to make sure the mini-basket is disabled.
I'll report the issue. AC8-3047
It can be reproduced by using either the "Product Display in Rows" or "Basic Product" display template. You have to make sure the mini-basket is disabled.
I'll report the issue. AC8-3047
Thank you for choosing AbleCommerce!
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
Re: R10 issue with adding to cart after adding from More Items
Awesome thanks for the quick review Katie!
I don't know about you at 6:06 am, but I sure wasn't awake at 5:21 am
I don't know about you at 6:06 am, but I sure wasn't awake at 5:21 am
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
Re: R10 issue with adding to cart after adding from More Items
This seems to be happening due back button, browser cache and how ASP.NET handles post backs in javascript. It seems like it happened to other people too as being discussed here
http://weblog.west-wind.com/posts/2007/ ... ack-Button
The simplest fix in our case should be to clear the special ASP.NET fields called __EVENTTARGET and __EVENTARGUMENT upon JQUERY ready event. Edit Website/ConLib/BuyProductDialog.ascx file and following javascript to it. I used regular expression to narrow the scope of this change to use of Add To Cart Link.
http://weblog.west-wind.com/posts/2007/ ... ack-Button
The simplest fix in our case should be to clear the special ASP.NET fields called __EVENTTARGET and __EVENTARGUMENT upon JQUERY ready event. Edit Website/ConLib/BuyProductDialog.ascx file and following javascript to it. I used regular expression to narrow the scope of this change to use of Add To Cart Link.
Code: Select all
<script type="text/javascript">
// CLEAR CACHED __EVENTTARGET AND __EVENTARGUMENT VALUES UPON DOM READY
$(function () {
var addToCartExp = new RegExp('\\$AddToCart_([0-9]+)$');
var eventtarget = $('#__EVENTTARGET').val();
if (addToCartExp.test(eventtarget)) {
$('#__EVENTTARGET').val('');
$('#__EVENTARGUMENT').val('');
}
});
</script>
Re: R10 issue with adding to cart after adding from More Items
Wow, what an unusual set of circumstances. Leave it to me to find the really good stuff eh?
I'll give your script a try and let you know the results.
I'll give your script a try and let you know the results.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com