Virtuemart ask seller form with Chronoforms

juwelier-damken 09 Oct, 2014
Hello,

After upgrading to Joomla 2.5.27 and Chronoforms 4 I am trying to adapt this manual http://forum.virtuemart.net/index.php?topic=78886.msg261473#msg261473 to use chronoforms for an ask seller form instead of standard virtuemart ask seller form:


    <?php
    function getProduct($id) {
    $db = & JFactory::getDBO();
       $query = 'SELECT product_name,product_s_desc,product_thumb_image FROM #__vm_product  ' . ' WHERE product_id = ' . $id;
       $db->setQuery($query);
       $product_details = $db->loadRowList();
       return $product_details;
    }
    if(isset($_GET["product_id"])){
      $product = getProduct($_GET["product_id"]);
      $product_name = $product['0']['0'];
      $product_s_desc = $product['0']['1'];
      $product_thumb_image = $product['0']['2'];
    }
    ?>

<input type="hidden" name="productTitle" value="<? echo $product_name; ?>" />
<input type="hidden" name="productDesc" value="<? echo $product_s_desc; ?>" />
<input type="hidden" name="productThumb" value="<? echo $product_thumb_image; ?>" />


But it is not working out. Can anybody help me for Joomla 2.5.27, Virtuemart 2.6.10 and Chronoforms 4.0.1?

Thanks and best regards,
Stephan
GreyHead 10 Oct, 2014
Hi Stephan,

What exactly isn't working? The code is a bit long-winded but looks OK.

Bob
juwelier-damken 10 Oct, 2014
Hi Bob,

I use now the DB Multi Record Loader to load the values from the database which is working perfectly out and much more comfortable🙂

Stephan
This topic is locked and no more replies can be posted.