7.0.3 BuyProductDialog Variant Price Update Issue
Posted: Mon Aug 03, 2009 9:34 am
We have created a new AbleCommerce store for a client using the new 7.0.3 build. Most of the items int he store have variants/options.
In previous AbleCommerce versions the "ProductPrice" control inside the "BuyProductDialog" control would update on postback. For some reason this is not working for us in 7.0.3.
To track down the source of the issue, we renamed files and dropped the older 7.0.2 version into the site. After trying the BuyProductDialog control and the ProductPrice control, we found that it wasn't either of them. It was actually tracked down to the ProductHelper.cs file in the App_Code folder.
Replacing the 7.0.3 version with the 7.0.2 version actually fixed the variant price issue, it would update as it had in previous versions of the store. However, as you might expect, this caused other issues on the site. Namely, the basket page no longer loads, due to the changes made to the GetAssets function in the ProductHelper class. The new version expects 5 arguments, while the old one only expected 4.
Our first thought was to copy the new method into the old class. This did fix the basket page, but it stopped the price from updating on postback when selecting a variant/option.
So from here we've gone back to the 7.0.3 version of the ProductHelper since the basket working is more important than the price showing accurately when selecting an option. We couldn't really even figure out what the GetAssets function has to do with displaying the price on the product page anyway. When we comment the function out the price updates. If anyone can help with this it would be very much appreciated.
In previous AbleCommerce versions the "ProductPrice" control inside the "BuyProductDialog" control would update on postback. For some reason this is not working for us in 7.0.3.
To track down the source of the issue, we renamed files and dropped the older 7.0.2 version into the site. After trying the BuyProductDialog control and the ProductPrice control, we found that it wasn't either of them. It was actually tracked down to the ProductHelper.cs file in the App_Code folder.
Replacing the 7.0.3 version with the 7.0.2 version actually fixed the variant price issue, it would update as it had in previous versions of the store. However, as you might expect, this caused other issues on the site. Namely, the basket page no longer loads, due to the changes made to the GetAssets function in the ProductHelper class. The new version expects 5 arguments, while the old one only expected 4.
Our first thought was to copy the new method into the old class. This did fix the basket page, but it stopped the price from updating on postback when selecting a variant/option.
So from here we've gone back to the 7.0.3 version of the ProductHelper since the basket working is more important than the price showing accurately when selecting an option. We couldn't really even figure out what the GetAssets function has to do with displaying the price on the product page anyway. When we comment the function out the price updates. If anyone can help with this it would be very much appreciated.