News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

generic child variant custom field on category page

Started by godfather21, April 23, 2013, 08:41:17 AM

Previous topic - Next topic

godfather21

Hello to all!!
I am trying to display a generic child variant custom field on category product page but with no luck.I had tried everything that is mentioned on this forum but with no success.
<?php
//MY EDIT STARTS HERE
//make a database connection and find the field record that contains the customfield string
$db JFactory::getDBO();
//please do check in php myadmin how your database table is called and replace it instead of "VM2_virtuemart_product_customfields"
$db->setQuery('SELECT custom_param FROM r1upl_virtuemart_product_customfields WHERE virtuemart_product_id='.$product->virtuemart_product_id.';');
$db->query();
$result $db->loadResult();
//$result is the custom field output
//check to see if there is a customfield mentioned
echo "<span class=\"product_s_desc\">".$result."</span>";  
?>


This is what i tried and i get withParent="1"|parentOrderable="1"|
VM 2.0.20B JOOMLA 2.5.7

[attachment cleanup by admin]