Totally Zenned
- Join Date:
- Aug 2009
- Location:
- North Idaho, USA
- Posts:
- 2,015
- Plugin Contributions:
- 0
One-Page Checkout [Support Thread]
I bet it is related to this edit which disabled autoselecting the least expensive shipping as default.
Views: 629,549
Totally Zenned
I bet it is related to this edit which disabled autoselecting the least expensive shipping as default.
Totally Zenned
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.
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.
Totally Zenned
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.
Totally Zenned
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
Totally Zenned
here are some screenshot to try to explain it better.
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.
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.
Is there a setting in OPC configuration that I missed?
Thank you for your time and help. It is much appreciated.
Administrator
If this was an order placed by a guest, there's not address-book record created ... because they're a guest.
Totally Zenned
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.
Administrator
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.
New Zenner
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.
New Zenner
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>
New Zenner
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
Administrator
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.
Totally Zenned
lat9:
Yes, that was corrected in OPC v2.3.2.
Upgraded from 2.3.1 to 2.3.2 but my issue still persist.
Administrator
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/.
Totally Zenned
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.
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.
I also apologize for pushing on my issue and appreciate everyone trying to help.
Thank you again
Totally Zenned
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
Administrator
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.
Totally Zenned
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
Administrator
jeking:
I'm having a problem with this on a client site using authorize.net.
Zen Cart 1.5.5e
One-Page 2.3.2When 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 TABLEordersADD COLUMNis_guest_ordertinyint(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.
Totally Zenned
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:
Fields marked required must be completed.
Tell staff why this post should be reviewed.