slycknick
-
9/24/2009 8:34:32 AM
Product Filter
I've found a problem which I have finally traced down to the ProductFilter (\CMSModules\Ecommerce\Controls\Filters)
If you check the only show products in stock flag and apply the filter it correctly only shows products that are in stock. However if you select a product it adds the incorrect product to the cart. It adds the product that would have been in that position on the repeater if the checkbox had not been checked.
After much hunting (three days of my life I will not get back!) I found that it is due to some kind of postback happening and the checkbox value being lost. If you change the line in the markup
From
<asp:CheckBox ID="chkStock" runat="server" EnableViewState="false" />
To <cms:LocalizedCheckBox ID="chkStock" runat="server" />
All works fine as this control seems to preserve the value. I don't pretend to know why but I would love an explanation if anyone has one.
Nick
|