Show unit price in cart

  • Posts: 29
  • Thank you received: 1
11 years 7 months ago #141921

-- url of the page with the problem -- : pharmacyshop.eu
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 2.5.17
-- PHP version -- : 5.3.3

Hi,

I would like to add unit price to product / cart.php.
I have already tried to copy-paste the relevant part of the checkout/showcart.php but it didn't work.

How can I do this?

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

  • Posts: 84243
  • Thank you received: 13687
  • MODERATOR
11 years 6 months ago #141997

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

  • Posts: 29
  • Thank you received: 1
11 years 6 months ago #142022

Hi,
I am not sure if you gave me the proper link. Or I do not get the relation betwen my problem and the content behind the link.

Just to be clear, I would like to add a 'unit_price' column into the table of ordered products in Cart Module ( products/cart.php ).

Thanks.

Last edit: 11 years 6 months ago by bendegoose.

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

  • Posts: 84243
  • Thank you received: 13687
  • MODERATOR
11 years 6 months ago #142036

Ah indeed, I didn't give the correct link. I mixed your message with someone else's.
You would have to edit the file "cart" of the view "product" and add such code:

<?php echo $this->currencyHelper->format($row->prices[0]->unit_price->price_value_with_tax,$row->prices[0]->unit_price->price_currency_id); ?>

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

  • Posts: 29
  • Thank you received: 1
11 years 6 months ago #142206

Thanks!

Works almost perfectly. My only problem is that this solution does not consider if I set net or gross prices for the webshop to show.

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

  • Posts: 84243
  • Thank you received: 13687
  • MODERATOR
11 years 6 months ago #142220

That code was for net prices.
For gross prices it's the same with the text "_with_tax" removed.

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

Time to create page: 0.050 seconds
Powered by Kunena Forum