Shopify themes, liquid, logos, and UX
URL: https://nft-maxmillion.myshopify.com/
Hi,
I need two things please.
1. Hide prices on everything on home page and product pages.
Apart from merchandise ( This is linked to a dropshipper)
2. Change buy now button to Amazon Affiliate / Other affiliate link
Thanks
Solved! Go to the solution
This is an accepted solution.
Hi @AGConsultancy,
1: Please change code:
{%- if price == 0 %}hidden {% endif -%}
=>
{%- if price == 0 %} hidden {% endif -%}
it will work fine
@LitExtension - Please can you help? I hear you are the master of this theme. Your help would be much appreciated. Thank you 🙂
Hi @AGConsultancy,
Please send me the password. I will check it.
Hi, I have sent this to you in a DM. Thank you so much.
Hi @AGConsultancy,
#1: The products you want to hide the price of are all priced at zero?
#2: Are you looking to show this for all products?
1 - Correct. The only page this should not be applied to is the merchandise page.
2 - No add to cart. Just "Affiliate Link"
Thank you.
Hi @AGConsultancy,
1: Go to price.liquid file and add code here:
Code:
{%- if price == 0 %}hidden {% endif -%}
2: Button will show the same link for products? Or does each product have a different Amazon link?
Hi,
This is the code, I have updated it but it hasn't done anything.
{% comment %}
Renders a list of product's price (regular, sale)
Accepts:
- product: {Object} Product Liquid object (optional)
- use_variant: {Boolean} Renders selected or first variant price instead of overall product pricing (optional)
- show_badges: {Boolean} Renders 'Sale' and 'Sold Out' tags if the product matches the condition (optional)
- price_class: {String} Adds a price class to the price element (optional)
Usage:
{% render 'price', product: product %}
{% endcomment %}
{%- liquid
if use_variant
assign target = product.selected_or_first_available_variant
else
assign target = product
endif
assign compare_at_price = target.compare_at_price
assign price = target.price | default: 1999
assign available = target.available | default: false
assign money_price = price | money
if settings.currency_code_enabled
assign money_price = price | money_with_currency
endif
if target == product and product.price_varies
assign money_price = 'products.product.price.from_price_html' | t: price: money_price
endif
-%}
<div class="price
{%- if price == 0 %}hidden {% endif -%}
{%- if available == false %} price--sold-out {% endif -%}
{%- if compare_at_price > price %} price--on-sale {% endif -%}
{%- if product.price_varies == false and product.compare_at_price_varies %} price--no-compare{% endif -%}
{%- if show_badges %} price--show-badge{% endif -%}">
<div class="price__container">
{%- 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 -%}
<div class="price__regular">
<span class="visually-hidden visually-hidden--inline">{{ 'products.product.price.regular_price' | t }}</span>
<span class="price-item price-item--regular">
{{ money_price }}
</span>
</div>
<div class="price__sale">
{%- unless product.price_varies == false and product.compare_at_price_varies %}
<span class="visually-hidden visually-hidden--inline">{{ 'products.product.price.regular_price' | t }}</span>
<span>
<s class="price-item price-item--regular">
{% if settings.currency_code_enabled %}
{{ compare_at_price | money_with_currency }}
{% else %}
{{ compare_at_price | money }}
{% endif %}
</s>
</span>
{%- endunless -%}
<span class="visually-hidden visually-hidden--inline">{{ 'products.product.price.sale_price' | t }}</span>
<span class="price-item price-item--sale price-item--last">
{{ money_price }}
</span>
</div>
<small class="unit-price caption{% if product.selected_or_first_available_variant.unit_price_measurement == nil %} hidden{% endif %}">
<span class="visually-hidden">{{ 'products.product.price.unit_price' | t }}</span>
<span class="price-item price-item--last">
<span>{{- product.selected_or_first_available_variant.unit_price | money -}}</span>
<span aria-hidden="true">/</span>
<span class="visually-hidden"> {{ 'accessibility.unit_price_separator' | t }} </span>
<span>
{%- if product.selected_or_first_available_variant.unit_price_measurement.reference_value != 1 -%}
{{- product.selected_or_first_available_variant.unit_price_measurement.reference_value -}}
{%- endif -%}
{{ product.selected_or_first_available_variant.unit_price_measurement.reference_unit }}
</span>
</span>
</small>
</div>
{%- if show_badges -%}
<span class="badge price__badge-sale color-{{ settings.sale_badge_color_scheme }}">
{{ 'products.product.on_sale' | t }}
</span>
<span class="badge price__badge-sold-out color-{{ settings.sold_out_badge_color_scheme }}">
{{ 'products.product.sold_out' | t }}
</span>
{%- endif -%}
</div>
2 - Different affiliate link - Will be tagged.
Thanks,
Ashleigh
This is an accepted solution.
Hi @AGConsultancy,
1: Please change code:
{%- if price == 0 %}hidden {% endif -%}
=>
{%- if price == 0 %} hidden {% endif -%}
it will work fine
Thank you so much!! - I really appreciate you supplying a solution to the first part.
Hi @AGConsultancy,
You can follow these steps:
- Step 1: Create metafield for product's link.
- Step 2: Enter the amazon link at the product.
- Step 3: Create a new template for the product and then select it for the product.
Hope it helps!
@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.
Hi AGConsultancy.
I recently also encountered the topic of NFT, maybe it will be useful for you to learn more in detail how to work in this topic.
What is NFT Token: https://romtos.com/learn-more-about-the-product-owner/what-is-nft-token
Read more about how to create your own NFT collection and all related questions here: https://romtos.com/learn-more-about-the-product-owner/how-do-i-create-an-nft-collection
I hope this will be useful for you!
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025