Displaying version of product dimensions ?

  • Posts: 16
  • Thank you received: 0
13 years 7 months ago #12389

Hi,

I would like to display the dimensions of product versions, but I could manage displaying the
dimensions of main product only.
Can you help inserting the right code?

Thanks.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 7 months ago #12416

Hi,

It's a lot more complicated because you need to refresh the display with the correct variant dimension...

What code did you use for the dimensions of the main product ?

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

  • Posts: 16
  • Thank you received: 0
13 years 7 months ago #12427

I have duplicated the code of showing the weight of product, also duplicated the code at the
showing variants of weight, but that is not refreshing.(weight doing). If I set style=display:block
the list of variants displayed correctly, but refreshing does not work.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 7 months ago #12456

In the file administrator/components/com_hikashop/types/characteristic.php you have the line:
var names = [\'id\',\'name\',\'code\',\'image\',\'price\',\'quantity\',\'description\',\'weight\',\'url\'];

you will need to add your new fields so that they are handled as well. So, for example if you have the id hikashop_product_dimension_main you would change that line into:
var names = [\'id\',\'name\',\'code\',\'image\',\'price\',\'quantity\',\'description\',\'weight\',\'url\',\'dimension\'];

Note that the modifications in that file will be overwritten when you update hikashop.

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

  • Posts: 16
  • Thank you received: 0
13 years 7 months ago #12484

Thanks a lot Nicolas! Now that is working as a dream.

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

Time to create page: 0.065 seconds
Powered by Kunena Forum