Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
Jeff_Mash
Cindy - My site runs on PHP 7.4, but I switched over to PHP 8.1 to test it out and iron out the bugs.
Can you help me resolve this error: --> PHP Warning: Attempt to read property "delivery" on null in includes/classes/OnePageCheckout.php on line 225.
I am running OPC 2.4.6.
I assume the error is a configuration thing on my end, since OPC 2.4.6. came out long after PHP 8.1 was in use.
The code snippet from that version is basically this:
global $order, $db;
$order_country = -1;
$order_country = $order->delivery['country_id'];
That class has change significantly between v2.4.6 and v2.5.1 (the current release). Try changing line 225 to read
PHP Code:
$order_country = $order->delivery['country_id'] ?? false;
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
That class has change
significantly between v2.4.6 and v2.5.1 (the current release). Try changing line 225 to read
PHP Code:
$order_country = $order->delivery['country_id'] ?? false;
I was just coming here to update this! That worked. I had actually changed it to:
PHP Code:
$order_country = $order->delivery['country_id'] ?? null;
But it does the same thing. :)
Re: One-Page Checkout [Support Thread]
After digging through the install process, I believe that under the following circumstances, OPC appears to be drop in.
ZC 2.0
IH
Clone a Template
Bootstrap (and I am using a clone of Bootstrap)
BS4 Slider
I did not see any files that needed to be merged but I wanted a sanity check :O
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
g2ktcf
After digging through the install process, I believe that under the following circumstances, OPC appears to be drop in.
ZC 2.0
IH
Clone a Template
Bootstrap (and I am using a clone of Bootstrap)
BS4 Slider
I did not see any files that needed to be merged but I wanted a sanity check :O
Right, the Bootstrap template already has the CSS needed for OPC interoperation. The only possible change needed are the overrides needed for the order_status page, if that's in use.
Re: One-Page Checkout [Support Thread]
Has the situation changed where OPC's YOUR_TEMPLATE information sidebox needed to be installed prior to that of bootstrap?
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
dbltoe
Has the situation changed where OPC's YOUR_TEMPLATE information sidebox needed to be installed prior to that of bootstrap?
OPC's readme says:
Quote:
- /includes/modules/sideboxes/YOUR_TEMPLATE/information.php (Added in v2.1.3); Note: If you are using the Bootstrap 4 Template, v3.4.0 or later, these changes are already incorporated!
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
g2ktcf
After digging through the install process, I believe that under the following circumstances, OPC appears to be drop in.
Was asking as the two core file changes and the not-needed YOUR_TEMPLATE files when used with bootstrap could create problems if the user does a drop in only. See B under installation in the docs.
lat9 does the best docs. RTFM. Read the full manual.
Re: One-Page Checkout [Support Thread]
zencart 2.0
php 8.3
one_page_checkout-2.5.1
ZC200LangPack_JP_2.0.0[japanese]
Q:
After the module is uploaded, the zencart backend cannot log in, prompting this error.
PHP Code:
--> PHP Fatal error: MySQL error 1364: Field 'entry_telephone' doesn't have a default value :: INSERT INTO address_book (customers_id, entry_firstname, entry_lastname, entry_street_address, entry_country_id, entry_zone_id) VALUES ('2', 'Guest', 'Customer, **do not remove**', 'Default billing address', '107', '293') ==> (as called by) /home/xxx/public_html/includes/functions/database.php on line 134 <== in /home/e99adba/public_html/includes/classes/db/mysql/query_factory.php on line 714.
A:
Update database fields
ALTER TABLE `address_book` CHANGE `entry_telephone` `entry_telephone` VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL;
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
ikirin
zencart 2.0
php 8.3
one_page_checkout-2.5.1
ZC200LangPack_JP_2.0.0[japanese]
Q:
After the module is uploaded, the zencart backend cannot log in, prompting this error.
PHP Code:
--> PHP Fatal error: MySQL error 1364: Field 'entry_telephone' doesn't have a default value :: INSERT INTO address_book (customers_id, entry_firstname, entry_lastname, entry_street_address, entry_country_id, entry_zone_id) VALUES ('2', 'Guest', 'Customer, **do not remove**', 'Default billing address', '107', '293') ==> (as called by) /home/xxx/public_html/includes/functions/database.php on line 134 <== in /home/e99adba/public_html/includes/classes/db/mysql/query_factory.php on line 714.
A:
Update database fields
ALTER TABLE `address_book` CHANGE `entry_telephone` `entry_telephone` VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL;
The entry_telephone field is not in the as-shipped Zen Cart address_book table. Any idea where that field's presence comes from?
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
The entry_telephone field is not in the as-shipped Zen Cart address_book table. Any idea where that field's presence comes from?
I carefully checked all the files and found that this field is in the Japanese language module
HTML Code:
ZC200LangPack_JP\zc_install\sql\plugins\mysql_japanese_install.sql
ZC200LangPack_JP\sql\mysql_japanese_install.sql
in 75 line
ALTER TABLE address_book ADD COLUMN entry_telephone varchar(32) NOT NULL;
ZC200LangPack_JP\zc_install\sql\updates\mysql_upgrade_zencart_200200.sql
ZC200LangPack_JP\sql\mysql_upgrade_zencart_200200.sql
in 75 line
ALTER TABLE address_book ADD COLUMN entry_telephone varchar(32) NOT NULL;
php file using this field:
ZC200LangPack_JP\admin\customers.php
ZC200LangPack_JP\admin-JP\customers.php
ZC200LangPack_JP\includes\classes\Customer.php
ZC200LangPack_JP\includes\classes\order.php
ZC200LangPack_JP\includes\functions\functions_addresses.php
ZC200LangPack_JP\includes\modules\checkout_new_address.php
ZC200LangPack_JP\includes\modules\pages\address_book_process\header_php.php