Skip to main content

Adding text to the price

More
14 years 3 months ago #53461 by svekke_s
I have my page with my products on (a picture, the price and the link to the productpage.
Some of my products have a different size to choose from and according to the size there is a price difference.

How can I add the following text: "starting from" just before the price?

Thanks in advance.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago - 14 years 3 months ago #53471 by Mohamed Thelji
Hello,

If you want to change the way of displaying the price, you'll have to edit the file "listing_price" of the view "product" of the template that you are currently using.

For example if you want to add Starting from in front of every price of products which have variants, you can add :
Code:
if($this->row->product_type=="variant"&&@$_GET['task']=="show") echo "Starting from: ";
After the lines
Code:
<span class="hikashop_product_price_full<?php echo $class; ?>"> <?php
Hope this will help you a little
Last edit: 14 years 3 months ago by Mohamed Thelji.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #53605 by svekke_s
That is the solution.
Is it also possible to ad this text on the product overview-page?
This is a page with a pic of the products, the price and a link to the productpage.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #53694 by nicolas
It's the same file. Just use that code:
if($this->row->has_options) echo "Starting from: ";

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #53754 by svekke_s
On what line do I have to change this?
I have added this line and got a lot of errors with my other products.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #53762 by Mohamed Thelji
Hello,

You should just replace the line :
Code:
if($this->row->product_type=="variant"&&@$_GET['task']=="show") echo "Starting from: ";
by
Code:
if(@$this->row->has_options) echo "Starting from: ";
and it will be good.
The following user(s) said Thank You: shopatmimi

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #53765 by svekke_s
Yes, that did the trick.

Thank you.

Please Log in or Create an account to join the conversation.

Time to create page: 0.239 seconds
Powered by Kunena Forum