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

Compare product

Started by devkbsc, July 24, 2012, 13:35:25 PM

Previous topic - Next topic

devkbsc

Hello,

I am trying to code compare product in cart page. I have coded as below:

<h3>Comparaison des Programmes</h3>

<table width="623" border="0" cellspacing="1" cellpadding="0">
  <tr>
    <th width="200"><div align="left"></div></th>
    <th width="17" rowspan="9"><?php
      $i=1;
      foreach( $this->cart->products as $pkey =>$prow ) { ?></th>
    <th width="300" bgcolor="#EAEAEA"><div align="center"> <?php echo $prow->product_name; ?></div></th>
 
   
   <th width="17" rowspan="9"><?php }?></th>
  </tr>
  <tr>
    <th width="200"><h5 align="left">Code de Programme</h5></th>
    <td width="300"><?php echo $prow->product_sku; ?></td>
  </tr>
  <tr>
    <th width="200"><h5 align="left">Objecif</h5></th>
    <td width="300"><?php $this->product->product_s_desc; ?></td>
  </tr>
  <tr>
    <th width="200"><h5 align="left">Description</h5></th>
    <td width="300"><?php $prow->product_desc; ?></td>
  </tr>
  <tr>
    <th width="200"><h5 align="left">Les Plus</h5></th>
    <td width="300"><?php ?></td>
  </tr>
  <tr>
    <th width="200"><h5 align="left"><?php echo JText::_('COM_VIRTUEMART_DURATION'); ?></h5></th>
    <td width="300"><?php ?></td>
  </tr>
  <tr>
    <th width="200"><h5 align="left">Date&amp;Lieu</h5></th>
    <td width="300">&nbsp;</td>
  </tr>
  <tr>
    <th width="200"><h5 align="left">Formateur</h5></th>
    <td width="300">&nbsp;</td>
  </tr>
  <tr>
    <th width="200"><h5 align="left">Type de Module</h5></th>
    <td width="300">&nbsp;</td>
  </tr>
</table>



the result of the source code is attached img.
, manu
My question is how to fetch the other field of the product such as description, short description, and few custom fields of the product, and also the product manufacturer name?

Any clue, Please reply me. Thank you

[attachment cleanup by admin]

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

devkbsc

Excuse Sir,

I don't have money to buy this extention! thats i am trying to code my self. Would please give any suggestion to get the product field in the cart page? i have already found the two field

- product name
- product sku.

but not the others. At the same time what are product added cart will only display in the comparison table.