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

#   Don't want to display price/unit in cart

##

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

Less More

- Posts: 137
- Thank you received: 2
-
-

13 years 2 months ago -  13 years 2 months ago [\#123427](#123427) by [1fcb](/forum/user/337-1fcb "View 1fcb's Profile")  *[Don't want to display price/unit in cart](/forum/27-checkout/861966-dont-want-to-display-price-unit-in-cart#123427 "Hika 2.2.1, Joomla 3.1  Hi I've included the following at the end of product / listing&#95;price to display a customized price / unit information.  This works fine on the category and product display, but won't work correct in the cart display. I would like to suppress the display of this in the cart. What code would I need to do so?")* was created by *[1fcb](/forum/user/337-1fcb "View 1fcb's Profile")*

Hika 2.2.1, Joomla 3.1

Hi I've included the following at the end of product / listing_price to display a customized price / unit information. Code:

&lt;span font-weight="normal"&gt; &lt;?php if(isset($this-&gt;row-&gt;product_weight) &amp;&amp; bccomp($this-&gt;row-&gt;product_weight,0,3)){ $weight_price = $price-&gt;price_value_with_tax / $this-&gt;row-&gt;product_weight; echo JText::_('PRICE_SEPARATOR').'(entspricht '.$this-&gt;currencyHelper-&gt;format($weight_price,$price-&gt;price_currency_id).' pro '.JText::_($this-&gt;row-&gt;product_weight_unit).')'; } } echo JText::_('PRICE_END'); } ?&gt; &lt;/span&gt;

This works fine on the category and product display, but won't work correct in the cart display. I would like to suppress the display of this in the cart. What code would I need to do so?

Last edit: 13 years 2 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: [code] is nice

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

13 years 2 months ago [\#123445](#123445) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Don't want to display price/unit in cart](/forum/27-checkout/861966-dont-want-to-display-price-unit-in-cart#123445 "Hika 2.2.1, Joomla 3.1  Hi I've included the following at the end of product / listing&#95;price to display a customized price / unit information.  This works fine on the category and product display, but won't work correct in the cart display. I would like to suppress the display of this in the cart. What code would I need to do so?")*

Hi,

Which cart ?
The product cart or the checkout cart ?

I think you can override the cart view in order to set a variable before the calls of the listing_price view. Something like Code:

$this-&gt;displayWeightPrice = false;

And add a check in your part of code Code:

if(isset($this-&gt;row-&gt;product_weight) &amp;&amp; bccomp($this-&gt;row-&gt;product_weight,0,3) &amp;&amp; (!isset($this-&gt;displayWeightPrice) &#124;&#124; $this-&gt;displayWeightPrice)){

Regards,

---

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

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

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

Less More

- Posts: 137
- Thank you received: 2
-
-

13 years 2 months ago [\#123472](#123472) by [1fcb](/forum/user/337-1fcb "View 1fcb's Profile")  Replied by *[1fcb](/forum/user/337-1fcb "View 1fcb's Profile")* on topic *[Don't want to display price/unit in cart](/forum/27-checkout/861966-dont-want-to-display-price-unit-in-cart#123472 "Hika 2.2.1, Joomla 3.1  Hi I've included the following at the end of product / listing&#95;price to display a customized price / unit information.  This works fine on the category and product display, but won't work correct in the cart display. I would like to suppress the display of this in the cart. What code would I need to do so?")*

works just perfect! Thanks so much!!!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2MTk2Ni1kb250LXdhbnQtdG8tZGlzcGxheS1wcmljZS11bml0LWluLWNhcnQ/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.057 seconds

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