If your theme does not support the use of our theme extension you can add the lowest price information by editing the template code. This guide provides some examples that you are free to copy and modify for use in your own storefront.
Start by navigating to the theme editor. and click Edit code located in the menu in the top left corner of the page.
In the left sidebar, open the Snippets folder and click Add a new snippet. Name it eg. lowest-price.liquid
Paste the following template code in the newly created snippet file:
{% assign selectedProduct = product.selected_or_first_available_variant %}
{% assign omnibusprice = selectedProduct.metafields.omnibus.price %}
{% assign omnibusdate = selectedProduct.metafields.omnibus.date %}
{% assign label = 'Lowest price last 30 days' %}
{% assign date_format = '%B %d, %Y' %}
{% comment %}
Some date formatting options:
"%B %d, %Y" => "December 31, 2018"
"%b %d, %Y" => "Dec 31, 2018"
"%m/%d/%Y" => "12/31/2018"
"%d.%m.%Y" => "31.12.2018"
"on %B %d, %Y" => "on Dec 31, 2018"
{% endcomment %}
<div id="sniffie-omnibus-price">
{% if omnibusprice %}
{{ label }}
{{ omnibusprice | metafield_tag }}
{% if omnibusdate != null %}
({{ omnibusdate | date: date_format }})
{% endif %}
{% endif %}
</div>
Change the label and date format to your liking.
Next, add the snippet to wherever you want the lowest price information to be shown.
Depending on your template the file names and structure might differ from in this example with the Dawn template. Say we want to add the snippet to product cards on a collection page. If we inspect the collection page we see that it contains a product grid that renders the card-product.liquid
snippet. Locate and edit that file and add then add our newly created snippet where you want the lowest price information to be shown with the code.
{% render "lowest-price", product: card_product %}
Just save and there you have it! The product card now contains the lowest price information
You re-use the snippet anywhere where product information is displayed within a liquid template, eg. on a product page