Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding info to sub-category page


jackrabbit

Recommended Posts

I asked this question about a week ago and got no response for some reason so I'm asking again.

 

I need to add the manufacturer number to the products when they show up on the sub-category landing page. I know that all I need to do is add a little bit of code that grabs the info from the db and plops it onto the html page. But I scoured through as much php code as I could to try and decipher it all on my own. But I can't and I'm asking for someone to help out.

 

I just need to know what to add and where to add it so that in addition to the product name, price, and image the manufacturer's id shows up as well. Any help or even pointing me in the right direction would be greatly appreciated.

 

Thanks. Be well.

;-j

Link to comment
Share on other sites

I asked this question about a week ago and got no response for some reason so I'm asking again.

 

I need to add the manufacturer number to the products when they show up on the sub-category landing page. I know that all I need to do is add a little bit of code that grabs the info from the db and plops it onto the html page. But I scoured through as much php code as I could to try and decipher it all on my own. But I can't and I'm asking for someone to help out.

 

I just need to know what to add and where to add it so that in addition to the product name, price, and image the manufacturer's id shows up as well. Any help or even pointing me in the right direction would be greatly appreciated.

 

Thanks. Be well.

;-j

What happens if you login to the backend, go configuration - Product Listing - Display Product manufacturer - edit and change to 1 or 2

Link to comment
Share on other sites

I asked this question about a week ago and got no response for some reason so I'm asking again.

 

I need to add the manufacturer number to the products when they show up on the sub-category landing page. I know that all I need to do is add a little bit of code that grabs the info from the db and plops it onto the html page. But I scoured through as much php code as I could to try and decipher it all on my own. But I can't and I'm asking for someone to help out.

 

I just need to know what to add and where to add it so that in addition to the product name, price, and image the manufacturer's id shows up as well. Any help or even pointing me in the right direction would be greatly appreciated.

 

Thanks. Be well.

;-j

 

 

just some general pointers here. you'll have to figure it out, but it shouldn't be too hard.

 

in index.php you'll have to find the section that says: elseif ($category_depth == 'products') {blah,blah..

 

inside that you'll have to modify:

 

1. $define_list = array(blah,blah...) to include the manufacturer number

 

2. then modify the switch: switch ($column_list[$i]) {blah,blah... so that it contains a case for the manufacturer number

 

3. then check the database query: $listing_sql = "select " . blah,blah... and make sure the query is pulling the information you need (manufacturer number). there are actually two queries to check here

 

4. then there is another switch to add a case to: switch ($column_list[$sort_col-1]) {blah,blah...

 

i think that's it for index.php.

 

then you'll have to modify catalog/includes/modules/product_listing.php

 

basically, there are two switches that you'll need to add a case for. these are a little complicated, but you can basically model them on the cases that are already there.

 

sorry that this isn't more specific, but my own site is so very heavily modified that i can only give you the general outline. but it shouldn't be too hard to sort out.

 

this may also require defining some of the constants that the cases refer to.

 

 

cheers,

rj

Link to comment
Share on other sites

just some general pointers here. ... clip ... rj

 

i just read blokes reply and realized that i may have misunderstood the question. my answer was a general guideline to how to add something to the product listing that is not already built into osC.

 

as bloke suggested, the built in things can be controlled in admin->configuration->product listing. this doesn't require any php coding.

 

if you want to add something totally new, my instructions are a guideline to the necessary coding. this may also require adding a field or two to one or several of the existing tables, but i guess i was assuming you already had what you needed somewhere in your DB.

 

rj

Link to comment
Share on other sites

i just read blokes reply and realized that i may have misunderstood the question. my answer was a general guideline to how to add something to the product listing that is not already built into osC.

 

as bloke suggested, the built in things can be controlled in admin->configuration->product listing. this doesn't require any php coding.

 

if you want to add something totally new, my instructions are a guideline to the necessary coding. this may also require adding a field or two to one or several of the existing tables, but i guess i was assuming you already had what you needed somewhere in your DB.

 

rj

 

Thanks rrrhythm. Your response was exactly what I was shooting for! I have not tried it out yet, but I will. Thanks again, I was just looking for the general tools needed to edit the php/db interaction.

 

be well.

;-j

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...