Much obliged. Catalog invoice has been updated; the template changes are now clearly marked (and the provided template files are from 1.5.7, but it's easy to compare so you can backport.)
Much obliged. Catalog invoice has been updated; the template changes are now clearly marked (and the provided template files are from 1.5.7, but it's easy to compare so you can backport.)
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Thank you. That has made things much better
![]()
I installed this the other day in a store that had 1.5.7 and it was functioning, I upgraded the store to 1.5.7b and it functioned.
Today, on a fresh install of 1.5.7b, when I installed, it causes the client side "My Account" orders to dissappear.
Here is the corresponding log file. I have triple checked to make sure all files uploaded and the template folder named correctly. Please advise any help would be appreciated.
----
[16-Dec-2020 05:17:03 UTC] PHP Fatal error: Uncaught Error: Call to a member function isMobile() on null in /home/feadmin/public_html/******/includes/templates/ntobs20/templates/tpl_account_default.php:16
Stack trace:
#0 /home/feadmin/public_html/*****/includes/templates/ntobs20/common/tpl_main_page.php(195): require()
#1 /home/feadmin/public_html/*****/index.php(94): require('/home/feadmin/p...')
#2 {main}
thrown in /home/feadmin/public_html/*****/includes/templates/ntobs20/templates/tpl_account_default.php on line 16
[16-Dec-2020 05:17:03 UTC] Request URI: /index.php?main_page=account, IP address: *****
--> PHP Fatal error: Uncaught Error: Call to a member function isMobile() on null in /home/feadmin/public_html/*****/includes/templates/ntobs20/templates/tpl_account_default.php:16
Stack trace:
#0 /home/feadmin/public_html/n*****/includes/templates/ntobs20/common/tpl_main_page.php(195): require()
#1 /home/feadmin/public_html/*****/index.php(94): require('/home/feadmin/p...')
#2 {main}
thrown in /home/feadmin/public_html/*****/includes/templates/ntobs20/templates/tpl_account_default.php on line 16.
Seems like your template is looking for "isMobile" functions, but the code providing that feature is not active for your template?
In responsive_classic, the common/main_template_vars.php file provides that.
.
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.
I’m using the Zca responsive template!
Well, somehow your tpl_account_default.php file is NOT the same as the ZCA template. Where did the "isMobile" stuff on line 16 come from?
.
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.
Your guess is as good as mine! I did a fresh install of 1.5.7b, added the zca bootstrap 4 template, added the clone mod. Thats it!
What should it be?
I'll also copy the file from the original zca template and replace... I'll report when I do.
I don't use the clone mod, so I'm only guessing that it copied over stuff it shouldn't have.
.
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.
I downloaded the Catalog Invoice mod, opened the tpl_account_default.php file in the packaged contents.
The "isMobile" content is coming from that file in the catalog invoice tpl file that it replaces.
<?php
/**
* Page Template
*
* Loaded automatically by index.php?main_page=account.<br />
* Displays previous orders and options to change various Customer Account settings
*
* @package templateSystem
* @copyright Copyright 2003-2019 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: Scott C Wilson 2019 Jan 14 Modified in v1.5.6b $
*/
?>
<?php
if (!isset($display_as_mobile)) $display_as_mobile = ($detect->isMobile() && !$detect->isTablet() || $_SESSION['layoutType'] == 'mobile' or $detect->isTablet() || $_SESSION['layoutType'] == 'tablet');
-----
I removed this from the file, and the mod works as its suppose to:
"if (!isset($display_as_mobile)) $display_as_mobile = ($detect->isMobile() && !$detect->isTablet() || $_SESSION['layoutType'] == 'mobile' or $detect->isTablet() || $_SESSION['layoutType'] == 'tablet');"
Last edited by Carbonless; 17 Dec 2020 at 09:49 AM.
Better would be to apply just the mod's changes into your own actual template.
Given the mod was made for 156, comparing the mod's template files against 156's template files, it's easy to see exactly what was added .... and then you can simply add those changes to your own template.
That's better than copying the old 156 template into your 157 site, especially into a template that has a lot of other customizations already.
https://share.getcloudapp.com/wbuKzAZ6
https://share.getcloudapp.com/xQuYql4m
.
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.
Bookmarks