Skip to main content

Product Price format change..

More
12 years 1 month ago #167122 by Superpsychics
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.1

Hey!

My apologies for the beginner's question but I'm new to php..

How could I change the order of hikashop_product_price_main so that it appears like:
"each 1€" instead of "1€ each"

I'm trying to figure it out by editing show_default.php and listing_price.php but no luck yet..
Any help would be greatly appreciated!

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

More
12 years 1 month ago #167128 by Mohamed Thelji
Hello,
You'll have to edit the "listing_price" file of the "product" view of your front-end template via "Hikashop->Display->Views", note that the "each" is displayed through that code :
Code:
if(isset($price->price_min_quantity) && empty($this->cart_product_price) && $this->params->get('per_unit',1)){ if($price->price_min_quantity>1){ echo '<span class="hikashop_product_price_per_unit_x">'.JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity).'</span>'; }else{ echo '<span class="hikashop_product_price_per_unit">'.JText::_('PER_UNIT').'</span>'; } }
So you'll just have to replace it by :
Code:
if(isset($price->price_min_quantity) && empty($this->cart_product_price) && $this->params->get('per_unit',1)){ if($price->price_min_quantity>1){ echo '<span class="hikashop_product_price_per_unit_x">'.JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity).'</span>'; } }

And move that php code before the displaying of the price :
Code:
if($price->price_min_quantity<=1){ echo '<span class="hikashop_product_price_per_unit">'.JText::_('PER_UNIT').'</span>'; }

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

More
12 years 1 month ago #167223 by Superpsychics
Thank you!

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

Time to create page: 0.250 seconds
Powered by Kunena Forum