Goal: hide prices on home/product pages (except âmerchandiseâ items) and replace Buy Now/Add to Cart with an external âAffiliate Linkâ button for each product.
Price hiding update:
Decision: hide prices when the product price equals 0, ensuring merchandise (with non-zero prices) still shows prices.
Implemented by adding a conditional âhiddenâ class in price.liquid. A syntax correction from â{% end if %}â to â{% endif %}â resolved the issue. OP confirmed this part works.
Affiliate button plan:
Requirement: no Add to Cart; each product has a different Amazon/other affiliate URL.
Proposed approach: create a product metafield (custom product field) to store the affiliate link; enter the link per product; create/select a new product template that uses this metafield to render an âAffiliate Linkâ button instead of the cart/buy button.
Alternative suggestion:
Use the âRequest A Quote â Hide Price by Omegaâ app (free plan) to hide prices without code.
Status: price hiding solved; affiliate link implementation has clear steps but no confirmation of completion yet. Discussion partially resolved and likely ongoing.
if target == product and product.price_varies
assign money_price = âproducts.product.price.from_price_htmlâ | t: price: money_price
endif
-%}
{%- comment -%}
Explanation of description list:
- div.price__regular: Displayed when there are no variants on sale
- div.price__sale: Displayed when a variant is a sale
{%- endcomment -%}
{{ 'products.product.price.regular_price' | t }}
{{ money_price }}
@AGConsultancy Can you search Request A Quote - Hide Price by Omega?
The app has a free plan, which can hide all product prices. It seems suitable for your store so you can hide price without touching codes.