Websmith Posted October 30, 2019 Share Posted October 30, 2019 This might seem a bit simple, but I want to add some text after the price in the product display. The client sells mostly fabrics and I want to add 'per metre' just after the price - €45 per meter. I don't need any calculations, just the simple text. I've changed the product-prices.tpl and the text is displaying but for every product on the site, not just fabrics. I'd appreciate any help. Link to comment Share on other sites More sharing options...
musicmaster Posted October 30, 2019 Share Posted October 30, 2019 Just put an if statement around the text. Something like {if $product->id_category='15'} per meter{endif} I write this from the top of my head and may make some mistake. But if you look at the rest of the code in the template it should be easy to find the correct text. Link to comment Share on other sites More sharing options...
Websmith Posted October 30, 2019 Author Share Posted October 30, 2019 Thanks for the reply. Where do I put this - product-prices.tpl? Link to comment Share on other sites More sharing options...
musicmaster Posted October 30, 2019 Share Posted October 30, 2019 The same place where you put it before Link to comment Share on other sites More sharing options...
Websmith Posted October 30, 2019 Author Share Posted October 30, 2019 Ok, thanks! Link to comment Share on other sites More sharing options...
LucasV Posted November 27, 2020 Share Posted November 27, 2020 I'm also looking for this but for whole my site. (all products). Where exactly in the tpl did you put this text? Thanks. Lucas www.rentalworks.be Link to comment Share on other sites More sharing options...
musicmaster Posted November 28, 2020 Share Posted November 28, 2020 8 hours ago, LucasV said: I'm also looking for this but for whole my site. (all products). Where exactly in the tpl did you put this text? Depends on your theme. Just experiment. There aren't that much places with the word price in your template. 1 Link to comment Share on other sites More sharing options...
LucasV Posted November 28, 2020 Share Posted November 28, 2020 (edited) 2 hours ago, musicmaster said: Depends on your theme. Just experiment. There aren't that much places with the word price in your template. Okay. Thanks! I found it. For anyone looking for the same. In my case I had to edit this file: www\themes\YOURTHEMEHERE\templates\catalog\_partials\product-prices on line 47 I added: <span itemprop="price" content="{$product.price_amount}">{$product.price}</span> <span style="font-size:15px">/dag</span> This is only for the product page. I'll go looking where to change it on the homepage and catalog..Lucas Edited November 28, 2020 by LucasV (see edit history) Link to comment Share on other sites More sharing options...
LucasV Posted November 28, 2020 Share Posted November 28, 2020 To add text behind prices on the catalog list: C:\wamp64\www\themes\YOURTHEME\templates\catalog\_partials\miniatures\product.tpl Edit: <span itemprop="price" class="price">{$product.price} </span> TO <span itemprop="price" class="price">{$product.price} YOURTEXTHERE</span> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now