You are here: Home

Creating generic child products with Virtuemart 2.0.8

Friday, 10 August 2012 14:40 Written by  Ed
Rate this item
(7 votes)

If you use the Virtuemart 2 component for web design with Joomla! then there will come a time when you will need to add attributes to products. When I use the term attributes I mean variations on a product that may or may not affect the price. For example we have been working with a company that produces LED displays. These displays may be red or yellow (another example may be having a Tshirt in various sizes Small, Medium, Large).  The site visitor needs to be able to select one of these values for each product in Virtuemart.

In older versions of Virtuemart you could simply add attributes to the product in the Product Status page. However alot of things have changed with version 2 and attributes are one of them. To achieve the same goal you need to approach the problem in a different way.

You need to create child products each with its own value. To do this navigate to the product to which you need to add the values and go the the Product Information page. Scroll down until you see the Add a Child Product Button. Click these and enter the necessary details. In the screen shot below we can see there are three child products added to the main or parent product.

Virtuemart child products - Joomla web design

We need then create a custom field in Virtuemart to display these child products on the product details page of the parent or original product. Navigate to the Custom Fields section in Virtuemart and create a new Custom Field. Choose type as Generic child variant. Check the Cart attribute to yes.

Virtuemart custom field - Joomla web design

We need then associate this custom field with the parent or original product we wish to add the custom values to.Navigate to the original product and select the custom fields tab.

Virtuemart custom fields

You will see a dropdown box Custom Field Type. Choose the name of the Custom fields you created earlier. Save and close the product. Now navigate to that product in the frontend of your web site and you should see a dropdown with the choice of child product you created earlier.

Virtuemart custom fields dropdown

Last modified on Wednesday, 05 December 2012 09:57



  • Comment Link Fintan Sunday, 12 August 2012 07:21 posted by Fintan

    Thank you for the detailed "how to".
    I am setting up a pizza shop where the shopper should be able to choose extra toppings to the base pizza. I need a multiple choice drop down box or a checkbox filed with the extra toppings to choose from. Do child variants support multiple choice? I treid but could only get single choice. I have searched around but foound nothing I could really use. any suggestions are greatly appreciated.

  • Comment Link nav Monday, 26 November 2012 11:48 posted by nav

    I have got same problem when i choose children product in drop down list just like type of products i can go to that child product straight way. but i cant come back again from child to parent product because there is no drop down list option showing to come back in parent page. is there anybody can help me out to sort out this problem help would be a appreciable. thanks

Leave a comment

Make sure you enter the (*) required information where indicated.
Basic HTML code is allowed.

Latest from our blog