Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add 'product description' underneath the


Pixxi

Recommended Posts

Hi,

 

I have a lot of products that have names consisting of a code, and so it might not be obvious to customers when they get to the cart/checkout stage that they've added the right items to the cart.

 

I'd like to add the product description beneath the product name in the shopping cart so customers can see they have the right items before they complete the sale.

 

The code that needs adjusting seems to be here in shopping_cart.php:

 

$products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
                      '  <tr>' .
                      '    <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
                      '    <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';

 

and I want to change it (I think...) to something like this:

      $products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
                      '  <tr>' .
                      '    <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], $products[$i]['description'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
                      '    <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . "\n\n" . $products[$i]['description'] . '</b></a>';

 

But I can't see where to define/pick up the 'description' bit - this gives no errors but also no description.

 

Can anyone give me some pointers please?

 

thanks

 

:rolleyes:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...