Forums / Templates, Stylesheets, Page Layout / Question About New Products On Subcategory Pages

Question About New Products On Subcategory Pages

Views: 1,041

Results 1 to 9 of 9
18 Jul 2012, 8:46 PM
#1
scully avatar

scully

Zen Follower

Join Date:
Dec 2010
Posts:
257
Plugin Contributions:
0

Question About New Products On Subcategory Pages

I have a question about the New Products box on my subcategory pages (http://cocosinthevillage.com/zencart/). I hope I'm phrasing this question properly.

On the index page I have New Products for July, and it's working fine. On the subcategory Home Decor, for example (http://cocosinthevillage.com/zencart/index.php?main_page=index&cPath=4) it says "New Products For July - Home Decor" but it shows new products from every category.

I need it to go one way or the other: Either just pick up items from that subcategory (Home Decor) OR be labeled "New Products For July" without specifying "Home Decor." I should probably know how to do it both ways, because I'm not sure which way she's going to want it. Could someone please help me with this?

Thanks!

22 Jul 2012, 1:05 AM
#2
scully avatar

scully

Zen Follower

Join Date:
Dec 2010
Posts:
257
Plugin Contributions:
0

Re: Question About New Products On Subcategory Pages

Anyone? Anyone? Anything? Please? :(

22 Jul 2012, 11:06 AM
#3
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Question About New Products On Subcategory Pages

My stock Zencart installation shows only new products from the selected category, and there's no admin switch I'm aware of that will show products from all categories, so we'd need to know what you have changed/edited that might affect that function.

22 Jul 2012, 11:03 PM
#4
scully avatar

scully

Zen Follower

Join Date:
Dec 2010
Posts:
257
Plugin Contributions:
0

Re: Question About New Products On Subcategory Pages

Steve, I have absolutely no idea. I played around with so many settings while I was trying to create something that she'd like. I don't mind having all the different categories on each page if I can remove the " - Home Decor", etc., from each header. Is that possible, at least?

24 Jul 2012, 10:22 PM
#5
maac2 avatar

maac2

New Zenner

Join Date:
Jan 2011
Posts:
70
Plugin Contributions:
0

Re: Question About New Products On Subcategory Pages

Also not sure why this would happen, none of these products are linked to other categories?

Category A (master category)
SubCategory B (linked category)

Product in both would show in New Products box as "New Products for July - Category A) if you were viewing the SubCategory B page.

Always best to try and understand why something is not working as expected, however you can remove the '- Home Decor' part. It's near the bottom (line 85) of /includes/modules/new_products.php

$title = '<h2 class="centerBoxHeading">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . ($category_title != '' ? ' - ' . $category_title : '' ) . '</h2>';

Highlighted what I think is the relevant part -- if you make any changes, be sure to have a safe backup and use the template override folder!

25 Jul 2012, 1:42 PM
#6
scully avatar

scully

Zen Follower

Join Date:
Dec 2010
Posts:
257
Plugin Contributions:
0

Re: Question About New Products On Subcategory Pages

No, nothing is cross-linked. Not on this cart.

I would very much like to understand why this is happening...maybe it's just something that's normal for this particular template? I don't mind having all products there, I think that helps sell the store better. But not if the header is specific to one category.

So in the meantime, until we can figure out why it's doing this, I will definitely remove the '- Home Decor' part, and that will solve the immediate problem.

THANK YOU!!!

25 Jul 2012, 1:53 PM
#7
scully avatar

scully

Zen Follower

Join Date:
Dec 2010
Posts:
257
Plugin Contributions:
0

Re: Question About New Products On Subcategory Pages

It worked like a charm, thank you! :-) I left the "New Products For July" but removed the category part.

Can you please refresh my memory...how do I leave this "new products" module active for the category pages, but turn it off on the actual product pages (http://cocosinthevillage.com/zencart/index.php?main_page=index&cPath=4 vs http://cocosinthevillage.com/zencart/index.php?main_page=index&cPath=4_6%29? Having the module at the bottom of the second page just makes it too darned long.

Thanks again!!!

25 Jul 2012, 3:15 PM
#8
maac2 avatar

maac2

New Zenner

Join Date:
Jan 2011
Posts:
70
Plugin Contributions:
0

Re: Question About New Products On Subcategory Pages

No problem. As for understanding why this is happening the best way would be to use a program like Beyond Compare (any file comparison software), to compare the new-product files to a fresh download of zen-cart.

The second link is still a product listing rather than the actual product page, and you can control those here: Admin > Configuration > Index Listing
look for 'Show New Products - below Product Listing', setting these to 0 will remove.

25 Jul 2012, 7:14 PM
#9
scully avatar

scully

Zen Follower

Join Date:
Dec 2010
Posts:
257
Plugin Contributions:
0

Re: Question About New Products On Subcategory Pages

That was exactly it, thanks. I knew it saw something simple. But honestly, even after nearly 3 years of building ZenCarts, I stare at those long lists and they blur into utter nonsense, I just can't make sense of them after a few minutes. :blush:

Thank you!!!!!!!!!!!!!