If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / v1.5.7b Not Showing Categories on Main Page

v1.5.7b Not Showing Categories on Main Page

Started by thegoodlifestore on 11 Dec 2020, 2:31 PM · Views: 2,307

Results 1 to 15 of 15
11 Dec 2020, 2:31 PM
#1
thegoodlifestore avatar

thegoodlifestore

New Zenner

Join Date:
Oct 2007
Location:
North Carolina
Posts:
102
Plugin Contributions:
0

Post #1 by thegoodlifestore

Categories do no show on main page when the setting in Layout Settings > Categories - Always Show on Main Page is set to "1". This worked in Zen Cart 1.5.7. I have tried with my custom template and the base Zen Cart template and neither one shows the categories on the main page.

I am no PHP coder but it appears to be an issue with includes > modules > pages > index > header_php.php. When I replaced the 1.5.7b version of this file with the one from 1.5.7 (just to see what would happen), the categories do show on the main page (though the dots separating the rows and columns don't appear).

Not sure if this is a bug or I am being dumb about how to make this work.

Test Site:
https://www.moonrivercardstore.com/test_OPCO/

Zen Cart 1.5.7b
PHP 7.4

11 Dec 2020, 3:02 PM
#2
thegoodlifestore avatar

thegoodlifestore

New Zenner

Join Date:
Oct 2007
Location:
North Carolina
Posts:
102
Plugin Contributions:
0

Post #2 by thegoodlifestore

And here's a link to the current working site:
https://www.baldwinbrassornamentstore.com
Zen Cart 1.5.7ppatch1
PHP 7.2

11 Dec 2020, 4:23 PM
#3
vdecals avatar

vdecals

Zen Follower

Join Date:
Jun 2009
Location:
Sparta, TN
Posts:
166
Plugin Contributions:
0

Post #3 by vdecals

They are working on my desktop Chrome.

My store - closed 12/05/2023
1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

11 Dec 2020, 8:37 PM
#5
vdecals avatar

vdecals

Zen Follower

Join Date:
Jun 2009
Location:
Sparta, TN
Posts:
166
Plugin Contributions:
0

Post #5 by vdecals

Oh! I thought you were referring to the left bar of categories. I don't know how to fix it, but I did F12 both pages and there is quite a difference between the two pages after the:

<body id="indexHomeBody"> ==$0

My store - closed 12/05/2023
1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

11 Dec 2020, 10:56 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #6 by drbyte

Admin->Configuration->Product Listing->Show SubCategories on Main Page while navigating

Compare that setting between your stores.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

14 Dec 2020, 1:06 PM
#7
thegoodlifestore avatar

thegoodlifestore

New Zenner

Join Date:
Oct 2007
Location:
North Carolina
Posts:
102
Plugin Contributions:
0

Post #7 by thegoodlifestore

Admin > Configuration > Product Listing > Show SubCategories on Main Page while navigating is set to "1" on both stores.

14 Dec 2020, 6:17 PM
#8
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,906
Plugin Contributions:
23

Post #8 by dbltoe

The whole centerBoxWrapperContent appears to be missing in the newer site. Is it possible one template was cloned before the settings were updated?

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

14 Dec 2020, 7:14 PM
#9
thegoodlifestore avatar

thegoodlifestore

New Zenner

Join Date:
Oct 2007
Location:
North Carolina
Posts:
102
Plugin Contributions:
0

Post #9 by thegoodlifestore

I did a fresh install of 1.5.7b and a fresh install of the template I am using (lite_grey). I have not messed with the default template. When I switch back and forth between Lite Grey and Classic Contemporary Green, the categories don't show up on the main page. That would indicate to me that something is missing from the core files I installed? Sorry to be a bit dumb about all this.

25 Jan 2021, 8:23 PM
#10
kwright avatar

kwright

Zen Follower

Join Date:
Nov 2004
Posts:
355
Plugin Contributions:
0

Post #10 by kwright

Was there a fix for this?

I'm having the same issue on new localhost install of ZC 157b using a copy of live store db (db was updated to 157b). No top level categories are displayed on main page. If I set a cat ID under Main Page - Opens with Category to one of the other cat IDs, they will display on main page. If set to 0, they do not.

If I use the index page header_php.php from ZC 156, top level categories are displayed correctly on the main page.

Experience is what you get when you don’t get what you want…

25 Jan 2021, 8:36 PM
#11
kwright avatar

kwright

Zen Follower

Join Date:
Nov 2004
Posts:
355
Plugin Contributions:
0

Post #11 by kwright

Same issue with default install of ZC 157b using either of the two default templates and demo products...no top level cats are displayed on index page.

Experience is what you get when you don’t get what you want…

25 Jan 2021, 8:36 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #12 by drbyte

kwright:

Was there a fix for this?
Yes, for v157, v157a, v157b, replace /includes/modules/pages/index/header_php.php with this:
https://raw.githubusercontent.com/zencart/zencart/v157/includes/modules/pages/index/header_php.php

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Jan 2021, 8:50 PM
#13
kwright avatar

kwright

Zen Follower

Join Date:
Nov 2004
Posts:
355
Plugin Contributions:
0

Post #13 by kwright

Thank you DrByte!

Has this been added to the 157b download recently?

Experience is what you get when you don’t get what you want…

25 Jan 2021, 9:11 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #14 by drbyte

kwright:

Thank you DrByte!

Has this been added to the 157b download recently?
No, it'll be part of v157c when it is released.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

28 Jan 2021, 7:32 PM
#15
thegoodlifestore avatar

thegoodlifestore

New Zenner

Join Date:
Oct 2007
Location:
North Carolina
Posts:
102
Plugin Contributions:
0

Post #15 by thegoodlifestore

Thanks for posting the fix! :)