Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New_products module whaen acategory is 2 levels deep


diy

Recommended Posts

Suppose your categoriew are 2 levels deep

 

ie category A has 2 sub categories 1 and 2 and each subcategory has two subgategories a and b

 

When you are at path A1 or A2 the new products for month box is empty!!! it appears full when you are at A1a or A1b etc!

 

What can we do to overcome this

 

PS the code somewhere says that new_products should be shown when we are at the deepest category so at A1 we arent what can we change??

 

If I use featured instead of new products module will something come up when i am at A1

Link to comment
Share on other sites

index.php has three levels it displays depending on where you are in the catalog. There is the main level or the first page in the catalog. There is the category level and the product level. It sound like the new products only appear in the product level. Remember to backup before making any changes. Here is the code that displays the new products:

 

<?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>

 

You want to place under this code

 

  $new_products_category_id = $current_category_id;
?>
		  </tr>
		</table></div></td>
	  </tr>

 

So it might look like:

 

  $new_products_category_id = $current_category_id;
?>
		  </tr>
		</table></div></td>
	  </tr>
	  <tr><td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td></tr>

 

 

Suppose your categoriew are 2 levels deep

 

ie category A has 2 sub categories 1 and 2 and each subcategory has two subgategories a and b

 

When you are at path A1 or A2 the new products for month box is empty!!! it appears full when you are at A1a or A1b etc!

 

What can we do to overcome this

 

PS the code somewhere says that new_products should be shown when we are at the deepest category so at A1 we arent what can we change??

 

If I use featured instead of new products module will something come up when i am at A1

Shade and Sweet Water

Chris Czerniak

Link to comment
Share on other sites

index.php has three levels it displays depending on where you are in the catalog. There is the main level or the first page in the catalog. There is the category level and the product level. It sound like the new products only appear in the product level. Remember to backup before making any changes. Here is the code that displays the new products:

 

the point is that a have ANOTHER category so I have catalog category SUbcategory and then product!!!

 

New products show when i am at the subcategories but not when I am on categories (there is a heading new products for but no products)

 

Just thinking if its possible to show some new products (but i have to point the program to a product listing not another category) or should i reorganise my database!!

Link to comment
Share on other sites

If I looked at the correct site, I went through all of your categories and subcategories. Everything seems to be working the way it should.

 

Could you give us an address along with which category/subcategory is giving you problems?

Link to comment
Share on other sites

If I looked at the correct site, I went through all of your categories and subcategories. Everything seems to be working the way it should.

Could you give us an address along with which category/subcategory is giving you problems?

 

 

thanks for posting! You did look at a correct site (actually i was referring to another but they share part of the same database) but I have "deleted" (made red) the products in those categories and the categories are not shown.

 

As cczernia and you say at another thread index.php has 3 levels of showing default-category-product listing and I am looking for default-category-subcategory -product listing

 

Cant point to an adress right now, but in about 2 weeks I will

 

regards

Link to comment
Share on other sites

Yesw the index page is broken into parts. Your problem most likely is not there though. When viewing the new products, the part you seem to be having problems with, that is brought in from catalog/includes/modules/new_products.php. When viewing the product listing that is brought in from catalog/includes/modules/product_listing.php.

 

Be careful trying to make changes though if you're not sure what you're doing. It's kind of hard to tell whats what without being able to see what the problem acutally is. In a couple of weeks when you can show us, let us know and we can better help you out.

Link to comment
Share on other sites

  • 1 month later...

Again my datdase is set up as root-categories-subcategories

 

Here goes a link

 

this is the ink

 

It takes you to the category where there are no products in the new products module if you go up (to catalog) you see general new products if you go down (to subcategory) again you see.

 

is it possible to make a change an show some new products when i am in the subcategory??

Link to comment
Share on other sites

You have no products in this category:

http://www.marketink.gr/zzzpipini/index.php?cPath=40

What you do have is further subcategories.

 

If you click into the Συμβατα-Ανακατασκευασμενα category, then you can see some products (in the Νέα Προιόντα Για Σεπτέμβριος box):

http://www.marketink.gr/zzzpipini/index.php?cPath=40_55

 

A category or a sub category or a sub-subcategory etc etc can contain EITHER further subcategories OR products, not both.

Link to comment
Share on other sites

In other words for the new products module to work the categories must be 1 level deep (root-category-products)(??)

 

So i guess I MUST change how my database is organized or replace new_products module with featured!!

Link to comment
Share on other sites

After a lot of searching I found the solution

 

first I used random products contrib but unfortunately some ghost products came up (apparently my template came with some test products - those were not deleted correctly and are now and forever (??) on my database)

 

then i actually found a (very old) contrib that is said to work for M2.2 but works also in RC2

 

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

 

and another one

 

http://www.oscommerce.com/community/contri...ns,3546/page,58 (use the original one)

 

Anyway the contribs work and they will help if you decide to have very deep subcategories.

 

PS Not showing the new products at all -when you are at a subcategory with further subcategories- seems a good solution (especially if you have a LOT of categories) but I dont know how to get there!1

Link to comment
Share on other sites

  • 3 months later...

Archived

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

×
×
  • Create New...