unit price on table variant

  • Posts: 32
  • Thank you received: 2
11 years 10 months ago #91998

Hi there,
is it possible to show the unit price on the table near the radio ?

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

  • Posts: 12953
  • Thank you received: 1778
11 years 10 months ago #92024

Hello,

Can you give me a link to this page ? It would help me to maybe understand how to do that :).

Thank you.

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

  • Posts: 32
  • Thank you received: 2
11 years 10 months ago #92029

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

  • Posts: 83050
  • Thank you received: 13412
  • MODERATOR
11 years 10 months ago #92286

You would have to add the line:
$price = $variant->prices[0]->price_value;

after the line:
foreach($element->variants as $k => $variant){

and change the line:
$html.='<td>'.$radio.'</td>';

to:
$html.='<td>'.$radio.round($price,2).' €</td>';

in the file administrator/components/com_hikashop/types/characteristic.php

Note that it would be better to do that modification as a characteristic display override:
www.hikashop.com/en/support/documentatio...tation.html#override
It's more complex but then you don't loose the changes when you update.

The following user(s) said Thank You: nibel59

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

Time to create page: 0.069 seconds
Powered by Kunena Forum