Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hi,

 

I want to show product description at product listing page.

 

I have seen some contributions about how to add a short description at product listing page.All of those contributions involved some modification of the database structure.

 

But I don't want to change the database structure.

 

Could anybody tell me how can I add a description at the product listing page without modifying database structure!

Thanks in advance

Shahin

Posted
Hi,

 

I want to show product description at product listing page.

 

I have seen some contributions about how to add a short description at product listing page.All of those contributions involved some modification of the database structure.

 

But I don't want to change the database structure.

 

Could anybody tell me how can I add a description at the product listing page without modifying database structure!

Thanks in advance

Shahin

 

That depends. If you want to show something different from your normal product description you are stuck to something new. If a part from the orignal product description would do then you can just add that underneath the product name in your product listing. You can see a very rudimentary example on my shop as I kept it simple and just show the first 60 characters from the normal product description without checking for line breaks, if I am in the middle of a word or anything.

Look in your catalag/modules/product_listing.php for

          case 'PRODUCT_LIST_NAME':
           $lc_align = '';
           if (isset($HTTP_GET_VARS['manufacturers_id'])) {
             $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> <br><br> ' . substr($listing['products_description'],0,60) . '...';
           } else {
             $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> <br><br> ' . substr($listing['products_description'],0,60) . '...';
           }
           break;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...