If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading to 2.x.x / tpl_header.php zencart v1.5.7c not working on new zen cart 2.1 installation

tpl_header.php zencart v1.5.7c not working on new zen cart 2.1 installation

Started by globefy on 30 Jul 2025, 5:30 PM · Views: 1,064

Results 1 to 2 of 2
30 Jul 2025, 5:30 PM
#1
globefy avatar

globefy

New Zenner

Join Date:
Jul 2025
Posts:
2
Plugin Contributions:
0

tpl_header.php zencart v1.5.7c not working on new zen cart 2.1 installation

2021 I built a website using zen-cart-v1.5.7c and recently installed zencart-2.0.1 on a new shared hosting server.

Slowly I have been adding some of the old zencart modified lines of codes that were modified but there are a few more lines of code that needs transferring into new version.

TASKS

Copy and paste all old code from includes/templates/responsive_classic/common/tpl_header.php to work in new 2.01 version

Straight copy and paste don't seem to work, can you fix?

The main issues with your tpl_header.php are:

Mobile Detection: ZenCart 2.1 changed how mobile detection works - your $detect->isMobile() calls won't work
CSS Framework: You're using old Foundation classes that conflict with the new Bootstrap 5
Template Structure: Some core functions and paths may have changed

My file has quite a few custom features (balance display, custom dropdown menu, responsive layouts) so It's been recommended to start with the default ZenCart 2.1 header and gradually adding back my customizations one by one.

31 Jul 2025, 2:25 AM
#2
globefy avatar

globefy

New Zenner

Join Date:
Jul 2025
Posts:
2
Plugin Contributions:
0

Re: tpl_header.php zencart v1.5.7c not working on new zen cart 2.1 installation

globefy:

2021 I built a website using zen-cart-v1.5.7c and recently installed zencart-2.0.1 on a new shared hosting server.

Slowly I have been adding some of the old zencart modified lines of codes that were modified but there are a few more lines of code that needs transferring into new version.

TASKS

Copy and paste all old code from includes/templates/responsive_classic/common/tpl_header.php to work in new 2.01 version

Straight copy and paste don't seem to work, can you fix?

The main issues with your tpl_header.php are:

Mobile Detection: ZenCart 2.1 changed how mobile detection works - your $detect->isMobile() calls won't work
CSS Framework: You're using old Foundation classes that conflict with the new Bootstrap 5
Template Structure: Some core functions and paths may have changed

My file has quite a few custom features (balance display, custom dropdown menu, responsive layouts) so It's been recommended to start with the default ZenCart 2.1 header and gradually adding back my customizations one by one.

Old 2022 web archive https://web.archive.org/web/20220210181950/http://www.globefy.co.uk/