Skip to main content

Edit displayed price in category view

More
10 years 10 months ago - 10 years 10 months ago #220838 by Kingwell
-- HikaShop version -- : 2.6.0

I would like to change the price display of products in the category view, there are 2 things i would like to achieve:

The first thing is to remove the whitespace between the currency symbol and the value, for instance it displays "£ 10.00" where i would like to display "£10.00".

The second thing, is to add the word "from" in front of the price where there are multiple variants with different prices, my category display shows the lowest available price, currently like "£39.60" with the "choose options" button,i would like it to display "From £39.60" instead, so that customers are not mislead about pricing.
Ideally i would only like to show the "From..." where there are multiple variants of the same product. and single variant products just show the price.
I think this would be done as an overside IF statement in product / listing_img_title but am unsure of what syntax to use.

Thanks in advance.

Oli
Last edit: 10 years 10 months ago by Kingwell.

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

More
10 years 10 months ago #220998 by nicolas
Hi,

1. Go in the menu System>Currencies, edit your currency and you'll find options on the right side of the screen to configure the way the prices should display in that currency, including one option for the space between the symbol and the price.

2.
It's quite easy actually:
Code:
<?php if(!empty($this->row->has_options)) echo "From"; ?>
The following user(s) said Thank You: Kingwell

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

More
10 years 5 months ago #238269 by Vero

nicolas wrote: It's quite easy actually:

Code:
<?php if(!empty($this->row->has_options)) echo "From"; ?>


Where to add this code?
I have added this code to product/listing.... in different views en in different places, where I found price code, but it not works.

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

More
10 years 5 months ago #238319 by nicolas
Hi,

In product / listing_img_title, as you were saying in your first message.

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

More
10 years 5 months ago - 10 years 5 months ago #238343 by Vero
Nicolas, I am sorry, but I was saying in my message, that I tried, but it not works. Please, tell me in what place have I to add that code?
Code:
<!-- PRODUCT PRICE --> <?php if($this->params->get('show_price','-1')=='-1'){ $config =& hikashop_config(); $this->params->set('show_price',$config->get('show_price')); } if($this->params->get('show_price')){ $this->setLayout('listing_price'); echo $this->loadTemplate(); } ?> <!-- EO PRODUCT PRICE -->
Last edit: 10 years 5 months ago by Vero.

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

More
10 years 5 months ago #238352 by nicolas
Hi,

Well, it should definitely add the From on the listing if you edit that view file, unless:
- you're editing the view file for another template than the one you're using on your frontend
- you've configured the layout setting of your menu item to use another layout than the default "image an title" and in that case, it's another view file that you need to edit, accordingly to the layout you selected:
www.hikashop.com/support/documentation/1...-display.html#layout

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

Time to create page: 0.102 seconds
Powered by Kunena Forum