- Posts: 137
- Thank you received: 2
Don't want to display price/unit in cart
13 years 2 months ago - 13 years 2 months ago #123427
by 1fcb
Don't want to display price/unit in cart was created by 1fcb
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.
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 I've included the following at the end of product / listing_price to display a customized price / unit information.
Code:
<span font-weight="normal">
<?php
if(isset($this->row->product_weight) && bccomp($this->row->product_weight,0,3)){
$weight_price = $price->price_value_with_tax / $this->row->product_weight;
echo JText::_('PRICE_SEPARATOR').'(entspricht '.$this->currencyHelper->format($weight_price,$price->price_currency_id).' pro '.JText::_($this->row->product_weight_unit).')';
}
}
echo JText::_('PRICE_END');
}
?>
</span>
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. Reason: [code] is nice
Please Log in or Create an account to join the conversation.
13 years 2 months ago #123445
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Don't want to display price/unit in cart
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
And add a check in your part of code
Regards,
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->displayWeightPrice = false;
Code:
if(isset($this->row->product_weight) && bccomp($this->row->product_weight,0,3) && (!isset($this->displayWeightPrice) || $this->displayWeightPrice)){
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
13 years 2 months ago #123472
by 1fcb
Replied by 1fcb on topic Don't want to display price/unit in cart
works just perfect! Thanks so much!!!
Please Log in or Create an account to join the conversation.
Time to create page: 0.049 seconds