Solved

Display "Price on Request" when price is more than 1000

Arkligte
Shopify Partner
9 1 1

Hi,

 

How to display "price on request" in collection when price is more than 1000.

 

I used following code to reflect image 1. It doesnt take the following condition and reflects for all products.

{% if money_price > "1000" %} Price on request {% endif %}

 

If I input 1000 as integer, I get this error "Comparison Of Integer With String Failed". Need help.

 

Image 1

Arkligte_0-1706858708092.png

 

Accepted Solution (1)
Arkligte
Shopify Partner
9 1 1

This is an accepted solution.

I tried {{product.price}} and saw the numbers 500000 instead of 5000.00, seems the decimal is removed and calculated along. Adding 00 fixed the issue and is working now. 

 

{% if product.price > 600000 %} Price on request {% endif %} 

 

Thank you so much for your time, really appreciate it.

 

Arkligte_0-1706862823272.png

 

 

View solution in original post

Replies 12 (12)

Dan-From-Ryviu
Shopify Partner
6944 1313 1339

Hi @Arkligte 

Please try to update your code to this and check again. 

{% if card_product.price > 1000 %} Price on request {% endif %}

 

 

- Helpful? Like or Accept solution, - Coffee Tips or Paypal Tips
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 1 month of Shopify for $1. Sign up now

Arkligte
Shopify Partner
9 1 1

Hi, than you for the reply.

I tried the given code. It removes the price completely as shown in below image.

Played with the conditions to check if it works but sadly it doesn't. I am unable to figure out why the operator isn't working. I am currently replacing {{money_price}} to the code and I am in price.liquid file.

 

Arkligte_0-1706861515328.png

 

Dan-From-Ryviu
Shopify Partner
6944 1313 1339

So please try to use this code

{% if product.price > 1000 %} Price on request {% endif %}

 

- Helpful? Like or Accept solution, - Coffee Tips or Paypal Tips
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 1 month of Shopify for $1. Sign up now

Arkligte
Shopify Partner
9 1 1

Thank you, the condition doesn't seem to work strangely.

I am currently using {% if product.price > 6000 %} Price on request {% endif %} and got the below result.

 

End result I am looking for is "First image should only show the price (as its lesser than 6000) and second image should show "Price on request" (as its greater).

 

Am using sense theme at the moment.

Arkligte_1-1706861879904.png

 

 

 

Dan-From-Ryviu
Shopify Partner
6944 1313 1339

Please try to add this code before the that code to check what value of your item's price 

{{ product.price }}

 

- Helpful? Like or Accept solution, - Coffee Tips or Paypal Tips
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 1 month of Shopify for $1. Sign up now

Arkligte
Shopify Partner
9 1 1

This is an accepted solution.

I tried {{product.price}} and saw the numbers 500000 instead of 5000.00, seems the decimal is removed and calculated along. Adding 00 fixed the issue and is working now. 

 

{% if product.price > 600000 %} Price on request {% endif %} 

 

Thank you so much for your time, really appreciate it.

 

Arkligte_0-1706862823272.png

 

 

Dan-From-Ryviu
Shopify Partner
6944 1313 1339

You are very welcome

- Helpful? Like or Accept solution, - Coffee Tips or Paypal Tips
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 1 month of Shopify for $1. Sign up now

Dan-From-Ryviu
Shopify Partner
6944 1313 1339

I guess you must add code like this. 

{% if product.price > 600000 %} Price on request {% endif %}

- Helpful? Like or Accept solution, - Coffee Tips or Paypal Tips
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 1 month of Shopify for $1. Sign up now

Arkligte
Shopify Partner
9 1 1

Hi, Quick question.

 

Condition is, if a collection called "INTERIOR" (handle is 'interior') has products that cost more than 1000, it should show "price on request".  I am using following codes, but it's not working. Rest of the collection should show regular prices without any condition. 

 

Tried this one

{% assign collection_handle = 'interior' %}
{% if product.price > 100000 and collections[collection_handle].products %} Price on request
{% else %}
{{ money_price }}
{% endif %}

 

Tried this one too

{% assign collection_handle = 'interior' %}
{% for product in collections[collection_handle].products %}
{% if product.price > 100000 %} Price on request
{% else %}
{{ money_price }}
{% endif %}
{% endfor %}

Dan-From-Ryviu
Shopify Partner
6944 1313 1339

Use this code

 

{% if product.price > 100000 and collection.handle == 'interior' %} 
Price on request
{% else %}
{{ money_price }}
{% endif %}

 

- Helpful? Like or Accept solution, - Coffee Tips or Paypal Tips
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 1 month of Shopify for $1. Sign up now

Arkligte
Shopify Partner
9 1 1

Hi, thank you for the code. Collection.handle doesn't seem to work, only the TV is tagged under interior.

Arkligte_0-1707894153756.png

 

Dan-From-Ryviu
Shopify Partner
6944 1313 1339

Hi @Arkligte 

Please update the code

{% assign productCollections = card_product.collections | map: "handle" %}
{% if productCollections contains 'interior' %}
  {% if product.price > 100000 %} 
    Price on request
  {% else %}
    {{ money_price }}
  {% endif %}
{% endif %}

 

- Helpful? Like or Accept solution, - Coffee Tips or Paypal Tips
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 1 month of Shopify for $1. Sign up now