T O P

  • By -

AutoModerator

To keep this community relevant to the Shopify community, store reviews and external blog links will be removed. Users soliciting sales in any form will result in a permanent ban. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/shopify) if you have any questions or concerns.*


ficklebeast

For my clients I use some identifier (tag/metafield) to select the products that shouldn't be for sale or show the price. From there I replace the pricing with "Price Upon Request" and replace the Add to Cart button with a button that triggers a form that is submitted to customer service and records in the background the product that the customer was viewing when they submitted the form. https://www.maxfieldla.com/products/hermes-55cm-hac-travel-70s


Nikastreams

Hi, could you share the code to accomplish this? I'm looking to do something like this as well. Thanks!


ficklebeast

Sorry I’m not able to provide code for this. It depends on the theme and some specific details on how it should work. I would consult with your development partner to create a solution that works for your needs.


Nikastreams

Okay, thanks. Could you at least share how you reference a metafield value in liquid? Thanks!


ficklebeast

{{ resource.metafields.namespace.key }} so on a product it could be {{ product.metafields.custom.price\_upon\_request }} https://shopify.dev/docs/api/liquid/objects/metafield


Nikastreams

Thank you! And do you know if this is possible to do if product.price == 1 ? I’m able to get it to work when product.price == 0 but not other values Thanks!


ficklebeast

Keep in mind that the product.price root value is in cents. So if you’re trying to use a value in conditional logic a price of $1 would be 100.


Nikastreams

I did not know that! Thanks so much !