Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Linked products showing twice in product listing


AlfO1951

Recommended Posts

I've searched the forums and even on Google and can't find an answer to the issue I have - I wonder if someone can help. This must have come up before.

 

I have products that are listed in more than one category but are linked so there is only one physical entry in the database.

 

The problem that I have is that when listing the full product list where an item is listed in more than one category it is repeated making it appear that there are actually two identical products in the shop.

 

I've been trying to find the code that selects the items from the database to display and I THINK I need to insert "DISTINCT" within the "select" statement.

 

Do you think I can find it ?

 

Any pointers I would be grateful. This must have come up before somewhere, surely ?

Link to comment
Share on other sites

you need to check which script is used for the "all products" page you mentioned. (see the address bar of your browser) then open the script and see where the sql query is. Change it so it's like "select distinct products_id,......."

Link to comment
Share on other sites

you need to check which script is used for the "all products" page you mentioned. (see the address bar of your browser) then open the script and see where the sql query is. Change it so it's like "select distinct products_id,......."

 

Thanks for that.

 

It confirms that I'm looking at the right file then. Just can't get it to work how I want it. I'll check everything out now I know I'm in the right code.

Link to comment
Share on other sites

  • 4 months later...

I'm also having this problem in ALL product listings other than category listings. Tried to resolve in new_product.php, but since I'm installed SPPC, your info on how you solved this doesn't help because no code is close to that. This did work before SPPC, but I don't know PHP or SQL, so I need clearer instructions to fix this.

 

Please help!

 

Thanks

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...