Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
archelaus
OPC 2.0.5 and ZC 1.5.6a. I hate to waste people's time with something I should be able to figure out by myself, but I'm stumped. In guest checkout, the customer's billing address is pre-filling with the state/province listed for the store in Configuration>My Store and the zip code listed for the store in Configuration>Shipping/Packaging. I'm okay with it defaulting to USA, but I'd like state and zip code to be blank. I'm not seeing anything in Configuration>One-Page Checkout Settings, and the code in tpl_modules_opc_address_block.php is over my head. Thanks in advance!
That pre-filling of country/state/postcode was introduced in OPC 2.0.1 to address the issue where some shipping modules (like USPS) don't send back quotes and, to my remembrance, also throw debug-logs if those fields aren't present in the 'order-object' when the shipping-modules are loaded. See this (https://github.com/lat9/one_page_checkout/issues/133) issue for additional information.
If it's important for you to not pre-fill those fields, you could make store-specific changes to the OnePageCheckout.php class-file, backing out the changes provided in the issue referenced above. Just remember, if you choose to, that you'll need to merge those changes into that class-file whenever you update your version of OPC.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
That pre-filling of country/state/postcode was introduced in
OPC 2.0.1 to address the issue where some shipping modules (like USPS) don't send back quotes and, to my remembrance, also throw debug-logs if those fields aren't present in the 'order-object' when the shipping-modules are loaded. See this (
https://github.com/lat9/one_page_checkout/issues/133) issue for additional information.
If it's important for you to not pre-fill those fields, you could make store-specific changes to the
OnePageCheckout.php class-file, backing out the changes provided in the issue referenced above. Just remember, if you choose to, that you'll need to merge those changes into that class-file whenever you update your version of
OPC.
That did the trick! Many thanks. I'm not using any of those shipping modules, and I have relatively few customers in DC (population 700,000), and almost none in my actual zip code, so I really did want to get rid of the pre-fills.
Re: One-Page Checkout [Support Thread]
I need help, i am getting "Your order's details have changed. Please review the current values and re-submit." error message.
I am using zencart 1.5.5e . Can some one help me?
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
MrSteeiii
I need help, i am getting "Your order's details have changed. Please review the current values and re-submit." error message.
I am using zencart 1.5.5e . Can some one help me?
Sure, but I'll need a little more information:
What version of One-Page Checkout?
What template are you using?
What payment-module was chosen?
What shipping-module was chosen?
What order-total modules are applied to the order (before you click the Submit button)?
Was the order being placed for a customer with an account or was this using the Guest Checkout?
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
Sure, but I'll need a little more information:
1.What version of One-Page Checkout?
2.What template are you using?
3.What payment-module was chosen?
4.What shipping-module was chosen?
5.What order-total modules are applied to the order (before you click the Submit button)?
6.Was the order being placed for a customer with an account or was this using the Guest Checkout?
0.I Changed zencart version to 1.5.6
1.one_page_checkout-2.0.5
2.Template: yourstore
3.Check/Money Order I removed from Guest Disallowed Payment Methods tab for testing purpose.
4.Default (Flat Rate Best Way, Flat Rate Best Way, Store Pickup Walk In.
5.Default
6. I tryed both ways as a guest and as a customer.
I have to figure it out. Thanks for your reply lat9.
Re: One-Page Checkout [Support Thread]
Zen Cart 1.5.6a
OPC 2.0.5
When placing an order, I get this error:
[07-Mar-2019 07:41:05 America/Chicago] Request URI: /index.php?main_page=checkout_one, IP address:
#1 require(/home/XXXX/public_html/includes/templates/template_default/templates/tpl_modules_opc_credit_selections.php) called at [/home/XXXX/public_html/includes/templates/template_default/templates/tpl_checkout_one_default.php:67]
#2 require(/home/XXXX/public_html/includes/templates/template_default/templates/tpl_checkout_one_default.php) called at [/home/XXXX/public_html/includes/templates/XXXX/common/tpl_main_page.php:146]
#3 require(/home/XXXX/public_html/includes/templates/XXXX/common/tpl_main_page.php) called at [/home/XXXX/public_html/index.php:97]
--> PHP Warning: Invalid argument supplied for foreach() in /home/XXXX/public_html/includes/templates/template_default/templates/tpl_modules_opc_credit_selections.php on line 44.
If it matters....site was upgraded from 1.5.4. OPC was not installed previously. Using a custom template.
Re: One-Page Checkout [Support Thread]
As I keep playing with this excellent plugin, I've come up with a suggestion for a very minor improvement:
If you change line 25 of tpl_modules_opc_address _block.php from
if (count($address_selections) != 0) {
to
if (count($address_selections) > 2) {
customers will see the dropdown list of previously defined addresses only when there's actually more than one address for them to choose from. (It's > 2 rather than > 1 because the "Select from saved addresses" line counts as an address.)
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
MrSteeiii
0.I Changed zencart version to 1.5.6
1.one_page_checkout-2.0.5
2.Template: yourstore
3.Check/Money Order I removed from Guest Disallowed Payment Methods tab for testing purpose.
4.Default (Flat Rate Best Way, Flat Rate Best Way, Store Pickup Walk In.
5.Default
6. I tryed both ways as a guest and as a customer.
I have to figure it out. Thanks for your reply lat9.
Per the plugin's readme, the YourStore template is known to be incompatible with One-Page Checkout.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
archelaus
As I keep playing with this excellent plugin, I've come up with a suggestion for a very minor improvement:
If you change line 25 of tpl_modules_opc_address _block.php from
if (count($address_selections) != 0) {
to
if (count($address_selections) > 2) {
customers will see the dropdown list of previously defined addresses only when there's actually more than one address for them to choose from. (It's > 2 rather than > 1 because the "Select from saved addresses" line counts as an address.)
Good catch! I've opened an issue on OPC's GitHub repository to track the change (https://github.com/lat9/one_page_checkout/issues/171).
I'll note, though, that dropdown list should be shown if the customer has more than 1 (not 2) addresses previously recorded.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
jeking
Zen Cart 1.5.6a
OPC 2.0.5
When placing an order, I get this error:
[07-Mar-2019 07:41:05 America/Chicago] Request URI: /index.php?main_page=checkout_one, IP address:
#1 require(/home/XXXX/public_html/includes/templates/template_default/templates/tpl_modules_opc_credit_selections.php) called at [/home/XXXX/public_html/includes/templates/template_default/templates/tpl_checkout_one_default.php:67]
#2 require(/home/XXXX/public_html/includes/templates/template_default/templates/tpl_checkout_one_default.php) called at [/home/XXXX/public_html/includes/templates/XXXX/common/tpl_main_page.php:146]
#3 require(/home/XXXX/public_html/includes/templates/XXXX/common/tpl_main_page.php) called at [/home/XXXX/public_html/index.php:97]
--> PHP Warning: Invalid argument supplied for foreach() in /home/XXXX/public_html/includes/templates/template_default/templates/tpl_modules_opc_credit_selections.php on line 44.
If it matters....site was upgraded from 1.5.4. OPC was not installed previously. Using a custom template.
See this (https://github.com/lat9/one_page_checkout/issues/165) GitHub issue; let me know if that corrects the issue when a store doesn't have ot_gv enabled.
There was a change made for zc156 such that an empty array (instead of false) is being returned in that case, that's what the change for that issue addresses.