- Posts: 424
- Thank you received: 11
want price per unit before the price
- BluepointWebdesign
-
Topic Author
- Offline
Less
More
11 years 7 months ago #195394
by BluepointWebdesign
want price per unit before the price was created by BluepointWebdesign
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.4.0
-- PHP version -- : 5.5.x
Hello,
We want the line price per unit. before the price instead of behind. but not to be shown in the listing of products.
can u tell me how to do that! i attached two images one of the products listing and one of a product itself.
I can not seem to figure it out. Please help.
Thanks.
-- Joomla version -- : 3.4.0
-- PHP version -- : 5.5.x
Hello,
We want the line price per unit. before the price instead of behind. but not to be shown in the listing of products.
can u tell me how to do that! i attached two images one of the products listing and one of a product itself.
I can not seem to figure it out. Please help.
Thanks.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 7 months ago - 11 years 7 months ago #195397
by Mohamed Thelji
Replied by Mohamed Thelji on topic want price per unit before the price
Hello,
1. If you want to remove the "price" column of your product listing, you'll just have to set the "Display price" option to NO through your product listing content menu/module configuration page.
2. What do you exactly mean by : "We want the line price per unit. before the price instead of behind" ?
1. If you want to remove the "price" column of your product listing, you'll just have to set the "Display price" option to NO through your product listing content menu/module configuration page.
2. What do you exactly mean by : "We want the line price per unit. before the price instead of behind" ?
Last edit: 11 years 7 months ago by Mohamed Thelji.
Please Log in or Create an account to join the conversation.
- BluepointWebdesign
-
Topic Author
- Offline
Less
More
- Posts: 424
- Thank you received: 11
11 years 7 months ago #195528
by BluepointWebdesign
Replied by BluepointWebdesign on topic want price per unit before the price
1. we don't want to remove the price in the listing. only the text price per unit.
we alterd the table that's why the text price per unit is now underneat the price. normaly it will be after the price. like this: $ 40,- per unit.
2. in the product itself we want this textline per unit (we will translate this text in dutch to: onze prijs) to be before $ 40,-
so that it looks like: onze prijs $ 40,- instead of $ 40,- onze prijs
Hope u can help
we alterd the table that's why the text price per unit is now underneat the price. normaly it will be after the price. like this: $ 40,- per unit.
2. in the product itself we want this textline per unit (we will translate this text in dutch to: onze prijs) to be before $ 40,-
so that it looks like: onze prijs $ 40,- instead of $ 40,- onze prijs
Hope u can help
Please Log in or Create an account to join the conversation.
11 years 7 months ago #195535
by Xavier
Replied by Xavier on topic want price per unit before the price
Hi,
So to in the view "product / listing_price" you can replace the code:
By:
To display it only on the product detail page, and move that whole code earlier in the view to display it before the price.
www.hikashop.com/support/support/documen...ize-the-display.html
So to in the view "product / listing_price" you can replace the 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>';
}
}
Code:
if(JRequest::getCmd('layout') == 'show' && 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>';
}
}
www.hikashop.com/support/support/documen...ize-the-display.html
Please Log in or Create an account to join the conversation.
- BluepointWebdesign
-
Topic Author
- Offline
Less
More
- Posts: 424
- Thank you received: 11
11 years 7 months ago #195896
by BluepointWebdesign
Replied by BluepointWebdesign on topic want price per unit before the price
A little late,
but thanks for this solution. i couldn't figure it out.
it works!
but thanks for this solution. i couldn't figure it out.
it works!
Please Log in or Create an account to join the conversation.
- BluepointWebdesign
-
Topic Author
- Offline
Less
More
- Posts: 424
- Thank you received: 11
8 years 5 months ago #292640
by BluepointWebdesign
Replied by BluepointWebdesign on topic want price per unit before the price
Hello,
A little question,
It seems that the code you gave me does not set the text per unit in front of the price any more since the new version of hikashop.
How can i do it now?
Thanks
A little question,
It seems that the code you gave me does not set the text per unit in front of the price any more since the new version of hikashop.
How can i do it now?
Thanks
Please Log in or Create an account to join the conversation.
8 years 5 months ago #292643
by nicolas
Replied by nicolas on topic want price per unit before the price
Hi,
There was two modifications in the message from Xavier.
The first one was to add JRequest::getCmd('layout') == 'show' so that the per unit would only display on the product page, not on listings.
If you applied that change, it's normal that it didn't change the location of the per unit text.
The second modification was to swap that block of code with the code before it :
and that is the modification you want to do.
This code hasn't changed since 3 years ago so the modification is still valid and it's still in the same view file you need to do it.
There was two modifications in the message from Xavier.
The first one was to add JRequest::getCmd('layout') == 'show' so that the per unit would only display on the product page, not on listings.
If you applied that change, it's normal that it didn't change the location of the per unit text.
The second modification was to swap that block of code with the code before it :
Code:
echo '<span class="'.implode(' ',$classes).'"'.$attributes.'>';
if($this->params->get('price_with_tax')){
echo $this->currencyHelper->format(@$price->price_value_with_tax,$price->price_currency_id);
}
if($this->params->get('price_with_tax')==2){
echo JText::_('PRICE_BEFORE_TAX');
}
if($this->params->get('price_with_tax')==2||!$this->params->get('price_with_tax')){
echo $this->currencyHelper->format(@$price->price_value,$price->price_currency_id);
}
if($this->params->get('price_with_tax')==2){
echo JText::_('PRICE_AFTER_TAX');
}
if($this->params->get('show_original_price') && !empty($price->price_orig_value)){
echo JText::_('PRICE_BEFORE_ORIG');
if($this->params->get('price_with_tax')){
echo $this->currencyHelper->format($price->price_orig_value_with_tax,$price->price_orig_currency_id);
}
if($this->params->get('price_with_tax')==2){
echo JText::_('PRICE_BEFORE_TAX');
}
if($this->params->get('price_with_tax')==2||!$this->params->get('price_with_tax')){
echo $this->currencyHelper->format($price->price_orig_value,$price->price_orig_currency_id);
}
if($this->params->get('price_with_tax')==2){
echo JText::_('PRICE_AFTER_TAX');
}
echo JText::_('PRICE_AFTER_ORIG');
}
echo '</span> ';
This code hasn't changed since 3 years ago so the modification is still valid and it's still in the same view file you need to do it.
The following user(s) said Thank You: BluepointWebdesign
Please Log in or Create an account to join the conversation.
Time to create page: 0.112 seconds