When logged out on my site, when the anonymous user clicks "add to cart" it takes them to the shopping cart but says, "There are no products in your shopping cart." Things are working fine for any logged in user.

I tried turning caching off, to no effect.

Please let me know if I can provide any code or settings.... If you even just have some theories of what I should try to fix this, please let me know -- it's driving me crazy!

Comments

littlealy’s picture

I feel it might be useful to mention that I peeked at the HTML of the form being generated for an anonymous user vs. a logged in user, and it was identical:

non functioning code when "Anonymous User":

<form id="uc-product-add-to-cart-form-330" method="post" accept-charset="UTF-8" action="(url was here)">
<div><div id="edit-qty-wrapper" class="form-item">
 <label for="edit-qty">Quantity: </label>
 <input type="text" class="form-text" value="1" size="5" id="edit-qty" name="qty" maxlength="6">
</div>
<input type="submit" class="form-submit node-add-to-cart" value="Add to cart" id="edit-submit-330" name="op">
<input type="hidden" value="form-4ddf611a339d084b8c91caec37772f86" id="form-4ddf611a339d084b8c91caec37772f86" name="form_build_id">
<input type="hidden" value="uc_product_add_to_cart_form_330" id="edit-uc-product-add-to-cart-form-330" name="form_id">

</div></form>

functioning code when logged in:

<form id="uc-product-add-to-cart-form-330" method="post" accept-charset="UTF-8" action="(url was here)">
<div><div id="edit-qty-wrapper" class="form-item">
 <label for="edit-qty">Quantity: </label>
 <input type="text" class="form-text" value="1" size="5" id="edit-qty" name="qty" maxlength="6">
</div>
<input type="submit" class="form-submit node-add-to-cart" value="Add to cart" id="edit-submit-330" name="op">
<input type="hidden" value="form-4ddf611a339d084b8c91caec37772f86" id="form-4ddf611a339d084b8c91caec37772f86" name="form_build_id">
<input type="hidden" value="uc_product_add_to_cart_form_330" id="edit-uc-product-add-to-cart-form-330" name="form_id">

</div></form>

Wahhh. =(

littlealy’s picture

Hi --

One of my web developer friends managed to spot the problem. Apparently, the DB was corrupted in such a way that anonymous users were no longer set to UID 0 -- probably happened when I moved from shared to private hosting recently.

syndicateStorm’s picture

Status: Active » Fixed

Glad to hear you were able to resolve this. Let me know if you have any other problems. Cheers!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.