product_dimension_unit instead of each by price

  • Posts: 107
  • Thank you received: 0
11 years 10 months ago #86092

Hallo,

If I see price of the product, I see the word "each" behind the price.
I would see the value of the field "product_dimension_init" instead of "each".

How to?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 10 months ago #86154

Hi,

You can override the view "product | listing_price" and replace the 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 JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity);
	}else{
		echo JText::_('PER_UNIT');
	}
}
By
if(isset($price->price_min_quantity) && empty($this->cart_product_price) && $this->params->get('per_unit',1)){
	if($price->price_min_quantity>1){
		echo JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity);
	}else{
		echo ' ' . JText::_($this->row->product_dimension_unit);
	}
}

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last edit: 11 years 10 months ago by Jerome.

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

  • Posts: 107
  • Thank you received: 0
11 years 10 months ago #86668

Thanks

It works fine.
Have you one idee for switch between englisch and german?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #86743

Hi,

You can use JoomFish (if on J15) or FaLang. You should find an integration plugin with HikaShop on their website.

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

  • Posts: 107
  • Thank you received: 0
11 years 10 months ago #86766

I have it already done
It works
But I must create for each unit one value in falang to translate
I have 40 units
I would have product_dimension_unit on german site and for example product_dimension_unit2 on englisch site

I know, I want too much

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

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #86790

I don't have FaLang installed on my end, but if you find the method to know in which language you are, you just have to add a if condition to display dimension unit or dimension unit2.

You should post on the FaLang forum to know how get the var of the language.
I think that it's stored in the session, or maybe in a cookie.

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

Time to create page: 0.160 seconds
Powered by Kunena Forum