Craft Theme - Modifying text in the product price.

Craft Theme - Modifying text in the product price.

jmd92
Excursionist
31 0 8

Hello,

 

Wanted to ask if anyone knew how to remove or edit the "from" text under the first product that is before the price? (screenshot attached). Thank you so much. 

https://thetypefella.com/


s.jpg


Replies 3 (3)

devcoders
Shopify Partner
191 31 48

Hi @jmd92 

Remove the "From" prefix in the Craft theme, you'll need to locate the appropriate Liquid file where the price is displayed. Follow these steps:

In your Shopify admin, go to "Online Store" > "Themes"

Click on the "Actions" button next to the Craft theme.

- Select "Edit code" from the dropdown menu.

- In the left sidebar, navigate to the "Sections" or "Snippets" folder depending on where the pricing code is located.

- Look for files related to product pricing, such as product-price.liquid or product-grid-item.liquid.

Once you've located the file, find the code responsible for displaying the price and remove the "From" prefix. It might look something like this:

 

<span class="price-item price-item--sale price-item--last">
    From {{ product.price | money }}
</span>

 

 

Modify the code to remove "From" like this:

 

<span class="price-item price-item--sale price-item--last">
    {{ product.price | money }}
</span>

 

Shopify Developer: Helping eCommerce Stores
If you need assistance with your store, feel free to contact us at devcodersp@gmail.com.
If my assistance was helpful, please consider liking and accepting the solution. Thank you!
jmd92
Excursionist
31 0 8

Thanks for your response. I found within my price.liquid file this code: assign money_price = 'products.product.price.from_price_html' | t: price: money_price

If I remove "from" it states: Translation missing: en.products.product.price.price_html

devcoders
Shopify Partner
191 31 48

Hi @jmd92 

You can try this code.

{% assign money_price = 'products.product.price.from_price_html' | t: price: product.price %}
{{ money_price }}
Shopify Developer: Helping eCommerce Stores
If you need assistance with your store, feel free to contact us at devcodersp@gmail.com.
If my assistance was helpful, please consider liking and accepting the solution. Thank you!