[Skip to main content](#vessel-content)

#   want price per unit before the price

##

- **[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")**
- [![BluepointWebdesign's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile") Topic Author
- [ Offline](/forum/user/34929-bluepointwebdesign)

Less More

- Posts: 424
- Thank you received: 11
-
-

11 years 7 months ago [\#195394](#195394) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  *[want price per unit before the price](/forum/31-development/875790-want-price-per-unit-before-the-price#195394 "-- 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.")* was created by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")*

-- 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.

- [ ![screenshot-aandearbeid&#95;eu&#95;2015-03-18&#95;14-30-42.png](/forum/attachment/23202) ](/forum/attachment/23202 "...8&#95;14-30-42.png") [ ](/forum/attachment/23202?download=1 "...8&#95;14-30-42.png")
- [ ![screenshot-aandearbeid&#95;eu&#95;2015-03-18&#95;14-32-46.png](/forum/attachment/23203) ](/forum/attachment/23203 "...8&#95;14-32-46.png") [ ](/forum/attachment/23203?download=1 "...8&#95;14-32-46.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NTc5MC13YW50LXByaWNlLXBlci11bml0LWJlZm9yZS10aGUtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

11 years 7 months ago -  11 years 7 months ago [\#195397](#195397) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[want price per unit before the price](/forum/31-development/875790-want-price-per-unit-before-the-price#195397 "-- 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.")*

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" ?

Last edit: 11 years 7 months ago by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NTc5MC13YW50LXByaWNlLXBlci11bml0LWJlZm9yZS10aGUtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")**
- [![BluepointWebdesign's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile") Topic Author
- [ Offline](/forum/user/34929-bluepointwebdesign)

Less More

- Posts: 424
- Thank you received: 11
-
-

11 years 7 months ago [\#195528](#195528) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  Replied by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")* on topic *[want price per unit before the price](/forum/31-development/875790-want-price-per-unit-before-the-price#195528 "-- 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.")*

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NTc5MC13YW50LXByaWNlLXBlci11bml0LWJlZm9yZS10aGUtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 7 months ago [\#195535](#195535) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[want price per unit before the price](/forum/31-development/875790-want-price-per-unit-before-the-price#195535 "-- 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.")*

Hi,

So to in the view "product / listing_price" you can replace the code: Code:

if(isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price) &amp;&amp; $this-&gt;params-&gt;get('per_unit',1)){ if($price-&gt;price_min_quantity&gt;1){ echo '&lt;span class="hikashop_product_price_per_unit_x"&gt;'.JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price-&gt;price_min_quantity).'&lt;/span&gt;'; }else{ echo '&lt;span class="hikashop_product_price_per_unit"&gt;'.JText::_('PER_UNIT').'&lt;/span&gt;'; } }

By: Code:

if(JRequest::getCmd('layout') == 'show' &amp;&amp; isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price) &amp;&amp; $this-&gt;params-&gt;get('per_unit',1)){ if($price-&gt;price_min_quantity&gt;1){ echo '&lt;span class="hikashop_product_price_per_unit_x"&gt;'.JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price-&gt;price_min_quantity).'&lt;/span&gt;'; }else{ echo '&lt;span class="hikashop_product_price_per_unit"&gt;'.JText::_('PER_UNIT').'&lt;/span&gt;'; } }

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](http://www.hikashop.com/support/support/documentation/153-customize-the-display.html)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NTc5MC13YW50LXByaWNlLXBlci11bml0LWJlZm9yZS10aGUtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")**
- [![BluepointWebdesign's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile") Topic Author
- [ Offline](/forum/user/34929-bluepointwebdesign)

Less More

- Posts: 424
- Thank you received: 11
-
-

11 years 7 months ago [\#195896](#195896) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  Replied by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")* on topic *[want price per unit before the price](/forum/31-development/875790-want-price-per-unit-before-the-price#195896 "-- 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.")*

A little late,
but thanks for this solution. i couldn't figure it out.
it works!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NTc5MC13YW50LXByaWNlLXBlci11bml0LWJlZm9yZS10aGUtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")**
- [![BluepointWebdesign's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile") Topic Author
- [ Offline](/forum/user/34929-bluepointwebdesign)

Less More

- Posts: 424
- Thank you received: 11
-
-

8 years 5 months ago [\#292640](#292640) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  Replied by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")* on topic *[want price per unit before the price](/forum/31-development/875790-want-price-per-unit-before-the-price#292640 "-- 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.")*

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NTc5MC13YW50LXByaWNlLXBlci11bml0LWJlZm9yZS10aGUtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

8 years 5 months ago [\#292643](#292643) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[want price per unit before the price](/forum/31-development/875790-want-price-per-unit-before-the-price#292643 "-- 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.")*

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 : Code:

echo '&lt;span class="'.implode(' ',$classes).'"'.$attributes.'&gt;'; if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format(@$price-&gt;price_value_with_tax,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format(@$price-&gt;price_value,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } if($this-&gt;params-&gt;get('show_original_price') &amp;&amp; !empty($price-&gt;price_orig_value)){ echo JText::_('PRICE_BEFORE_ORIG'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_with_tax,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } echo JText::_('PRICE_AFTER_ORIG'); } echo '&lt;/span&gt; ';

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.

The following user(s) said Thank You: [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NTc5MC13YW50LXByaWNlLXBlci11bml0LWJlZm9yZS10aGUtcHJpY2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.062 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
