by Bhumi // Nov 23,2012 // No comment
In this tutorial series,today I am going explain about how you can do customization in child product drop-down display in product detail page like in below screen.

Attributes are the features of a product like Color, Size.Products that have multiple sizes or colours you can manage those product by using child product option in virtuemart.In frontend, Drop-down display for child product as attribute we assigned to product to particular actual product.
Let’s see how you customize that drop-down box in frontend.
Here, I am going to place “Sold Out” text instead of Price in drop-down if child product is out of stock
First of all,go to the folder and path is administrator/components/com_virtuemart/classes and next select ps_product_attribute.php file
Next, find the below line of code into the file
|
1 2 |
$html .= ' - ' . $CURRENCY_DISPLAY->getFullValue( $price["product_price"] ) ; |
and place below code instead of this
|
1 2 3 4 5 6 7 8 9 10 |
$productID = $db->f( "product_id" ); $sql = "SELECT product_in_stock FROM #__vm_product WHERE product_id=$productID" ; $db->setQuery( $sql ) ; $res = $db->loadResult(); if($res <='0'){ $html .= '- Sold Out'; }else{ $html .= ' - ' . $CURRENCY_DISPLAY->getFullValue( $price["product_price"] ) ; } |
That’s it.Now you have your own dropdown for child product in virtuemart.
Thanks for reading and feel free to share your thoughts! Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.
Recently I am working on one project and i wanted to provide sorting save and edit option to the title in joomla website. In this READ MORE
Warning :Cannot find Joomla XML Setup file
Joomla is a one of the most popular open source CMS and i know you all the latest version of Joomla 3 has some great READ MORE
To disable component on front page in Joomla
I think this is one of the common problem you’ll face while you’re working for the website of joomla because the component always display at READ MORE
Free shipping for specific Country in Virtuemart Joomla
Recently I was working in Joomla application and application have shipping functionality and I want to limit free shipping for specific country in Virtuemart component READ MORE
Here is one quick article about to use Template Parameter in Joomla.You can change the functionality of template with the use of template parameters which READ MORE
Be a Contributor at CreativeDev.Write an article or tutorial to the community and share some of your knowledge!