Skip to main content

how to move PER_UNIT?

More
15 years 7 months ago #7019 by mohairbears
Hi me again,

Can you advise how to move PER_UNIT to the front of the price i.e instead of "£5.99 per unit" to "per unit £5.99"

thanks in advance

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

More
15 years 7 months ago - 15 years 7 months ago #7021 by nicolas
Replied by nicolas on topic Re: how to move PER_UNIT?
You can edit the file listing_price of the view product and add the code:
Code:
if(isset($price->price_min_quantity) && empty($this->cart_product_price)){ if($price->price_min_quantity<=1){ echo JText::_('PER_UNIT'); } }
just after the code
Code:
$class = 'hikashop_product_price';

and then change the code:
Code:
if(isset($price->price_min_quantity) && empty($this->cart_product_price)){ if($price->price_min_quantity>1){ echo JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity); }else{ echo JText::_('PER_UNIT'); } }
to:
Code:
if(isset($price->price_min_quantity) && empty($this->cart_product_price)){ if($price->price_min_quantity>1){ echo JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity); } }
Last edit: 15 years 7 months ago by nicolas.

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

More
15 years 7 months ago #7725 by mohairbears
Hi, can you please advise how to move the price from the end to the front i.e "when buying at least 5 £1.50" to "£1.50 when buying at least 5"

thanks in advance

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

More
15 years 7 months ago #7726 by nicolas
Replied by nicolas on topic Re: how to move PER_UNIT?
I've change d the instructions in my previous post so that the "when buying at least 5" stays after the price.

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

More
15 years 7 months ago #7732 by mohairbears
Hi sorry I think you may have misunderstood my request.

I have at present on the page; from £1.70, when buying at least 5 £1.50.

I'm after; from £1.70, £1.50 when buying at least 5.

thanks

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

More
15 years 7 months ago #7733 by nicolas
Replied by nicolas on topic Re: how to move PER_UNIT?
Why do you think I misunderstood you ?

I don't think so.
Normally the "when buying at least 5" is after the price in hikashop. But the change if code I told you about the first time change the order of botht he from and the "when buying at least 5". So, instead of that first version, using, those new instructions, you should have what you want.

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

More
15 years 7 months ago #7735 by mohairbears
Hi, the new code has removed the "from" the singular price, I am just asking if it's possible to have "from" (was per unit) in front of the singular price and then the price £1.50 followed by text "when purchasing at least 5" etc.

No problem if it can't be done as I can just revert back to the original code.

thanks

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

More
15 years 7 months ago #7736 by nicolas
Replied by nicolas on topic Re: how to move PER_UNIT?
You probably didn't apply the modifications as I wrote them. Could you double check ?

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

More
15 years 7 months ago #7737 by mohairbears
Sorted, I had moved the last code to the top previously when I was trying to find the solution myself, now moved it back to where it should be and now works fine.

thank you.

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

Time to create page: 0.207 seconds
Powered by Kunena Forum