Add text next to the price for certain SKUs on product pages

Solved
Highlighted
Excursionist
22 2 2

I would like to add the text "/ set" next to the price on our product pages for certain SKUs. I've found similar posts for this, but we are on the Palo Alto theme and don't have a product-price snippet and we don't want to add this text for every sku. Can someone help me please? 

0 Likes
Highlighted
Excursionist
22 2 2

This is an accepted solution.

Ok I figured this out and wanted to post how in case anyone else wants to add text next to the price for some skus in Palo Alto - 

 

In product-form.liquid, Line 51: <span> / Set</span>  below the ProductPrice

<h2 class="product-price" itemprop="price">
<span id="ProductPrice">{{ current_variant.price | money }}</span>
<span> / Set</span>
<span id="ComparePrice">
{%- if current_variant.compare_at_price -%}
<s class="reduced-price">{{ current_variant.compare_at_price | money }}</s>
{%- endif -%}

The above added " / Set" to all of my skus and I didn't want it to be added for our gift card, so I:

(1) Copied template: "product.liquid" as "product.giftcard"

(2) Copied section: "product-template" to "product-template-nonset"

(3) Copied snippet: "product form" to "product-form-nonset"

(4) Removed line 51 (" / Set" text) from product-form-nonset

(5) Line 122 in product-template-nonset section changed from 'product-form' to 'product-form-nonset'

(6) Updated Line 4 in product.gift from section "product-template" to "product-template-nonset"

(7) Point the gift card product page template to product.giftcard (instead of product.liquid template)

0 Likes