I want to modify the shopping cart page so I can see a product description column.
I have been able to modify basket.html.php so that I can see the row heading 'Product Description' by adding the following line:
- Code: Select all
<th class="vmsectiontableheader"><?php echo $VM_LANG->_('PHPSHOP_PRODUCT_DESC') ?></th>
However I cannot get the actual product description data to show in the row.
I have added the following line which I think should call the data but nothing is showing:
- Code: Select all
<td align="left"><?php echo $product['product_desc'] ?></td>
Here is the code associated with this part of the cart:
- Code: Select all
?>
<h1><?php echo $VM_LANG->_('PHPSHOP_CART_TITLE'); ?></h1>
<table width="100%" cellspacing="0" cellpadding="4" border="0" style="border:1px solid #BEBCB7;margin-bottom:10px;">
<tr align="left" >
<th colspan="3" class="vmsectiontableheader"><?php echo $VM_LANG->_('PHPSHOP_CART_NAME') ?></th>
<th class="vmsectiontableheader"><?php echo $VM_LANG->_('PHPSHOP_PRODUCT_DESC') ?></th>
<th class="vmsectiontableheader"><?php echo $VM_LANG->_('PHPSHOP_CART_PRICE') ?></th>
<th class="vmsectiontableheader"><?php echo $VM_LANG->_('PHPSHOP_CART_QUANTITY') ?> / <?php echo $VM_LANG->_('PHPSHOP_CART_ACTION') ?></th>
<th class="vmsectiontableheader"><?php echo $VM_LANG->_('PHPSHOP_CART_SUBTOTAL') ?></th>
</tr>
<?php
$c = 0;
foreach( $product_rows as $product ) {
$c++;
if ($c&1) $i = '2'; else $i='1';
$product['row_color'] = 'sectiontableentry'.$i;
?>
<tr valign="top" class="<?php echo $product['row_color'] ?>">
<td colspan="3"><?php echo $product['product_sku'] ?></td>
<td align="left"><?php echo $product['product_desc'] ?></td>
<td align="left"><?php echo $product['product_price'] ?></td>
<td valign="top" >
<div style="position: relative;">
<?php echo $product['update_form'] ?>
<?php echo $product['delete_form'] ?>
</div>
</td>
<td align="right"><?php echo $product['subtotal'] ?></td>
</tr>
<?php } ?>
Can someone tell me what the obvious thing is I am missing here!
Thanks
Paul