Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 2 of 2

Thread: Add To Cart Version 9 Question

  1. #1
    akeller is offline Member
    Join Date
    Dec 2008
    Posts
    78

    Default Add To Cart Version 9 Question

    We have some logic setup on our current version 8 live storefront that I am trying to implement on version 9.0.1.3 and I can't seem to figure it out. I know its probably due to the ajax shopping cart but any ideas on where to start would be great!

    When a customer clicks the add to cart button where is the execution process going to? It used to go to the addtocart.aspx page where we could check to see if we had that item in stock, if not allow them to sign up for a notification when the item was back in stock.

    I have VB source and looked in the shoppingcart.vb class and set a breakpoint on the AddToCart() function but it never hits the breakpoint.

    Thanks in advance.

  2. #2
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    [Edited - I noticed you've got VB, the filename extension will of course be different to below]
    Hi

    In v9, the AddToCart functionality starts in product.js at about line 150 (onButtonClick).

    This calls a WebService that actually does the 'Add To Cart' - you can find this code in App_Code/ActionService.cs

    If you want to use the existing AddToCart code, it's actually pretty easy to write your own minicart dropdown using CSS and Ajax calls to the AddToCart.aspx routine.