1 Attachment(s)
Re: One-Page Checkout [Support Thread]
Hi lat9,
My understanding is nowhere near yours, so I'd gone and modified to use the original functions as much as possible, giving them modifications for language as needed. I've attached the functions_general.php which is the meat of it all, and one example jscript from the checkout payment page.
The main function called is:
functions/functions_general.php:function zen_js_country_list_default($selectedlanguage, $country, $form, $cfield, $selectedcountry, $showTextField = true, $language='') <- added in attachmend
And it is called in:
modules/pages/login/jscript_addr_pulldowns.php
modules/pages/create_account/jscript_addr_pulldowns.php
modules/pages/address_book_process/jscript_addr_pulldowns.php
modules/pages/checkout_payment_address/jscript_addr_pulldowns.php <- added in attachment
modules/pages/checkout_shipping_address/jscript_addr_pulldowns.php
Multi-language zones is a plugin, using a new table, TABLES_ZONES_NAME, so that would be a major difference I think.
The multi-language zones plugin is currently not official, and when it came out it did not support OPC, so any changes I guess need to be made by myself there.
Apart from that (not sure if countries tables also need changes) I also need to weave in the support for furigana for Japanese users, and the language option to write the address in English or in Japanese format :)
Re: One-Page Checkout [Support Thread]
Thanks for that, @gernot. I'll give that a look-see later today.
1 Attachment(s)
Re: One-Page Checkout [Support Thread]
Hi lat9,
In preparation for migrating my changes to OPC, I checked the original Zen Cart and found I had forgotten something.
The checkout_{payment,billing}_address module does not do the work itself, it calls the tpl_modules_checkout_new_address.php template, which has my modifications in it, and where the onChange jscript is called from. I'm attaching that file here.
Since that is a common file (i.e., common to both modules) it made it easy to manage changes (only one template file for any new address changes in ZC).
To be honest, I haven't managed to follow how you do this in OPC, in includes/modules/pages/checkout_one/header_php.php I presume, but it does not look you are calling the generic tpl_modules_checkout_new_address Zen Cart template (unlike like what happens for create_account, for example). Is all the work happening via javascript there?
I wonder if it might be easier in the long run to use the Zen Cart template here, so people could take advantage of whatever standard Zen Cart version upgrades or personal customizations (even if it is only the order of fields, for example) more seamlessly? Perhaps that this might not be viable, with the way the OPC page opens up up a section to enter the address, but I will ask anyway.
Re: One-Page Checkout [Support Thread]
Ah, I found the template used in OPC for the address block formatting:
tpl_modules_opc_address_block.php
So presumably similar changes to the layout made in the Zen Cart tpl_modules_checkout_new_address.php would need to be implemented here.
Javascript would be a related issue to handle, the scripts being different in OPC if I have that right.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
gernot
Hi lat9,
In preparation for migrating my changes to OPC, I checked the original Zen Cart and found I had forgotten something.
The checkout_{payment,billing}_address module does not do the work itself, it calls the tpl_modules_checkout_new_address.php template, which has my modifications in it, and where the onChange jscript is called from. I'm attaching that file here.
Since that is a common file (i.e., common to both modules) it made it easy to manage changes (only one template file for any new address changes in ZC).
To be honest, I haven't managed to follow how you do this in OPC, in includes/modules/pages/checkout_one/header_php.php I presume, but it does not look you are calling the generic tpl_modules_checkout_new_address Zen Cart template (unlike like what happens for create_account, for example). Is all the work happening via javascript there?
I wonder if it might be easier in the long run to use the Zen Cart template here, so people could take advantage of whatever standard Zen Cart version upgrades or personal customizations (even if it is only the order of fields, for example) more seamlessly? Perhaps that this might not be viable, with the way the OPC page opens up up a section to enter the address, but I will ask anyway.
I'd tried, initially, to make use of the built-in Zen Cart formatting for those addresses but it (like OPC, unfortunately) got complicated since OPC renders both the billing and shipping addresses on a single page.
In OPC, those country/state 'associations' are built by the OPC class-method identified in post #1630. Perhaps, to enable additional customizations, I could include a notification in that method to allow your (and others') changes to override the 'base' OPC rendering.
Re: One-Page Checkout [Support Thread]
I am assuming that this error is related to the fedex rate quote servers taking up to 60 seconds to respond today, followed by an additional 5-10 seconds for the USPS rate quote servers to respond... while, the customer only sees a blank white screen waiting for a response or indication that something is happening.
Code:
[30-May-2020 13:05:45 America/Los_Angeles] Request URI: /index.php?main_page=checkout_shipping, IP address: 108.175.192.91
#1 trigger_error() called at [/home/chainwea/public_html/includes/classes/order.php:363]
#2 order->cart() called at [/home/chainwea/public_html/includes/classes/order.php:48]
#3 order->__construct() called at [/home/chainwea/public_html/includes/modules/pages/checkout_shipping/header_php.php:74]
#4 require(/home/chainwea/public_html/includes/modules/pages/checkout_shipping/header_php.php) called at [/home/chainwea/public_html/index.php:36]
--> PHP Notice: Malformed value for session-based shipping module; customer will need to re-select: false in /home/chainwea/public_html/includes/classes/order.php on line 363.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
RixStix
I am assuming that this error is related to the fedex rate quote servers taking up to 60 seconds to respond today, followed by an additional 5-10 seconds for the USPS rate quote servers to respond... while, the customer only sees a blank white screen waiting for a response or indication that something is happening.
Code:
[30-May-2020 13:05:45 America/Los_Angeles] Request URI: /index.php?main_page=checkout_shipping, IP address: 108.175.192.91
#1 trigger_error() called at [/home/chainwea/public_html/includes/classes/order.php:363]
#2 order->cart() called at [/home/chainwea/public_html/includes/classes/order.php:48]
#3 order->__construct() called at [/home/chainwea/public_html/includes/modules/pages/checkout_shipping/header_php.php:74]
#4 require(/home/chainwea/public_html/includes/modules/pages/checkout_shipping/header_php.php) called at [/home/chainwea/public_html/index.php:36]
--> PHP Notice: Malformed value for session-based shipping module; customer will need to re-select: false in /home/chainwea/public_html/includes/classes/order.php on line 363.
Rick, first that error is coming from the 3-page checkout's 'checkout_shipping' page and second, I don't see such an error in an as-shipped zc156c /includes/classes/order.php.
What additional modifications are present?
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
Rick, first that error is coming from the 3-page checkout's 'checkout_shipping' page and second, I don't see such an error in an as-shipped zc156c /includes/classes/order.php.
What additional modifications are present?
I cannot find a debug file like this prior to installing Dynamic Price Updater and the instances where the file is generated occurs a few moments before the first instance of an OPC logfile. The IP address in the file matches the IP address in the OPC file, so it related to the same customer.
I plan to do a bit more testing after the day gets started around here now that you have pointed me into some direction. There are so many debug warning files generated since updating to 156c that I just tend to ignore all of them until I have reason to look at the specifics.
Other mods (from Mod List)
Flexible Footer
Email Archive Manager
Sitemap XML
OPC
Clone a template
Mod List
DBIO
News Box Manager (to be removed)
SuperData
POSM
OT quantity discount
Shipping
Fedex
USPS
FreeShipper
FreeOptions
Specialty Options (don't remember source)
Payment
Square
Auth.net AIM,SIM, CIM all disabled
Free Order
PayPal
Re: One-Page Checkout [Support Thread]
Not DPU related
It is repeatable
Login to account
Put anything in cart
Go to checkout
Select any USPS option
mydebug file generated
OPC 2.3.0
Re: One-Page Checkout [Support Thread]
It is also repeatable when OPC is set to false.
I've alternated between 156c orders.php and 157 orders.php. 156c orders.php was causing issues shortly after updating to 156c and DrByte suggested using the orders.php from 157 to remedy the issue.
156c version was in-use when the file posted above was generated. AFAIK, it was the as-shipped version.
All said and done, as you said... "not an OPC issue" TNX Cindy