Minibasket on Category.aspx Page?

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
zzaacchh
Ensign (ENS)
Ensign (ENS)
Posts: 2
Joined: Sun Jan 20, 2008 7:25 pm

Minibasket on Category.aspx Page?

Post by zzaacchh » Thu Aug 21, 2008 12:00 am

I have successfully added the minibasket control to the bottom of the Standard Sidebar 1 scriptlet, and changed Standard Sizebar 1 to appear on the left side of Category.aspx.

Everything is fine, except that when a user selects an "add to cart" link from CategoryGridPage.ascx, the mini-basket isn't updated. If I continue to select additional items ("add to cart" again), the basket will begin to update, but it's always behind by one product. In other words, the most recently added item is never shown in the basket.

I've traced this a bit, and seen that the problem is due to the fact that the minibasket's important event (MiniBasket.aspx.cs's Page_PreRender event) happens *before* the AddToCart() event actually occurs. I'm not enough of an ASP.NET expert yet to figure out why these event are occurring in the wrong order. I'm guessing, though, that it has to do with the AJAXy nature of the Category.aspx page.

Any help would be greatly appreciated,
Zach

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Minibasket on Category.aspx Page?

Post by Katie » Fri Aug 22, 2008 9:04 am

Hi there,

Yes, we are aware of this issue. We have a partial fix in the recently released SR1 update. You can download the patch here -

http://help.ablecommerce.com/upgrades/a ... _final.htm

However, I would like to point out that this issue could not be fixed for the "Category Grid" content scriptlet. You can view the details for bug ID 6842. It was a case where fixing one bug (7006) broke the mini-basket in certain cases. The easy solution is to put the mini basket in the right column.

We will have to do quite a bit of redesign work to fix both issues so a decision was made to hold off until a future release.

Thanks,
Katie
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Minibasket on Category.aspx Page?

Post by AbleMods » Sun Aug 24, 2008 11:33 pm

zzaacchh wrote:I've traced this a bit, and seen that the problem is due to the fact that the minibasket's important event (MiniBasket.aspx.cs's Page_PreRender event) happens *before* the AddToCart() event actually occurs.
Very good deduction. The reason is all .Net web pages are constructed in a very specific order. Depending on how the user controls are designed greatly determines the outcome of the page. Certain user controls are designed to manipulate their output on Page_PreRender, while others do "the important event" during Page_Init. An AJAX implementation further complicates things by creating additional (and possibly unforeseen) callbacks to the server-side code.

Depending on where on the page you put an object, you alter the sequence in which objects are constructed for that page and thus the controls must be designed a very specific way to allow for use in multiple locations.

In other words, not all user controls are universal in where they can be located on any given page. It takes a remarkably complex amount of design effort to make a system where every control is usable in any location on any page. So designers subsequently write code with a certain "mindset" when the user control interacts with other user controls. This keeps both their sanity and their code complexity to a manageable level. Or at least the code complexity :wink:
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

Post Reply