lat9 / ZCA-Bootstrap-Template

A Bootstrap-4 template for Zen Cart versions 1.5.8 through 2.1.0. Forked from https://github.com/zcadditions/ZCA-Bootstrap-Template-for-1.5.6-v2.0.0c. See the demo site, below, for additional information.
https://zc158.vinosdefrutastropicales.com/zc158/index.php?main_page=index
GNU General Public License v3.0
4 stars 14 forks source link

zc158 Compatibility, overall changes required #134

Closed lat9 closed 1 year ago

lat9 commented 2 years ago

This issue will identify changes needed for the Bootstrap-4 template to support both zc157 and the upcoming zc158 core. This list will be added to as I discover additional changes required.

Note: Items prefixed by * will also break other templates.

lat9 commented 2 years ago

Noting that the template's override of the core /includes/modules/shipping_estimator.php introduces a slight wonkiness in the state-label display on zc157 when a country doesn't have zones:

image

To prevent that, zc157-based stores can keep the previous template-override file. For zc158, the label's aligned properly albeit with additional whitespace above:

image

lat9 commented 2 years ago

The account_history page now 'hides' the SQL used to gather the customer's previous orders (see this zc158 issue) and results in a set of warning/error logs:

[22-Jul-2022 14:41:31 America/New_York] Request URI: /zc158/index.php?main_page=account_history, IP address: 127.0.0.1
#0 C:\xampp\htdocs\zc158\includes\modules\pages\account_history\header_php_account_history_zca_bootstrap.php(6): zen_debug_error_handler()
#1 C:\xampp\htdocs\zc158\index.php(35): require('C:\\xampp\\htdocs...')
--> PHP Warning: Undefined variable $history_query_raw in C:\xampp\htdocs\zc158\includes\modules\pages\account_history\header_php_account_history_zca_bootstrap.php on line 6.

[22-Jul-2022 14:41:31 America/New_York] Request URI: /zc158/index.php?main_page=account_history, IP address: 127.0.0.1
#0 [internal function]: zen_debug_error_handler()
#1 C:\xampp\htdocs\zc158\includes\classes\db\mysql\query_factory.php(665): trigger_error()
#2 C:\xampp\htdocs\zc158\includes\classes\db\mysql\query_factory.php(632): queryFactory->show_error()
#3 C:\xampp\htdocs\zc158\includes\classes\db\mysql\query_factory.php(273): queryFactory->set_error()
#4 C:\xampp\htdocs\zc158\includes\modules\pages\account_history\header_php_account_history_zca_bootstrap.php(7): queryFactory->Execute()
#5 C:\xampp\htdocs\zc158\index.php(35): require('C:\\xampp\\htdocs...')
--> PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 10' at line 1 ::  LIMIT 10 ==> (as called by) C:\xampp\htdocs\zc158\includes\modules\pages\account_history\header_php_account_history_zca_bootstrap.php on line 7 <== in C:\xampp\htdocs\zc158\includes\classes\db\mysql\query_factory.php on line 665.

since the template's addition to the account_history page 'expects' that raw SQL to be available.

scottcwilson commented 2 years ago

Please let me know what you think from this list should be added to https://docs.zen-cart.com/user/upgrading/release_specific_upgrade_considerations/

(This is for breaking changes only.)

I would add the following:

others?

lat9 commented 2 years ago

I've added a prefixed * to items that will break other templates, too. Many of them are the renaming of language constants so that previous templates are met with a PHP error for the missing definition.