Skip to main content

unit price on table variant

More
13 years 7 months ago #91998 by nibel59
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.

More
13 years 7 months ago #92024 by Mohamed Thelji
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.

More
13 years 7 months ago #92029 by nibel59
Replied by nibel59 on topic unit price on table variant
this the developing site,
but you can see this demo product

pendriveusb.zap.it/index.php/hikashop-me...t/1-pendrive-usb-877

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

More
13 years 7 months ago #92286 by nicolas
Replied by nicolas on topic unit price on table variant
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.209 seconds
Powered by Kunena Forum