Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product List Structure Modification


sakitram

Recommended Posts

Posted

In the product listing page, I added one more column to be shown. Now I see all the contents.

But I want to modify the structure of showing each product.

 

For example: current the product records showin page as

 

COLUMN 1 == COLUMN 2 == COLUMN 3

<prod img> = <prod name> = <prod desc>

<prod img> = <prod name> = <prod desc>

<prod img> = <prod name> = <prod desc>

<prod img> = <prod name> = <prod desc>

 

 

Now I want to alter the table structure to show as follows

COLUMN 1 == COLUMN 2

<prod img> = <prod name>

<prod desc> (column1 of each row should be spanning two rows)

 

 

If someone could tell me how to do this, it would be great help to me.

Thank you,

Sakitram

Posted

it would be easier to help if I had some code to check :)

you can alway use something like:

<td>pic</td><td>name</td><tr>

<td rowspan="2">desc</td>

Posted
it would be easier to help if I had some code to check :)

you can alway use something like:

<td>pic</td><td>name</td><tr>

<td rowspan="2">desc</td>

 

 

Yes, sorry for making confusion and late reply.

 

<tr><td rowspan=2>pic</td><td>prod name</td></tr>

<tr><td>prod desc</td></tr>

 

Sakitram

Posted

But if you want the product description to be over the whole bottom part you got to use rowspan on the td for the product description.

Posted

Yes, of-course. Then I have to modify the tableBox class. And then all boxes in oscommerce page will also be affected regarding to this, as it is the base class. So I need guidance to get the result.

  • 1 month later...
Posted
either you can add another table inside the table or you could close the table and make another one.

 

So did someone answer this which files need to be modifed, Im looking into product_listing.php a pain to modify..

  • 6 months later...
  • 2 weeks later...
Posted
So where do we put the tables code written above? Is it on the product_listing.php?

 

thanks

Hi!

you can modify this line in product_listing.php

 

case 'PRODUCT_LIST_IMAGE':

$lc_align = 'center';

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']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';

} else {

$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';

}

break;

 

and install contribs short description

 

And try to make the code like this but i´m not sure beacuse i have contribs for making the products in columns so my file is product_listing_col.php

 

case 'PRODUCT_LIST_IMAGE':

$lc_align = 'center';

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']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br> ' . $listing['short_desc'] . ' ';

} else {

$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br> ' . $listing['short_desc'] . ' ';

}

break;

 

Regards Tony

Archived

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

×
×
  • Create New...