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

Thread: AddtoCart not working for one site.

  1. #1
    Tom Cox is offline Senior Member
    Join Date
    Nov 2009
    Location
    Los Angeles, CA
    Posts
    104

    Default AddtoCart not working for one site.

    AddtoCart not working for one site.

    We have 15 copies of aspdnsf ML. Ten of our sites are live and working fine and we are launching the other five over the next couple of months. In trying to launch a site today we discovered that we can’t add anything to the shopping cart unless we are logged into the control panel at the same time. (In Firefox we can never add anything to the shopping cart.) After pressing the Add to Cart button you are placed in the Shopping Cart but it is empty. All 14 of the other sites are working fine.

    We have made a few changes to the source code and I checked the dates of all the modules and config files to make sure they are all identical. I double checked all the app.config settings and they are the same as our other sites.

    This behavior seems like it would be a setting somewhere but I can’t find it. Does anyone have any idea where I might look? You can see the behavior at www.vanities123.com.

    (We are on version 7.0.1 and yes we are planning to upgrade but that is going to be a big job and we need to get this site up asap.)

    Any help would be greatly appreciated. Thanks.

  2. #2
    cc9537 is offline Member
    Join Date
    May 2009
    Posts
    40

    Default Same problem

    I am on version 9.0.1.2 and seem to have discovered the same problem today, but it seems that it is only on the items I have added or updated through WSI/bulk upload.

    Anyone have any ideas?

    Please let me know if there is anything I can do for you.

    Always here to help,

    Clint.
    NationwideTool.com
    210 651 1551

  3. #3
    cc9537 is offline Member
    Join Date
    May 2009
    Posts
    40

    Default

    It took a lot of looking but in my database in the products table, there is a field called AvailableStopDate and that had a date for the products that did not work. I ran a sql querry to set that field to null for all product record and everything seems to work find now.

    Please let me know if there is anything I can do for you.

    Always here to help,

    Clint.
    NationwideTool.com
    210 651 1551

  4. #4
    cc9537 is offline Member
    Join Date
    May 2009
    Posts
    40

    Default

    If that does not work, there is an AvailableStartDate make sure it is in the past. Hope this works for you.

    Please let me know if there is anything I can do for you.

    Always here to help,

    Clint.
    NationwideTool.com
    210 651 1551

  5. #5
    Tom Cox is offline Senior Member
    Join Date
    Nov 2009
    Location
    Los Angeles, CA
    Posts
    104

    Default

    Thanks Clint, but our Stop Dates are all set to blank to never expire the products. Any other ideas?

    The fact that it works in IE when I'm logged into the control panel is interesting and probably a good hint if I just understood the process better.

    -Tom

  6. #6
    cc9537 is offline Member
    Join Date
    May 2009
    Posts
    40

    Default

    Check the shoppingcart table and see if new rows are being added when you click add to cart and are not logged into the control panel.

    If so,

    Do the same thing when you are logged in and it does work and see if you can find any differences in the rows. Ie, does the row when your logged in have an entry in the customerid field?

    Did your code changes change shopingcart.aspx.cs in any way? I wonder if the site is creating a customer id for visitors?

    Just some thoughts.

    Please let me know if there is anything I can do for you.

    Always here to help,

    Clint.
    NationwideTool.com
    210 651 1551

  7. #7
    Tom Cox is offline Senior Member
    Join Date
    Nov 2009
    Location
    Los Angeles, CA
    Posts
    104

    Default

    I see now that no CustomerID is being generated. That would explain why it works when I'm logged into the control panel.

    Anyone have any idea why the CustomerID is not being generated?

    Thanks,
    Tom

  8. #8
    cc9537 is offline Member
    Join Date
    May 2009
    Posts
    40

    Default

    I don't know of an app config that would turn this functionality off. It would be helpful to know where you made code changes?

  9. #9
    cc9537 is offline Member
    Join Date
    May 2009
    Posts
    40

    Default

    I don't know for sure if what I am about to say is correct, but I think it may be.

    When I go to your store and right click and view page source I see these comments.

    Code:
     <!-- PAGE INVOCATION: '/Default.aspx' -->
        <!-- PAGE REFERRER: 'http://forums.aspdotnetstorefront.com/showthread.php?p=89117&amp;posted=1' -->
        <!-- STORE LOCALE: 'en-US' -->
        <!-- CUSTOMER LOCALE: 'en-US' -->
        <!-- STORE VERSION: 'AspDotNetStorefront ML 7.0.1.3/7.0.2.1' -->
        <!-- CACHE MENUS: 'false' -->
        <!-- to center your pages, set text-align: center -->
    
        <!-- to left justify your pages, set text-align: center -->
        <!-- if using dynamic full width page sizes, the left-right align has no effect (obviously) -->
    I think this store version means you have your database a version newer than you have your source?

    I checked some of your other sites http://www.jewelryboxes123.com/ and http://www.entertainmentcenters123.com/ and the appear to be closer in versions.

    Like I said I am not positive I am right, but I believe this is source/database version. If something changed in the table structure for customer it will fail in creating a customer record and hence no customerid.... You would think you would get a big nasty error, but maybe not?

    Now, why would someone with 15 stores not have a support contract? J/K


    Clint.

  10. #10
    Tom Cox is offline Senior Member
    Join Date
    Nov 2009
    Location
    Los Angeles, CA
    Posts
    104

    Default

    Clint,

    I did as you suggested and the cart record is being created but the CustomerID is 0. That's why it's displaying "cart is empty."

    Normally, when an item is added to the cart, a customer record is created.

    -Tom

  11. #11
    Tom Cox is offline Senior Member
    Join Date
    Nov 2009
    Location
    Los Angeles, CA
    Posts
    104

    Default

    In case anyone is interested, I finally figured this out by monitoring the database and tracing the code. We have 15 copies. The first was configured and then the next 14 sites where cloned (long before my time here). Apparently some changes were made after the cloning and had to be made manually to all the sites.

    This problem turned out to be in a DB stored procedure named _insCustomer. It was expecting a CustomerLevelID parameter that was not being passed by the source code. I made the mod to our test system and it works. Now I just need to fix the production system and this will be good.

    Thanks to those who offered suggestions.

    -Tom

  12. #12
    cc9537 is offline Member
    Join Date
    May 2009
    Posts
    40

    Default

    Can you give me a rough rundown of the mod you made? I seem to be having the same problem all the sudden on a test site I am about to turn live.

    Please let me know if there is anything I can do for you.

    Always here to help,

    Clint.
    NationwideTool.com
    210 651 1551