Easy Inventory Control support

Please post your issues and questions about One Page Checkout for Virtuemart 2 to this forum.

Easy Inventory Control support

Postby admin » Thu Jun 13, 2013 4:46 pm

Dear friends, in case you are using Easy Invetory Control and you'd like to use it's special attributes per product within the cart view, you have to do a few modifications within your basket.html.php OPC theme file:

each OPC basket.hml.php theme includes a line
Code: Select all
foreach( $product_rows as $product ) {


right after this line, pls add the attributes:
Code: Select all

// attribute tester
$desc = '';
for ($i=2; $i<=40; $i++)
{
   $attr = 'attr'.$i;
   $attr_title = 'attr'.$i.'_title';
if (!empty($product['product']->{$attr}))
{
   if (!empty($desc)) $desc .= '<br />';
   $desc .= $product['product']->{$attr_title}.': '.$product['product']->{$attr};
}
}

//



This will create a custom $desc variable which can be then printed for example further below in:

Code: Select all
<div class="op_col2_2"><?php echo $product['product_name'] . $product['product_attributes'];
   if (!empty($desc))
   {
      echo '<br />'.$desc;
   }
   ?>&nbsp;<br />


Best Regards,
Stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

Return to One Page Checkout for Virtuemart 2