Shopify themes, liquid, logos, and UX
Hello,
I'm working on Shopify theme development step by step. When I build out my cart page and add items to it, it redirects my theme to a /cart/add url path, instead of the /cart path and I have to manually remove the /add part. Additionally, I can't see any items I add to the cart, but I can see any other liquid elements I add to my cart.liquid page. Any help or suggestions? Code below from my cart.liquid page:
{% form 'cart', cart %}
<h1> Cart </h1>
{% if cart.empty? %}
<p>Cart is empty</p>
{% else %}
{% for item in cart.items %}
<div>
<img src="{{ item.image | image_url }}" width="200" height="200" loading="lazy" />
<h2>{{ item.title }}</h2>
<p> {{ item.final_line_price | money }}</p>
<input name="updates[]" value="{{ item.quantity }}">
<a href="{{ item.url_to_remove }}">Remove</a>
</div>
{% endfor %}
<hr/>
{% endif %}
<p> Total: {{ cart.total_price | money }}</p>
<button type="submit" name="update"> Update</button>
<button type="submit" name="checkout"> Checkout</button>
{% endform %}
Code from my theme.liquid:
{% comment %} main connecting point for pages {% endcomment %} <html> <head> {% comment %} required {% endcomment %} {{ content_for_header }} </head> <body> {% comment %} Renders your sections or snippets. this renders your header snippet {% endcomment %} {% render 'header' %} {{ content_for_layout }} </body> <footer> {% render 'footer' %} </footer> </html>
Thank you for any help
User | RANK |
---|---|
154 | |
139 | |
79 | |
71 | |
62 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023