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

One-Page Checkout [Support Thread]

Views: 629,549

Results 1,641 to 1,660 of 3,078
1 Jun 2020, 10:12 PM
#1642
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Just started using OPC 2.3.1 on ZC 1.6.C. Everything to be working as expected so far.

However, I do have a questions regarding address book. Prior using OPC, I was able to see customer address book. It was useful as sometimes Paypal would change order address to default billing address.

Please look at screenshot attached. Attachment 19019

Is there a way or a setting to see customer address book as before? It used to show as "2 entries" in blue. Theres is nothing being displayed now

thank you in advance for your help.

2 Jun 2020, 8:00 AM
#1643
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,767
Plugin Contributions:
9

Re: One-Page Checkout [Support Thread]

What you are seeing is in the admin back end when viewing Customers >> Customers.

This is not connected to, or effected by OPC.

If the customer has more than one address, you will see the 2 Entries or 3 Entries. That's where you would click to see the different addresses. If the blue entry is not there, then there is only one registered address for the user.

That still doesn't mean they can't/won't add a new address to PayPal. Still, nothing to do with OPC.

2 Jun 2020, 9:07 PM
#1644
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

dbltoe:

What you are seeing is in the admin back end when viewing Customers >> Customers.

This is not connected to, or effected by OPC.

If the customer has more than one address, you will see the 2 Entries or 3 Entries. That's where you would click to see the different addresses. If the blue entry is not there, then there is only one registered address for the user.

That still doesn't mean they can't/won't add a new address to PayPal. Still, nothing to do with OPC.

Thank you dbltoe.

What i meant is that it does not seems to registered the second address regardless of the payment method.

I am aware of Paypal changing address is a complete different issue on it is own regardless of checkout and it may have been confusing.

For example a customer place an order using check/ money order or free order.... If i go to the order, it displays address A as biling and address B as shipping.

However, there is nothing in the address book ( 2 entries....) is not displayed.

If i turn off OPC, it works as usual.

Thank you in advance for your help

2 Jun 2020, 9:42 PM
#1645
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

here are some screenshot to try to explain it better.

Attachment 19022

Using OPC does not seems to register address into customer address book.

I run some test as follow

test 1 with OPC to true.
payment is check/money order

The order displays both address correctly but no entries in address book.

Attachment 19023

test 2 with OPC to false.
payment is check/money order

The order displays both address correctly and there is 2 entries in address book as seen in first screen shot above.

Attachment 19024

Is there a setting in OPC configuration that I missed?

Thank you for your time and help. It is much appreciated.

3 Jun 2020, 10:52 AM
#1646
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

If this was an order placed by a guest, there's not address-book record created ... because they're a guest.

3 Jun 2020, 5:05 PM
#1647
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

If this was an order placed by a guest, there's not address-book record created ... because they're a guest.

My store does not allow guest checkout. Customer need to create an account in order to checkout.

I also notice the following:

If I log in as a customer with email/password (i.e. returning customer or new created account), then add a product to my cart. After going to checkout and go to edit shipping address, there is no "add to address book" box being displayed.

3 Jun 2020, 6:27 PM
#1648
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

nicksab:

My store does not allow guest checkout. Customer need to create an account in order to checkout.

I also notice the following:

If I log in as a customer with email/password (i.e. returning customer or new created account), then add a product to my cart. After going to checkout and go to edit shipping address, there is no "add to address book" box being displayed.
Yes, that was corrected in OPC v2.3.2.

4 Jun 2020, 1:57 AM
#1649
koda avatar

koda

New Zenner

Join Date:
Feb 2011
Posts:
57
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Hello,

I am using this mod in conjunction with the multi-site module. I am hoping to have a single one page checkout site for several of my websites. What edits would I need to make so that when the customer selects "checkout", be it from the shopping cart or other pages, that they are redirected to my designated site for checking out? I will be including the customer zen-id with the url as to carry over the cart details.

Thank you kindly.

4 Jun 2020, 3:20 AM
#1650
koda avatar

koda

New Zenner

Join Date:
Feb 2011
Posts:
57
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Actually I think I have found a better solution. I did not realize that with the payment module of my choosing that there was an additional "Review Order" page before confirmation. I was able to redirect the links leading to this page by editing the following file:

public_html/includes/templates/template_default/templates/tpl_modules_opc_submit_block.php @ line 18

Simply replacing the line 18 with: ```
<span id="opc-order-review"> <?php echo '<a href="https://website3.com/index.php?main_page=checkout_confirmation&template_switch_id=template3&'. zen_session_name() . '=' . zen_session_id() .'"><button type="button">Review Order</button></a>';?> </span>

4 Jun 2020, 12:58 PM
#1651
koda avatar

koda

New Zenner

Join Date:
Feb 2011
Posts:
57
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

I do have an additional question, a bit more related to this module in specific. I intend on offering several payment methods such as Money Orders and COD. I feel it would be best to have different landing pages after checking out based on the selection chosen. Similar to how when the credit card option is chosen you are redirected to the "checkout_one_confirmation" page instead of "checkout_success", I would need a separate button or link that appears when these options are selected that takes the customer to the predefined pages "payment_instructions" and "COD_terms".

Thank you and regards

4 Jun 2020, 2:04 PM
#1652
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

Koda:

I do have an additional question, a bit more related to this module in specific. I intend on offering several payment methods such as Money Orders and COD. I feel it would be best to have different landing pages after checking out based on the selection chosen. Similar to how when the credit card option is chosen you are redirected to the "checkout_one_confirmation" page instead of "checkout_success", I would need a separate button or link that appears when these options are selected that takes the customer to the predefined pages "payment_instructions" and "COD_terms".

Thank you and regards
Interesting idea! On the initial entry to the checkout_success page, the session-variable ($_SESSION['order_summary']) is copied to the variable $order_summary and that session-value is removed (enabling after-order tracking scripts to 'know' to send only once).

The payment method used for the order is present in $order_summary['payment_module_code']. You could modify /includes/modules/pages/checkout_success/main_template_vars.php (as provided by OPC) to check for (a) the presence of that variable and then (b) change the name of the $checkout_success_template to display after-order instructions to your customers.

6 Jun 2020, 6:56 PM
#1653
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

Yes, that was corrected in OPC v2.3.2.

Upgraded from 2.3.1 to 2.3.2 but my issue still persist.

7 Jun 2020, 11:51 AM
#1654
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

Well, :censored:, I missed that one. You can edit /includes/modules/pages/checkout_one/jquery.checkout_one.js, finding

    function changeShippingFields(event)
    {
        jQuery(this).addClass('opc-changed');
        jQuery('#checkoutOneShipto .opc-buttons, #opc-ship-save').show();
        jQuery('#checkoutPayment > .opc-overlay').addClass('active');
        jQuery('#checkoutOneShipto').removeClass('visibleField');
        jQuery('#checkoutOneShipto').addClass('opc-view');
    }

and changing to

 
    function changeShippingFields(event)
    {
        jQuery(this).addClass('opc-changed');
        jQuery('#checkoutOneShipto .opc-buttons, #opc-ship-save[B], #opc-add-ship, #opc-add-ship+label[/B]').show();
        jQuery('#checkoutPayment > .opc-overlay').addClass('active');
        jQuery('#checkoutOneShipto').removeClass('visibleField');
        jQuery('#checkoutOneShipto').addClass('opc-view');
    }

If your site is using minified scripts, you'll need to push that unminified version through a minifier; I use https://jscompress.com/.

7 Jun 2020, 9:12 PM
#1655
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

Well, :censored:, I missed that one. You can edit /includes/modules/pages/checkout_one/jquery.checkout_one.js, finding

function changeShippingFields(event)
{
    jQuery(this).addClass('opc-changed');
    jQuery('#checkoutOneShipto .opc-buttons, #opc-ship-save').show();
    jQuery('#checkoutPayment > .opc-overlay').addClass('active');
    jQuery('#checkoutOneShipto').removeClass('visibleField');
    jQuery('#checkoutOneShipto').addClass('opc-view');
}
> and changing to
> ```
 
    function changeShippingFields(event)
    {
        jQuery(this).addClass('opc-changed');
        jQuery('#checkoutOneShipto .opc-buttons, #opc-ship-save[B], #opc-add-ship, #opc-add-ship+label[/B]').show();
        jQuery('#checkoutPayment > .opc-overlay').addClass('active');
        jQuery('#checkoutOneShipto').removeClass('visibleField');
        jQuery('#checkoutOneShipto').addClass('opc-view');
    }

If your site is using minified scripts, you'll need to push that unminified version through a minifier; I use https://jscompress.com/.

Still no luck.

I tried OPC 2.3.2 on a fresh install of ZC 1.5.6 with no add on but the same thing happens.

Shipping address is not being registered in the address book.

Attachment 19038

I am not an expert but I added the following code in /templates/templates_default/tpl_checkout_shipping_address_default.php

<?php
        if ($show_add_address) {
?>
                <?php echo zen_draw_checkbox_field("add_address['ship']", 'style="display:inline"','1', false, 'id="opc-add-ship"' . $parameters); ?>
                <label class="checkboxLabel custom-control-label" for="add_address['ship']" title="<?php echo TITLE_ADD_TO_ADDRESS_BOOK; ?>"><?php echo TEXT_ADD_TO_ADDRESS_BOOK; ?></label>
<?php

The check box and text is displayed but it did not fix my problem of the address not being registered in the address book. OPC is really great but this issue has me clueless.

Attachment 19039

I also apologize for pushing on my issue and appreciate everyone trying to help.

Thank you again

8 Jun 2020, 12:49 AM
#1656
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

Well, :censored:, I missed that one. You can edit /includes/modules/pages/checkout_one/jquery.checkout_one.js, finding

function changeShippingFields(event)
{
    jQuery(this).addClass('opc-changed');
    jQuery('#checkoutOneShipto .opc-buttons, #opc-ship-save').show();
    jQuery('#checkoutPayment > .opc-overlay').addClass('active');
    jQuery('#checkoutOneShipto').removeClass('visibleField');
    jQuery('#checkoutOneShipto').addClass('opc-view');
}
> and changing to
> ```
 
    function changeShippingFields(event)
    {
        jQuery(this).addClass('opc-changed');
        jQuery('#checkoutOneShipto .opc-buttons, #opc-ship-save[B], #opc-add-ship, #opc-add-ship+label[/B]').show();
        jQuery('#checkoutPayment > .opc-overlay').addClass('active');
        jQuery('#checkoutOneShipto').removeClass('visibleField');
        jQuery('#checkoutOneShipto').addClass('opc-view');
    }

If your site is using minified scripts, you'll need to push that unminified version through a minifier; I use https://jscompress.com/.

Please disregard my previous post. Your solution seems to have fixed it.

Once I set one page checkout minified to false as well as js loader to false, the "add address box showed up".

I do have another question though.

How can I make the box checked by default? so the shipping address is automatically saved to address book without having customer checking the box.

Thank you

8 Jun 2020, 10:27 AM
#1657
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

To have those "Save to Address Book" elements checked by default, you'll need to make a template-override of both the tpl_modules_opc_billing_address.php and tpl_modules_opc_shipping_address.php.

For the shipping-address, it's this block in the shipping-related file:

<?php
        if ($show_add_address) {
?>
                <?php echo zen_draw_checkbox_field("add_address['ship']", '1', [B]false[/B], 'id="opc-add-ship"' . $parameters); ?>
                <label class="checkboxLabel custom-control-label" for="add_address['ship']" title="<?php echo TITLE_ADD_TO_ADDRESS_BOOK; ?>"><?php echo TEXT_ADD_TO_ADDRESS_BOOK; ?></label>
<?php
        }
?>

There's a similar block in the billing-address script. Just 'flip' that ***false ***to ***true ***to change the default for those checkboxes.

10 Jun 2020, 8:42 PM
#1658
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]

I'm having a problem with this on a client site using authorize.net.

Zen Cart 1.5.5e
One-Page 2.3.2

When using a.net and clicking checkout I get the spinning circle and then the page reloads and I'm still in checkout. Checking the error logs, I see the error below. Oddly, that is not my ip address.

Here's what I think is going on. I installed and tested the plugin on a development site. But not with authorize.net. This is new now that Payeezy stopped working. When I made the dev site live, I copied the customer tables from the live site to the dev site. This of course wiped out the changes one-page does upon installation so I ran:
ALTER TABLE orders ADD COLUMN is_guest_order tinyint(1) NOT NULL DEFAULT '0';

Is there something else I should have done to ensure this will work when moving from dev to live? I did search the thread thinking this may have been covered but was unable to find an answer.

[10-Jun-2020 16:25:41 America/New_York] Request URI: /ADMIN/customers.php?page=1&cID=11098, IP address: 208.123.180.13
#1 array_merge() called at [/home2/austrao6/public_html/ADMIN/customers.php:1184]

[10-Jun-2020 16:25:41 America/New_York] PHP Warning: array_merge(): Argument #1 is not an array in /home2/austrao6/public_html/Du1262Mj/customers.php on line 1184
[10-Jun-2020 16:25:41 America/New_York] Request URI: /ADMIN/customers.php?page=1&cID=11098, IP address: 208.123.180.13
#1 array_merge() called at [/home2/austrao6/public_html/ADMIN/customers.php:1186]

[10-Jun-2020 16:25:41 America/New_York] PHP Warning: array_merge(): Argument #2 is not an array in /home2/austrao6/public_html/ADMIN/customers.php on line 1186

11 Jun 2020, 5:59 PM
#1659
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

jeking:

I'm having a problem with this on a client site using authorize.net.

Zen Cart 1.5.5e
One-Page 2.3.2

When using a.net and clicking checkout I get the spinning circle and then the page reloads and I'm still in checkout. Checking the error logs, I see the error below. Oddly, that is not my ip address.

Here's what I think is going on. I installed and tested the plugin on a development site. But not with authorize.net. This is new now that Payeezy stopped working. When I made the dev site live, I copied the customer tables from the live site to the dev site. This of course wiped out the changes one-page does upon installation so I ran:
ALTER TABLE orders ADD COLUMN is_guest_order tinyint(1) NOT NULL DEFAULT '0';

Is there something else I should have done to ensure this will work when moving from dev to live? I did search the thread thinking this may have been covered but was unable to find an answer.

[10-Jun-2020 16:25:41 America/New_York] Request URI: /ADMIN/customers.php?page=1&cID=11098, IP address: 208.123.180.13
#1 array_merge() called at [/home2/austrao6/public_html/ADMIN/customers.php:1184]

[10-Jun-2020 16:25:41 America/New_York] PHP Warning: array_merge(): Argument #1 is not an array in /home2/austrao6/public_html/Du1262Mj/customers.php on line 1184
[10-Jun-2020 16:25:41 America/New_York] Request URI: /ADMIN/customers.php?page=1&cID=11098, IP address: 208.123.180.13
#1 array_merge() called at [/home2/austrao6/public_html/ADMIN/customers.php:1186]

[10-Jun-2020 16:25:41 America/New_York] PHP Warning: array_merge(): Argument #2 is not an array in /home2/austrao6/public_html/ADMIN/customers.php on line 1186
First, that's an admin-log created by customers.php which OPC doesn't touch.

Pulling in the customer (and presumably address-book) records from the live store that didn't have OPC installed has, though, wiped out the guest-related records. You can cause OPC's admin initialization script to recreate these records by running the following query (either in phpMyAdmin, where you need also to include the site's DB_PREFIX, or via the admin's Install SQL Patches):

DELETE FROM configuration WHERE configuration_key IN ('CHECKOUT_ONE_GUEST_CUSTOMER_ID', 'CHECKOUT_ONE_GUEST_BILLTO_ADDRESS_BOOK_ID', 'CHECKOUT_ONE_GUEST_SENDTO_ADDRESS_BOOK_ID');

I don't know what's causing the checkout/confirmation loop. Is there anything in the browser's console log, seen by pressing F12 on most browsers then inspecting the 'Console' tab's information.

12 Jun 2020, 12:53 PM
#1660
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:

Pulling in the customer (and presumably address-book) records from the live store that didn't have OPC installed has, though, wiped out the guest-related records. You can cause OPC's admin initialization script to recreate these records by running the following query (either in phpMyAdmin, where you need also to include the site's DB_PREFIX, or via the admin's Install SQL Patches):

DELETE FROM configuration WHERE configuration_key IN ('CHECKOUT_ONE_GUEST_CUSTOMER_ID', 'CHECKOUT_ONE_GUEST_BILLTO_ADDRESS_BOOK_ID', 'CHECKOUT_ONE_GUEST_SENDTO_ADDRESS_BOOK_ID');

> I don't know what's causing the checkout/confirmation loop.  Is there anything in the browser's console log, seen by pressing F12 on most browsers then inspecting the 'Console' tab's information.

Wiping out the guest-related record was the culprit. Running the query did the trick. Thank you!! :clap: