Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product listing


sm00nie

Recommended Posts

Hi all,

 

I was going thorugh the files and I could find which file contains the product listing, in a category, table (where it lists the product, price, and buy now button).

 

Would anyone know where this table is ? I'm looking to re-arrange the order, and possibly remove the buy now button.

 

Thanks in advance,

 

sm00nie :)

Link to comment
Share on other sites

Hi all,

 

I was going thorugh the files and I could find which file contains the product listing, in a category, table (where it lists the product, price, and buy now button).

 

Would anyone know where this table is ? I'm looking to re-arrange the order, and possibly remove the buy now button.

 

Thanks in advance,

 

sm00nie :)

 

 

You can remove teh buy it now button by changing a setting in your admin panel under configuration>productlisting

 

Not sure which file to re-arrange. I will give a look see if I can find it

 

maddie

Link to comment
Share on other sites

If you change the settings in your admin, there is no need to edit any file. The admin area stated above allows you to turn on/off different columns and set what order you want them to appear in.

 

Now if you want to change the layout... such as make it look like the whats new box, or add images (like boxes around each product listing), that is another story.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

I'm looking for which file had the table to edit, because I wanted to insert a another row and have the buy now button listed there.

 

So, I'd have the product_name, price, and description on one <tr>, and I'd have the buy now button (or something else) on a following table row.

Link to comment
Share on other sites

I believe you should be looking in the catalog/includes/modules/product_listing.php

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Do you mean put each product inside of a box? Do you want to use images or just put a box? Can you be a bit more specific? =)

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

http://www.onevideo.co.uk/products_new.php

 

I really want the category listings to look like products new... So a horisontal layout but with the different lines of info on top of each other...

 

My prob at the mo is I have quite long names which fall onto multiple lines because of the colums which looks messy....

 

Chrs!!

 

Rich

Link to comment
Share on other sites

It's a bit more complicated than on the products_new.php

 

You will have to edit the catalog/includes/modules/product_listing.php

I think that is the only way to do it.

 

If you open the page at the bottom have you will see (for an example)

          case 'PRODUCT_LIST_MODEL':
           $lc_align = '';
           $lc_text = ' ' . $listing['products_model'] . ' ';
           break;

The heading - case 'PRODUCT_LIST_MODEL':

cell alignment - $lc_align = '';

text in the cell - $lc_text = ' ' . $listing['products_model'] . ' ';

end of cell - break;

 

Now if you wanted to add something to the model column you would add it to the text line. You could get the code from on that page, in another "case" like case 'PRODUCT_LIST_MANUFACTURER':

 

for an example lets say you want the manufacturers name under the model # you would change the line above to this

 

$lc_text = ' ' . $listing['products_model'] . '<br><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> ';

 

Done't forget that the column order is changed in the admin area under product listing. Between that and moving some code around you can get the look you want.

 

I would suggest making a back up and then just messing around and trying things. Will be the only way to learn and see what does what.

 

There may be other ways to do it, but this is the only way I know how.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Hey Wendy, been tapping away and getting there... Thanks for taking the time to help me out!

 

My problem at the mo is that if I set for example Manufactuer = 0 in the admin (because I dont want it shown twice) it dosnt get shown at all....

 

Any ideas...

 

Rich!

Link to comment
Share on other sites

You could try removing

case 'PRODUCT_LIST_MANUFACTURER':
       $lc_text = TABLE_HEADING_MANUFACTURER;
       $lc_align = '';
       break;

 

and

case 'PRODUCT_LIST_MANUFACTURER':
           $lc_align = '';
           $lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> ';
           break;

 

if you try that just make sure to backup first just incase I am way off. :D

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...