Solved

Refresh theme - Coding for affiliate button instead of buy now button. Hide all prices.

AGConsultancy
New Member
8 0 0

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

Ashleigh Gill Consultancy
Virtual Assistant | Business Consultant
Assisting service based business owners to manage their workload and to scale their business.
Social Media Management | Admin
Accepted Solution (1)
LitExtension
Shopify Partner
4860 1001 1133

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 - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify

View solution in original post

Replies 12 (12)

AGConsultancy
New Member
8 0 0

@LitExtension - Please can you help? I hear you are the master of this theme. Your help would be much appreciated. Thank you 🙂

Ashleigh Gill Consultancy
Virtual Assistant | Business Consultant
Assisting service based business owners to manage their workload and to scale their business.
Social Media Management | Admin
LitExtension
Shopify Partner
4860 1001 1133

Hi @AGConsultancy,

Please send me the password. I will check it.

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
AGConsultancy
New Member
8 0 0

Hi, I have sent this to you in a DM. Thank you so much.

Ashleigh Gill Consultancy
Virtual Assistant | Business Consultant
Assisting service based business owners to manage their workload and to scale their business.
Social Media Management | Admin

LitExtension
Shopify Partner
4860 1001 1133

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?

Screenshot.png

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
AGConsultancy
New Member
8 0 0

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.

Ashleigh Gill Consultancy
Virtual Assistant | Business Consultant
Assisting service based business owners to manage their workload and to scale their business.
Social Media Management | Admin
LitExtension
Shopify Partner
4860 1001 1133

Hi @AGConsultancy,

1: Go to price.liquid file and add code here:

Screenshot.png

Code:

{%- if price == 0 %}hidden {% endif -%}

2: Button will show the same link for products? Or does each product have a different Amazon link?

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
AGConsultancy
New Member
8 0 0

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">&nbsp;{{ 'accessibility.unit_price_separator' | t }}&nbsp;</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

Ashleigh Gill Consultancy
Virtual Assistant | Business Consultant
Assisting service based business owners to manage their workload and to scale their business.
Social Media Management | Admin
LitExtension
Shopify Partner
4860 1001 1133

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 - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
AGConsultancy
New Member
8 0 0

Thank you so much!! - I really appreciate you supplying a solution to the first part. 

Ashleigh Gill Consultancy
Virtual Assistant | Business Consultant
Assisting service based business owners to manage their workload and to scale their business.
Social Media Management | Admin

LitExtension
Shopify Partner
4860 1001 1133

Hi @AGConsultancy,

You can follow these steps:

- Step 1: Create metafield for product's link.

Screenshot.png

- Step 2: Enter the amazon link at the product.

Screenshot.png

- Step 3: Create a new template for the product and then select it for the product.

Screenshot_4.png

Hope it helps!

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify

paulnguyen
Shopify Partner
45 0 3

@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.

romchy
Shopify Partner
143 0 28

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!

__________________________________________________________________________
★ Did my post help? If yes, then please like and accept solution. ★

Romchy | Application consultant Feed Product

→ Ask to launch an effective advertising campaign @ Write to WhatsApp:
https://chat.whatsapp.com/GOWhsfPriq5K6hgBJJWTNm

→ Get Free Guides for Store Sync @ Shopify Feed Product Help Center:
https://apps.shopify.com/feed-product-facebook-google

→ Want to get new features? Add Feed product app to your store @ Add app Feed product:
https://apps.shopify.com/feed-product-facebook-google