Author Topic: Custom code in product view  (Read 8087 times)


  • Beginner
  • *
  • Posts: 4
Custom code in product view
« on: February 27, 2011, 13:23:53 PM »
Is there a way I could add custom code in product view?? I want to add "see chart" link, so customers could see size chart for selected product...


  • Global Moderator
  • Super Hero
  • *
  • Posts: 10443
  • VirtueMart Version: 3+
Re: Custom code in product view
« Reply #1 on: February 27, 2011, 14:56:07 PM »
you could do this

This code goes in your flypage where you want the link

<?php if ($product_unit != 'piece') { ?>
<a title="Chart" href="images/stories/charts/<?php echo $product_unit ?>"">Size Chart</a><?php } if ($product_unit == 'piece') { ?>THE OTHER OPTION FOR NOTHING<?php } ?>

And how it works
  • You cannot use the "product unit" for any other purpose
  • Create a folder here images/stories/charts/
  • Move the size charts into the folder above
  • Then say you have a product that gets a certain size chart, you put that name in the product_unit field. Like Chart1.pdf
  • If you do not have a chart for a product leave the product_unit field set to "piece"


  • Beginner
  • *
  • Posts: 22
Re: Custom code in product view
« Reply #2 on: May 07, 2015, 19:10:43 PM »
If different size chart for mens and ladies products then, how could you link different picture?