Good Evening,
I am sorry (Drew) for all the forum posts, I believe this is my last issue now.
So on my product page, I have a product with a few different variants, and an add to cart button. I think it is pretty much the out of the box template, although i changed the url from '/shop/cart' to just '/cart':
- <div class="product-block product-block__shop">
- <perch:if id="catalog_only" value="0">
- <perch:form id="add_to_cart" app="perch_shop" action="/cart">
- <perch:if exists="has_variants">
- <perch:productopts>
- <div class="choose-option">Choose Your <perch:productopt id="title"></div>
- <perch:productvalues>
- <perch:before><ul></perch:before>
- <li>
- <label>
- <perch:input id="options" name="opt-<perch:productvalue id="optionID">[]" value="<perch:productvalue id="valueID">" type="radio" required="required">
- <perch:productvalue id="valueTitle">
- </label>
- </li>
- <perch:after></ul></perch:after>
- </perch:productvalues>
- </perch:productopts>
- </perch:if>
- <perch:input id="product" type="hidden" value="<perch:shop id="productID" type="hidden" env-autofill="false">">
- <perch:input type="submit" value="Add to cart">
- </perch:form>
- <perch:else>
- <p>This item is available in-store only.</p>
- </perch:if>
- </div>
When i make my selection, and click add to cart, i am taken to the cart page (/cart), and the item is displayed. However, the basket link in my header still shows 0 items, using this code:
But the biggest issue is that if I refresh the page, the item will stay there, but if I leave and come back, or click the basket link in my header:
The page loads with a 'basket empty' message.
I haven't strayed too far from the docs, so not sure what I could have implemented incorrectly?
Thank you in advance,
Sam