Adding recommended price on custom theme

Add the widget on a custom or legacy theme

Freddie

Last Update il y a 10 mois

This is a bit technical but im sure you can figure it out 🙂, if not we are always happy to help you!

Step 1. Create a snippet for your theme

Navigate to sales channel -> Online store -> Then click the three dots and "Edit code"

Then navigate to snippet and create a new snippet called "omnibus-list-price"

Paste the following code into the snippet

Then save the snippet.


Next you need to open the product template that is in use for your theme. In my case its called "product-template.liquid". You find it easier if you search for it.

Then you need to add this part to the file where you want the "list price" to show.

Create metafield definition

To be able to show the list price, you need to add it to a product, in a metafield that we should now create.


This is also very easy to do.


Go to Shopify admin -> Settings, then select custom data in the menu on the left hand side.


Then click on Products in the list that appears.

Then click on Add definition. It's really important that you use the following values when you create the metafield definition.

- Type in the name: List price

- Make sure that the Namespace and key got automatically added as "custom.list_price"

- Enter any type of description

- For the type, select Money

- Complete the step by clicking save



How to edit the list price

Just head over and edit any of your products in the Shopify admin, scroll down to the bottom, now you should have the option to enter a list price for your product.

If you have local currencies in your shop then the List price will be automatically converted to the currency that your customer has selected.

Was this article helpful?

0 out of 0 liked this article

Still need help? Message Us