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 3 of 3

Thread: Kit Product / Add to Cart Issue

  1. #1
    Sequencing is offline Junior Member
    Join Date
    Apr 2009
    Posts
    21

    Exclamation Kit Product / Add to Cart Issue

    Hello,

    This issue has been causing us problems for almost a year and I was finally able to figure out what happened. So, I thought I'd post here to help others that may encounter this. In this instance, we are running v 8.0.1.2; version 9 handles kit products differently with auto updating prices as opposed to clicking the Update Price button so I'm not sure if this still occurs - haven't tested on v9.

    Basically, we were seeing kit products on customer receipts but the kit items were not listed. The final price was correct but we had no way of knowing their configuration. The problem occurs when someone is configuring a kit product and clicks the button to update their price. At that point, the selections are inserted into the KitCart table with a CreatedOn date. The next logical step is to add the product to the cart. However, say they leave without adding to the cart but come back in a couple weeks. When they come back, their kit product selections will pre-populate based on the entries still in the KitCart table. Next, they click Add to Cart and are transfered to the shopping cart page.

    During Page_Load of shoppingcart.aspx, ShoppingCart.Age() is called to clean out old products from the cart as well as KitCart. So, here is the problem... KitCart is cleaned out because the products were entered more than AgeCartDays (7 by default) ago. However, the entry in ShoppingCart remains because that was just added and has a date within 7 days.

    So, we have an item in the cart but no corresponding kit items. The customer likely won't notice the problem because they'll see the product and the price will still be correct.

    I believe the easiest solution is to age the cart on the kit product page when the items are being built. This isn't ideal as the method will be called some times when it's not really needed but seems like the best approach. So, just add the call to ShoppingCart.Age() in the XSLTExtensionBase.GetKitItemOptions() method. However, you'll need the source for that. So, another approach (and possible better if you have enough SQL access) would be to setup a daily SQL job to age carts that are older than the AgeCartDays AppConfig value.

    This was driving me crazy for so long that I would be glad to help anyone having a similar issue who has some questions.

    Thanks,
    Ryan

  2. #2
    UNLGroup is offline Senior Member
    Join Date
    Dec 2007
    Posts
    144

    Default

    Thank you for posting this. Not sure if this is what we are seeing (running ver 7.x), but it sounds just like it. I'll try your solution and track the issue. Hopefully your fix will solve this issue for us.
    Thank you.

  3. #3
    Sequencing is offline Junior Member
    Join Date
    Apr 2009
    Posts
    21

    Default

    You're very welcome - hope it works!

    Many people learn by browsing forums and reading about other's issues and I hate it when you find a thread talking about the same issue you're having but no one posts a final solution to the issue! So, I felt an obligation to other developers to make this post and hopefully help out some others - especially because this was driving me crazy for a long time.

    Ryan