Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New products are not showing up in subcategories...bug?


Dyon

Recommended Posts

Posted

Hi there,

This is a problem for the real OS freaks i guess...

 

As you you know in every categorie you can see the new products , in admin you can change how many new products must be displayed max.

see:

http://www.pcmegastore.nl/catalog/default....b8b9f058628bcc3

 

As soon as you have subsubcategories like this:

 

http://www.pcmegastore.nl/catalog/default....t.php?cPath=1_6 as you see no new products show up because after the left link this comes:

 

http://www.pcmegastore.nl/catalog/default....hp?cPath=1_6_33

here the show up again, because after this upper link are the products

 

so:

when you click in categories on monitor you see this:

CRT Monitor

TFT Monitor

and no products are show (what should i change to see the new items?)

 

then you click on CRT monitor for example and you see this:

17 inch CRT

>17 inch CRT

Here you see the new products

 

I think the problem is because there are to many subcategories in monitors, and the program doesn`t know where to get the new items. It only shows new items if behind it are products an no subcategories.

 

Is this a bug in OS or does anybody has an solution for this? Or is there anyway i can delete the empty "new items"box only for the pages where there are no new items shown?

I hope you guy`s know what i mean cause it's a bit difficult to explain, sorry for that.

Posted

Hi.

The "new products in category" box does not show up in the first subcategory in your example because the subcategories to the first one does not contain products.

The first subcategory seems to contain only two new subcategories, and these two categories contains products.

Therefore the second subcategory will have a new products in this category box, showing the new products in its subcategories.

 

Im sure someone can rewrite is to that the first category will have a "new products in this category" box that shows all new products from all its subcategories.

 

Hehe, I hope someone understood this answer.

I?m not sure even I did, tiht all the categories and subcategories. :roll:

 

/ Henrik (Zipper)

Posted

Hi thanks for your reply,

 

i just installed this contribution:

http://www.oscommerce.com/community/contributions,1382

 

At least now the empty box where the new products should be doesn`t show up anymore, so no empty box anymore, in the subcategories the do show up, so this is already better then a empty box.

 

Maybe someday, somebody makes a contribution that shows the new items of all subcategories (i know what you ment :lol: )

Posted

To make zipper answer simple: you cannot have a product and a sub-categorie in a categorie folder

 

HTH

The_Bear

Posted

Hi,

 

you didn`t understand my problem i think (probaply cause i couldn`t explain the problem right)

 

I dont`want products and subcategories in a categorie folder. I just want subcategories, and in thoose subcategories-> subsub categories. When i do so then in the subcategories no new products are being shown in the "new products for..."box because there are no products in the subcategories but subsubcategories. In the subsubcategories there are new products shown in "new products for..."box because there are products behind (in) the subsubcategories and no subsubsubcategories :roll: This must explain alot :lol:

 

I don`t think anyone but zipper knows what i mean.

 

But anyway The_Bear...thanks for your reply, you helped me more then once with things, thanks to you, zipper and all other great persons answering questions on this forum, i am ready to sell within a week i hope. Keep up the good work :bigups:

Posted

While not trivial, it would be possible to alter things so that the query would return products from the entire category tree. What you would need to do is to add a new table called (for example) categories_enclosing. This would be a category product mapping, similar to products2categories. However, in this case, a category/product pair in the table means that the product is a descendant of the category, i.e. either in the category or in a sub-category of the category (or in a sub-sub-...so on and so forth). Then, instead of querying the products2categories table, you would query this table. The hard part of this would be that you would have to change the admin code to update this table anytime you add a category. Plus, you would have to populate the table for your existing database.

 

You could also do this recursively by checking the current category and all subcategories (without adding anything to the database), but this would create a number of new queries. Particularly if your category structure were relatively deep.

 

Good luck,

Matt

Archived

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

×
×
  • Create New...