Zen Cart Logo
Forums / All Other Contributions/Addons / One-Page Checkout [Support Thread]

One-Page Checkout [Support Thread]

Views: 629,431

Results 1,081 to 1,100 of 3,078
6 Mar 2019, 12:13 PM
#1081
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

One-Page Checkout [Support Thread]

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.

6 Mar 2019, 2:20 PM
#1082
archelaus avatar

archelaus

New Zenner

Join Date:
Jul 2008
Posts:
24
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

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.

6 Mar 2019, 7:20 PM
#1083
mrsteeiii avatar

mrsteeiii

New Zenner

Join Date:
Mar 2019
Posts:
4
Plugin Contributions:
0

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?

6 Mar 2019, 8:03 PM
#1084
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

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?

7 Mar 2019, 7:54 AM
#1085
mrsteeiii avatar

mrsteeiii

New Zenner

Join Date:
Mar 2019
Posts:
4
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

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.

7 Mar 2019, 1:55 PM
#1086
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

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.

7 Mar 2019, 7:00 PM
#1087
archelaus avatar

archelaus

New Zenner

Join Date:
Jul 2008
Posts:
24
Plugin Contributions:
0

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.)

7 Mar 2019, 9:50 PM
#1088
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

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.

8 Mar 2019, 1:45 PM
#1089
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

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.

8 Mar 2019, 1:55 PM
#1090
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

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.

8 Mar 2019, 2:04 PM
#1091
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

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.

Thanks. I've applied the change and will check back to see if the error goes away.

8 Mar 2019, 5:34 PM
#1092
archelaus avatar

archelaus

New Zenner

Join Date:
Jul 2008
Posts:
24
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

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.

Hmm. When I did it, I had to set it to 2 for it to work. I concluded that it was counting "Select from saved addresses" as an address.

8 Mar 2019, 7:13 PM
#1093
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

archelaus:

Hmm. When I did it, I had to set it to 2 for it to work. I concluded that it was counting "Select from saved addresses" as an address.
Arggh, you're quite right; let me get that corrected on GitHub.

11 Mar 2019, 2:48 PM
#1094
mrsteeiii avatar

mrsteeiii

New Zenner

Join Date:
Mar 2019
Posts:
4
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

Per the plugin's readme, the YourStore template is known to be incompatible with One-Page Checkout.

Yes I know that, but still I think I can make it work. Yourstore support offered me to install this plugin for alot of money. This template use unique method to show header and I think this is the main think why plugin isn't working properly. With your knowledge I think it's possible to merge those two files. But maybe you know better where is the problem. Thanks

11 Mar 2019, 3:41 PM
#1095
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

MrSteeiii:

Yes I know that, but still I think I can make it work. Yourstore support offered me to install this plugin for alot of money. This template use unique method to show header and I think this is the main think why plugin isn't working properly. With your knowledge I think it's possible to merge those two files. But maybe you know better where is the problem. Thanks
The **YourStore **template (and its ThemeForest siblings) gave me quite the headache when I investigated the interoperability a couple of years ago. It's not something that I'm willing to offer as a free service.

12 Mar 2019, 12:10 PM
#1096
mrsteeiii avatar

mrsteeiii

New Zenner

Join Date:
Mar 2019
Posts:
4
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

The **YourStore **template (and its ThemeForest siblings) gave me quite the headache when I investigated the interoperability a couple of years ago. It's not something that I'm willing to offer as a free service.

I am willing to pay some money for your help. Can you tell me how much this can cost for me?

12 Mar 2019, 12:26 PM
#1097
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

MrSteeiii:

I am willing to pay some money for your help. Can you tell me how much this can cost for me?
PM (Private Message) sent.

12 Mar 2019, 5:20 PM
#1098
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

:beta:I've completed the changes for One-Page Checkout, v2.1.0, and have packaged up v2.1.0-beta5 for download from the plugin's GitHub repository. **Do not deploy this on a live site!

**I'd appreciate any/all beta-testing that the community can provide, especially with respect to the installation/upgrade documentation ... which has changed significantly. Please report any issues found (or suggestions for improvement) as GitHub issues on that repository.

1 Apr 2019, 5:10 PM
#1099
linuxguy2 avatar

linuxguy2

Zen Follower

Join Date:
Sep 2013
Location:
Texas
Posts:
315
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

PHP 7.2
ZC 156a
OPC v2.1.0-beta5

I've been testing with this build but I'm only using "PO Number Payment and Flat Rate Shipping" so I'm not covering the corner cases.
The documentation seems to be OK if you read it carefully.

The only issue I have is:
The "Shipping Address" drop list on the checkout page is listing the addresses in the order I entered them NOT in any alphabetical order.

Googled and checked the forums but can't come up with a solution.

Any clues on how to make that sort on Company name would be appreciated.

Thanks

1 Apr 2019, 6:07 PM
#1100
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

FWIW, I'm up to OPC v2.1.0-beta8.

You'll need to edit (and make a copy of) /includes/classes/OnePageCheckout.php to edit its formatAddressBookDropdown method:

    
    public function formatAddressBookDropdown()
    {
        $select_array = array();
        if (isset($_SESSION['customer_id']) && !$this->isGuestCheckout() && !$this->customerAccountNeedsPrimaryAddress()) {
            // -----
            // Build up address list input to create a customer-specific selection list of 
            // pre-existing addresses from which to choose.
            //
            $addresses = $GLOBALS['db']->Execute(
                "SELECT address_book_id 
                   FROM " . TABLE_ADDRESS_BOOK . " 
                  WHERE customers_id = " . (int)$_SESSION['customer_id'] . "
               ORDER BY address_book_id"
            );
            if (!$addresses->EOF) {
                $select_array[] = array(
                    'id' => 0,
                    'text' => TEXT_SELECT_FROM_SAVED_ADDRESSES
                );
            }
            while (!$addresses->EOF) {
                $select_array[] = array( 
                    'id' => $addresses->fields['address_book_id'],
                    'text' => str_replace("\n", ', ', zen_address_label($_SESSION['customer_id'], $addresses->fields['address_book_id']))
                );
                $addresses->MoveNext();
            }
        }
        return $select_array;
    }

Note, though, that this class is very 'volatile' as it's the heart of OPC's processing.