how to move PER_UNIT?

  • Posts: 517
  • Thank you received: 8
  • Hikashop Business
13 years 9 months ago #7019

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #7021

You can edit the file listing_price of the view product and add the 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
$class = 'hikashop_product_price';

and then change the 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:
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: 13 years 9 months ago by nicolas.

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

  • Posts: 517
  • Thank you received: 8
  • Hikashop Business
13 years 9 months ago #7725

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #7726

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.

  • Posts: 517
  • Thank you received: 8
  • Hikashop Business
13 years 9 months ago #7732

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #7733

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.

  • Posts: 517
  • Thank you received: 8
  • Hikashop Business
13 years 9 months ago #7735

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #7736

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.

  • Posts: 517
  • Thank you received: 8
  • Hikashop Business
13 years 9 months ago #7737

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.065 seconds
Powered by Kunena Forum