Skip to main content
By default, the lowest price block is displayed on product pages. You can also add it to the homepage, collection pages and the related products block by adding the code snippets below to your theme.

Add the lowest price block to the homepage and collections

1

Open the theme code editor

Head to the theme settings, and then click on Edit code.
Edit theme page
2

Open Snippets

In the theme editor sidebar, find and click on the Snippets section to expand the list of existing snippet files.
3

Create a new file

At the top of the expanded list, you will see a button labeled New File. Click this button to create a new snippet file.
New File button
4

Name the snippet

A text field will appear where you can enter a name for your new snippet.
Snippet name field
Name it am-lowest-price.liquid and press Enter.
New snippet created
5

Add the code

On the right side of the screen, in the tab corresponding to the new snippet, add the content below to the code text field and save.
6

Render the snippet in price.liquid

Locate price.liquid in the snippets, paste {%- render 'am-lowest-price', product:product -%} at the end, and save (we recommend using this snippet, since it is responsible for displaying the price).
Some third-party themes may use a different product variable name, which can cause the price.liquid code to not work. If you encounter this issue, try {%- render 'am-lowest-price', product:target -%}, {%- render 'am-lowest-price', product:product_resource -%} or {%- render 'am-lowest-price', product:product_ref -%}. If none of these work, please contact us for assistance at help-center@amasty.com.
Render line added to price.liquid
The result on the front-end:
Lowest price block on the collections page
If you uninstall the app, it won’t automatically undo the changes. You’ll need to manually delete any unnecessary info or blocks.
1

Open the theme code editor

Head to the theme settings, and then click on Edit code.
Edit theme code to add the lowest price block to related products
2

Open Snippets

In the theme editor sidebar, find and click on the Snippets section to expand the list of existing snippet files.
3

Create a new file

At the top of the expanded list, you will see a button labeled New File. Click this button to create a new snippet file.
New File button
4

Name the snippet

A text field will appear where you can enter a name for your new snippet. Name it am-lowest-price-for-related-products.liquid and press Enter.
Snippet name for related products
5

Add the code

On the right side of the screen, in the tab corresponding to the new snippet, add the content below to the code text field and save.
6

Render the snippet in price.liquid

Open price.liquid in the snippets and paste {%- render 'am-lowest-price-for-related-products', product:product -%} at the end, and save (we recommend using this snippet, since it is responsible for displaying the price).
Some third-party themes may use a different product variable name, which can cause the price.liquid code to not work. If you encounter this issue, try {%- render 'am-lowest-price-for-related-products', product:target -%}, {%- render 'am-lowest-price-for-related-products', product:product_resource -%} or {%- render 'am-lowest-price-for-related-products', product:product_ref -%}. If none of these work, please contact us for assistance at help-center@amasty.com.
If you uninstall the app, it won’t automatically undo the changes. You’ll need to manually delete any unnecessary info or blocks.