Adding product unit price under prod name in cart

  • Posts: 62
  • Thank you received: 0
11 years 4 weeks ago #167363

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3

Hi,

I would like to add the individual unit price underneath the product name in the shopping cart. Shopping cart is the standard one that ships with HikaShop that has been configured in the back end.

I realise that I will need to update a view and would like to know which one and what the php code will be to retrieve the unit price for the current product item in the list.

Basically I want to put the unit price underneat the product name as indicated by the red lines in the attached screenshot.

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
11 years 4 weeks ago #167395

Hello,
To do that you'll have to edit the code of the "cart" file of the "product" view of your front-end template via "Hikashop->Display->Views" .

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

  • Posts: 62
  • Thank you received: 0
11 years 3 weeks ago #168247

Hi Mohamed,

Any chance of some sample PHP to retrieve the price for the item in the cart?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 3 weeks ago #168280

Hi,

The code to display the price is:

$currencyHelper = hikashop_get('class.currency');
echo $currencyHelper->format($row->prices[0]->unit_price->price_value_with_tax,$row->prices[0]->unit_price->price_currency_id);
Or without taxe:
$currencyHelper = hikashop_get('class.currency');
echo $currencyHelper->format($row->prices[0]->unit_price->price_value,$row->prices[0]->unit_price->price_currency_id);

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

Time to create page: 0.070 seconds
Powered by Kunena Forum