VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: solantis on October 16, 2012, 10:49:47 AM

Title: Size chart for different items
Post by: solantis on October 16, 2012, 10:49:47 AM
I have a few different clothing items for sale and need to display different size charts for different categories of items. For example the jackets would have one size chart and the trousers would have another etc... This will give the shopper an idea of what size to slelect from the drop down menu. My question is how do I display different size charts for different items? I currently do have a size chart but its been hard coded and the same size chart appears for all the items in the store.

To view the store go here http://goo.gl/tvZ9O
Title: Re: Size chart for different items
Post by: John2400 on October 16, 2012, 11:38:13 AM
This is just done through - custom fields _ cart variant_ (name it size) and then under each product you add the cutome field type. You can leave it at the same cost of add a cost if you like. Just make sure your variant is published too.
Title: Re: Size chart for different items
Post by: solantis on October 16, 2012, 16:08:37 PM
Thanks but I have that in place. What i need is a diagram of the sizes based on the different categories. What would work is if I could create a custom field with a URL that would popup a lightbox with an image in it.
Title: Re: Size chart for different items
Post by: solantis on October 16, 2012, 18:38:38 PM
I managed to sort it out using the guide here

http://forum.virtuemart.net/index.php?topic=99225.msg327903#msg327903 with the following code:

Using a String to Link to related articles, installation instructions etc.


Create a Custom field  type "string" with the name "Installation Instructions" or whatever you want the anchor text to be.
Assign it to the position "link"
In Edit Product apply the field. Paste the url
This below is the code for displaying the link.

<div class="product-fields">
       <?php
       $custom_title = null;
       foreach ($this->product->customfieldsSorted[link] as $field) {
      if ($field->display) {
          ?>
          <?php if ($field->custom_title != $custom_title) { ?>
             <a href="<?php echo $field->display ?>" ><?php echo JText::_($field->custom_title); ?></a>
<?php } ?>
          <?php } ?> <?php } ?>
        </div>
Title: Re: Size chart for different items
Post by: rdharma on May 08, 2015, 11:58:48 AM
Hi, how could you link external image for different type of products, like one for mens t-shirt and another ladies tops. I just check you site and there is error;

in another products
http://www.fainonline.com/sadtu/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=38&virtuemart_category_id=6&Itemid=103