Adding text to the price

  • Posts: 7
  • Thank you received: 0
12 years 5 months ago #53461

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.

  • Posts: 12953
  • Thank you received: 1778
12 years 5 months ago #53471

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 :

if($this->row->product_type=="variant"&&@$_GET['task']=="show") echo "Starting from: ";
After the lines
<span class="hikashop_product_price_full<?php echo $class; ?>">
  <?php
Hope this will help you a little

Last edit: 12 years 5 months ago by Mohamed Thelji.

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

  • Posts: 7
  • Thank you received: 0
12 years 5 months ago #53605

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.

  • Posts: 82821
  • Thank you received: 13368
  • MODERATOR
12 years 5 months ago #53694

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.

  • Posts: 7
  • Thank you received: 0
12 years 5 months ago #53754

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.

  • Posts: 12953
  • Thank you received: 1778
12 years 5 months ago #53762

Hello,

You should just replace the line :

if($this->row->product_type=="variant"&&@$_GET['task']=="show") echo "Starting from: ";
by
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.

  • Posts: 7
  • Thank you received: 0
12 years 5 months ago #53765

Yes, that did the trick.

Thank you.

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

Time to create page: 0.077 seconds
Powered by Kunena Forum