News:

Support the VirtueMart project and become a member

Main Menu

Size chart for different items

Started by solantis, October 16, 2012, 10:49:47 AM

Previous topic - Next topic

solantis

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

John2400

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.

solantis

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.

solantis

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>

rdharma

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