Felo72
August 21, 2022, 3:09pm
1
Hi all,
Working on a website where I can not get the price or shopping cart to show up. Theme is Impulse V2.5.0 and website is www.unisteer.com . I have an older version of Impulse V1.0.5 in the library where the price and shopping cart are present if I click on the customize button to see it. The company turned off pricing and the cart years ago, and now we’re working to turn it back on. Any ideas on where to look to accomplish this?
Thanks in advance!
Chris
I know this is an old question, but I hope this solution can help feature searches:
Create snippet snippets/cart-savings.liquid
{%- assign baseline_total = 0 -%}
{%- for item in cart.items -%}
{%- assign compare = item.variant.compare_at_price -%}
{%- if compare == blank or compare <= item.original_price -%}{% assign compare = item.original_price %}{%- endif -%}
{%- assign line = compare | times: item.quantity -%}
{%- assign baseline_total = baseline_total | plus: line -%}
{%- endfor -%}
{%- assign total_savings = baseline_total | minus: cart.total_price -%}
{%- if total_savings > 0 -%}
<div class="cart-savings">
<div class="cart-savings__row"><span class="cart-savings__label">Regular price</span>
<span class="cart-savings__value"><s>{{ baseline_total | money }}</s></span></div>
<div class="cart-savings__row cart-savings__row--accent"><span class="cart-savings__label">You save</span>
<span class="cart-savings__value">{{ total_savings | money }}{% if baseline_total > 0 %}<span class="cart-savings__pct"> ({{ total_savings | times: 100 | divided_by: baseline_total | round: 0 }}%)</span>{% endif %}</span></div>
</div>
{%- endif -%}
2) Insert the snippet below Subtotal
Cart drawer: sections/cart-drawer.liquid
<div class="cart__item-sub cart__item-row">
<div>{{ 'cart.general.subtotal' | t }}</div>
<div data-subtotal>{{ cart.total_price | money }}</div>
</div>
{% render 'cart-savings' %}
Cart page: sections/main-cart.liquid in the totals area (also below Subtotal).
3) Minimal CSS (e.g., end of assets/theme.css)
.cart-savings{margin:12px 0;border-top:1px solid var(--color-border);padding-top:10px}
.cart-savings__row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:baseline}
.cart-savings__label,.cart-savings__value{font-size:14px;line-height:1.25;white-space:nowrap;text-transform:none;letter-spacing:normal}
.cart-savings__row--accent .cart-savings__value{font-weight:600}
Hey @Felo72
Thanks for posting this to the Shopify Community.
It seems the issue is with theme settings and custom code in Impulse V2.5.0 , since older versions still show prices and cart .
Steps to fix:
Theme Settings: Go to Online Store → Themes → Customize → Product pages and ensure “Show prices” and “Enable cart” are turned on .
Compare with Old Theme: Check Impulse V1.0.5 settings for price/cart display and replicate them.
Product Availability: Make sure products are available on Online Store .
Custom Code: Check product-template.liquid or product-form.liquid for code hiding prices/cart and remove it.
Quick Code Example:
{% if product.available %}
<span class="product-price">{{ product.price | money }}</span>
<form action="/cart/add" method="post">
<input type="hidden" name="id" value="{{ product.selected_or_first_available_variant.id }}">
<button type="submit">Add to Cart</button>
</form>
{% endif %}
Waiting to hear back from you.
If this was helpful, don’t forget to like it and mark it as a solution.
Thanks