VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Development & Testing => Topic started by: santinaki on March 01, 2015, 17:47:08 PM

Title: no custom fields recognized in a product details
Post by: santinaki on March 01, 2015, 17:47:08 PM
hello everyone

i need help in not recognizing custom fields of a product
i have PHP 5.4 vMart 3.0.2 joomla3.3.6

i have put 3 diffrent custom fields in a product (string, list) but when i am doing a wuery in product details/ default.php

  <?php
   if (!empty($product->customfieldsSorted)) {
        echo "djasjkdja";
        $this->position='onbot';
        echo $this->loadTemplate('customfields');
    }
    else {echo "no custom fields";
               
    }

    if (!empty($this->product->customfieldsSorted['onbot'])) {
        echo "djasjkdja";
        $this->position='onbot';
        echo $this->loadTemplate('customfields');
    }
    else {echo "no custom fields";
               
    }
    // Product Custom ontop end
    ?>

and i get no custoom fields as result for the both
I have checked all the options published and active fro custom fields and dont know what else to do
Title: Re: no custom fields recognized in a product details
Post by: GJC Web Design on March 01, 2015, 23:22:47 PM
your already 3 versions behind - http://dev.virtuemart.net/attachments/download/913/com_virtuemart.3.0.6_extract_first.zip i.e. 3.0.6 is the current

the displays of custom fields are done by sublayouts

e.g. echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'onbot'));