I'm not super strong on this; it's just a suggestion. The reason this came up is that I had to fix the salutation stuff in OPC, which I could have avoided if it had been possible to just redirect to the default page. No worries.
Printable View
I'm not super strong on this; it's just a suggestion. The reason this came up is that I had to fix the salutation stuff in OPC, which I could have avoided if it had been possible to just redirect to the default page. No worries.
Testing OPC on 1.5.7 alpha with 7.3 PHP and 5.6 MySQL
No mods touching core in the site and Guest Checkout gives the hesitation when clicking Checkout and the message "Please contact the store owner; some required elements of this page are missing.".
I get the same missing #otshipping that folks were getting two years ago. The fix is incorporated in OPC in use.
Between too many hours at this and my trifocals, what might I have missed?
I haven't had a chance to test any zc157 interoperations. Would you open an issue on OPC's GitHub for tracking (https://github.com/lat9/one_page_checkout)?
I can now verify that I've replicated @dbltoe's issue on zc157. No good deed goes unpunished; this is a direct result of this Zen Cart PR that corrects the ot_shipping module's previous behavior (where it registered itself during class-construction rather than during the 'process' method).
Correction posted to GitHub: https://github.com/lat9/one_page_checkout/issues/251
I'll wait to see what other gremlins are lurking before committing the OPC v2.3.2 release (this will, BTW, be the minimum version required for zc157 interoperation).
Works just fine. Got some problems with undefined PayPal and GV constants but I don't see any more problems with OPC and 1.5.7
THANX
Thanks folks for helping us get ready for the 1.5.7 release!
I know this is a stupid thing to do, but...
Using vanilla 1.5.6c with OPC 2.3.1, php 7.3.17 and PayPal Pro (sandbox activated). I go to checkout, enter CC details and click Confirm Order, give it 3-4 seconds and hit F5 on my keyboard. It takes me back to checkout page (checkout_one) BUT the order actually goes through and is recorded in the admin. If I attempt to go through checkout again, I get a blank screen:
The same action actually allows you to go through checkout *again* in OPC 2.2.0 (duplicate order) and I'm really glad to see it fixed, however... Is it possible to completely block any and all customer interaction while processing checkout? Ideally, block their mouse, keyboard and (F it) even their washing machine in the basement... The only thing that would be allowed is to flip the power switch... :DCode:[04-May-2020 21:48:04 UTC] Request URI: /ajax.php?act=ajaxOnePageCheckout&method=updateShipping, IP address: 93.140.231.145
#1 trigger_error() called at [/var/www/vhosts/XYZ/includes/classes/OnePageCheckout.php:956]
#2 OnePageCheckout->setTempShippingToBilling() called at [/var/www/vhosts/XYZ/includes/classes/ajax/zcAjaxOnePageCheckout.php:56]
#3 zcAjaxOnePageCheckout->updateShipping() called at [/var/www/vhosts/XYZ/ajax.php:85]
--> PHP Fatal error: Invalid access; $_SESSION['billto'] is not set. in /var/www/vhosts/XYZ/includes/classes/OnePageCheckout.php on line 956.
I wonder what method of stopping F5 (or Ctrl-F5) for POST requests (to clear $_POST I presume) was used.
I am also checking OPC on my test site now, and can experiment there.
As I understand it, the basic way is to perform a redirect to the same page after submitting the form:
https://en.wikipedia.org/wiki/Post/Redirect/Get
https://stackoverflow.com/questions/...en-pressing-f5
https://wordpress.org/support/topic/...fresh-page-f5/
There is also a JavaScript way using window.history.replaceState, or by setting as session variable:
https://stackoverflow.com/questions/...eshed-f5-ctrlr
More on using JavaScript for this:
https://www.sitepoint.com/community/...oblem/41523/10
A tutorial using various way:
https://makitweb.com/prevent-page-fr...efresh-in-php/
ZC v1.56c
OPC v2.3.1
Not sure if this is a thing or that I'm getting a bit befuddled by all the testing I've been doing but,
Checking out as a guest, on the checkout success page the first thing the customer sees is an option to create an account (followed by the html language text and lastly the order details - which in this case contains download links). If they create an account before scrolling down they go to the create account success page so losing any of the order information on screen.
It seems I have two options.
- Have some text on the create account success page to indicate that the customer can view their order details in My Account - but only for guests that have created an account as part of the Guest checkout process.
- more simply, move the create account guest option to the bottom of the page, below the order details on the checkout success page.
Thank you for looking at this @lat9. In my case I'm actually happy with moving the create account fields below the html language file text - which I've done.
I think that normally the placement wouldn't be an issue but for my products with downloads there's a need for the customer to read the descriptive text before they leave the checkout success page.
ZC v1.56c
OPC v2.3.1
Not sure if this is OPC related but it is related to guest checkout so I'll go ahead
1. The order confirmation email sent to the customer has a link to the order_status page - great.
2. If I update the order then the order update email contains a detailed invoice link to the account_history_info page - which is no good as the customer doesn't have an account.
So it seems that an order update sent to a Guest needs to include #1 not #2, not sure if there's something clever in Admin that will allow this.
@simon1066, thanks for the report. I've created a GitHub issue to track the change required.
Hi @lat9
Some feedback from my translations.
I noticed that the language files for ot_coupon.php, ot_gv.php, and checkout_confirmation.php are from pretty old versions of ZC. Probably good to include modified versions from the latest 1.5.6c.
In particular, checkout_confirmation has some old text about out of stock items that can be put on backorder. As I understand it this is now in the main english.php file.
Hope I did not mess up something and get this wrong.
Not sure but I don't think that the orders.php is where we should be looking. The account_history_info link in the order update email is generated in includes/functions/functions_osh_update.php, starting line #116 - I believe this (and more?) code was moved out of orders.php in ZCv1.56
Code://send emails
$email_text =
STORE_NAME . ' ' . OSH_EMAIL_TEXT_ORDER_NUMBER . ' ' . $orders_id . "\n\n" .
OSH_EMAIL_TEXT_INVOICE_URL . ' ' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, "order_id=$orders_id", 'SSL') . "\n\n" .
OSH_EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($osh_info->fields['date_purchased']) . "\n\n" .
strip_tags($email_message) .
$status_text . $status_value_text .
OSH_EMAIL_TEXT_STATUS_PLEASE_REPLY;
$html_msg['EMAIL_CUSTOMERS_NAME'] = $osh_info->fields['customers_name'];
$html_msg['EMAIL_TEXT_ORDER_NUMBER'] = OSH_EMAIL_TEXT_ORDER_NUMBER . ' ' . $orders_id;
$html_msg['EMAIL_TEXT_INVOICE_URL'] = '<a href="' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, "order_id=$orders_id", 'SSL') .'">' . str_replace(':', '', OSH_EMAIL_TEXT_INVOICE_URL) . '</a>';
$html_msg['EMAIL_TEXT_DATE_ORDERED'] = OSH_EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($osh_info->fields['date_purchased']);
$html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = nl2br($email_message);
$html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace("\n", '', $status_text);
$html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace("\n", '', $status_value_text);
$html_msg['EMAIL_TEXT_NEW_STATUS'] = $new_orders_status_name;
$html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace("\n", '', OSH_EMAIL_TEXT_STATUS_PLEASE_REPLY);
$html_msg['EMAIL_PAYPAL_TRANSID'] = '';
... and on a slightly related note, I've now noticed I have osh_updated_by_functions.php in MY_STORE/includes/functions/extra_functions
That's one of your files @lat9, not really sure how it got there other than it seems part of your Orders Status History mod. I couldn't find the file in any of my plugin archives and had to resort to Google to find out what it was.
I don't know if it's being used by my site, I trust it's ok for me to delete it?
I've just tested OPC guest checkouts on my testshop with Paypal express, and with Square (creating a new App for the testshop), works wonderfully.
I have a question about the Paypal setup though, could not find any mention of this in the documentation.
For standard 3-page checkout processing, the Paypal return URL is supposed (I think) to be set to:
https://www.mysite.com/MY_SHOP/index...eckout_process
For OPC, is this supposed to be kept as is, or better changed to something specific to OPC?
I've just submitted v2.3.2 of One-Page Checkout to the Zen Cart moderators for review; I'll post back here when it's available for download.
This release contains changes associated with the following GitHub issues:
#251: Missing #otshipping in zc157.
#252: Guest Checkout, status-update emails still refer to account_history_info.
#253: Changes to a customer's address aren't recorded.
#254: Correct PHP warning if a store's "Gender" changes from not-required to required.
#255: Ensure that the "Add to Address Book" checkbox's visibility is correctly updated.
#256: Address-entry, account for browser autofill and always use a state dropdown if the country has zones.
Note: This version has been validated with the upcoming Zen Cart 1.5.7-alpha release.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2095
Thank you so much! That is a lot of work in there.
The account_create page shows the drop-down for state correctly.
In 2.3.1 the state was not available in the shipping/billing address change screen.
In 2.3.2 the field is now visible as per the changelog, many thanks, but it is not a drop-down for me, probably because I am using multi-language.
I'll see if I can fairly quickly port the jscript functions and template changes from the standard 3-page checkout, and report back.
Hi lat9, it is set to true.
Configuration -> Customer Details -> State - Always display as pulldown? -> true
I have jscript on the create_account and all other address_book related pages to handle the English and Japanese with multilanguage, converting the codes to the corresponding language text (since in Zen Cart the state code use is as far as I am concerned a bug).
In OPC it seems like create_account is used the same as the original Zen Cart page, so my customizations work, but when it comes to editing addresses in the one_page_checkout page with the tpl_modules_{billing,shipping}_address template I presume the code is not available.
I'll have to check exactly what page the standard flow uses there and see what changes I have there.
I do not get any error either though, so there is no conflict as far as I can tell.
For the country/zones in the OPC address-edits, there's a json_encoded array created by the OnePageCheckout class' getCountriesZonesJavascript method that is subsequently used by the jQuery present in /includes/modules/pages/checkout_one/jquery.checkout_one_addr.js:
I'd be interested to know what modifications you needed to make to the 'stock' Zen Cart's state-dropdown handling.PHP Code:
// -----
// Creates the json-formatted array that maps countries to zones, for use in the
// customer address-forms when dropdown states are enabled.
//
public function getCountriesZonesJavascript()
{
$countries = $GLOBALS['db']->Execute(
"SELECT DISTINCT zone_country_id
FROM " . TABLE_ZONES . "
INNER JOIN " . TABLE_COUNTRIES . "
ON countries_id = zone_country_id
AND status = 1
ORDER BY zone_country_id"
);
$c2z = array();
while (!$countries->EOF) {
$current_country_id = $countries->fields['zone_country_id'];
$c2z[$current_country_id] = array();
$states = $GLOBALS['db']->Execute(
"SELECT zone_name, zone_id
FROM " . TABLE_ZONES . "
WHERE zone_country_id = $current_country_id
ORDER BY zone_name"
);
while (!$states->EOF) {
$c2z[$current_country_id][$states->fields['zone_id']] = $states->fields['zone_name'];
$states->MoveNext();
}
$countries->MoveNext();
}
if (count($c2z) == 0) {
$output_string = '';
} else {
$output_string = 'var c2z = \'' . json_encode($c2z) . '\';' . PHP_EOL;
}
return $output_string;
}
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 :)
Thanks for that, @gernot. I'll give that a look-see later today.
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.
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.
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.
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.
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
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
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
I bet it is related to this edit which disabled autoselecting the least expensive shipping as default.
https://www.zen-cart.com/showthread....-shipping-quot
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.
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
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.
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.
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.
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:seems to have done the job. The only hangup is that the "Review Order" button is using the default Zen-Cart button instead of the one designated for my template. Not a big deal, but I am trying to figure out how to adjust this for the sake of aesthetics. I tried a few changes, but these seem to interfere with the redirect. Any advice?Code:<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>
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.
Well, :censored:, I missed that one. You can edit /includes/modules/pages/checkout_one/jquery.checkout_one.js, finding
and changing toCode: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');
}
If your site is using minified scripts, you'll need to push that unminified version through a minifier; I use https://jscompress.com/.Code:
function changeShippingFields(event)
{
jQuery(this).addClass('opc-changed');
jQuery('#checkoutOneShipto .opc-buttons, #opc-ship-save, #opc-add-ship, #opc-add-ship+label').show();
jQuery('#checkoutPayment > .opc-overlay').addClass('active');
jQuery('#checkoutOneShipto').removeClass('visibleField');
jQuery('#checkoutOneShipto').addClass('opc-view');
}
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
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.Code:<?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
Attachment 19039
I also apologize for pushing on my issue and appreciate everyone trying to help.
Thank you again
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
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:
There's a similar block in the billing-address script. Just 'flip' that false to true to change the default for those checkboxes.Code:<?php
if ($show_add_address) {
?>
<?php echo zen_draw_checkbox_field("add_address['ship']", '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
}
?>
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):
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.Code: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 have zen cart version 1.5.5f using the 'Shipping by Quote' module (https://www.zen-cart.com/downloads.php?do=file&id=1224). I installed version 2.3.2 of the OPC module and 'Shipping by Quote' module doesn't show as one of the shipping methods when OPC is enabled. I displays ok with OPC switched off.
Is there something specific I need to do to enable non standard shipping methods to display? I read through the readme file and didn't see anything related to custom shipping options.
-------
I installed a fresh website and selected the responsive template, uploaded the Checkout one page and I get the same Jscript error and it doesnt work. Tried deleting min file in jscript folder whats wrong?
index.php?main_page=checkout_shipping:22 A parser-blocking, cross site (i.e. different eTLD+1) script, https://code.jquery.com/jquery-3.4.0.min.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
Just thought, I did install Paypal is that not compatible?
PHP Version: 7.2.31 (Zend: 3.2.0)
Zen Cart 1.5.6c
Database Patch Level: 1.5.6
That console message is associated with the template's rendering (normally in the /common/html_header.php) and has nothing to do with OPC.
When you say that it doesn't work, what is it and how does it not work?
Thanks for the quick reply, I really appreciate it. It doesnt append the default checkout phase from three to one page. Also cant see it in the config admin menu. Maybe I copied the wrong console errors as well, there quite a lot in there and read earlier about a similar problem.
I was just about to post this as well dont know if it helps?
[16-Jun-2020 17:11:38 UTC] Request URI: /index.php?main_page=checkout_shipping, IP address: whatever
#1 OnePageCheckout->initializeGuestCheckout() called at [/home/xxx/public_html/includes/classes/OnePageCheckout.php:473]
#2 OnePageCheckout->reset() called at [/home/xxx/public_html/includes/classes/OnePageCheckout.php:437]
#3 OnePageCheckout->resetGuestSessionValues() called at [/home/xxx/public_html/includes/classes/observers/class.checkout_one_observer.php:37]
#4 checkout_one_observer->__construct() called at [/home/xxx/public_html/includes/autoload_func.php:79]
#5 require(/home/xxx/public_html/includes/autoload_func.php) called at [/home/xxx/public_html/includes/application_top.php:170]
#6 require(/home/xxx/public_html/includes/application_top.php) called at [/home/xxx/public_html/index.php:26]
--> PHP Warning: Use of undefined constant CHECKOUT_ONE_ENABLE_REGISTERED_ACCOUNTS - assumed 'CHECKOUT_ONE_ENABLE_REGISTERED_ACCOUNTS' (this will throw an Error in a future version of PHP) in /home/xxx/public_html/includes/classes/OnePageCheckout.php on line 361.
there is noting in the config table, I followed the install to the tee and clicked on "Admin home" to install which seemed weird in the first instance.
What is the SQL to add to the config table so I can add it manually?
Sorted, I refresed it one more time and clicked the admin home 3 times and then it loaded the SQL, just some dodgy "plug n pray" crap my end no bug.
Just wanted to say a BIG THANKYOU for this one, great job its Awesome!
This is installed on a 1.5.5e Zen Cart. The theme is from Template Monster (yes, I know. Not my choice.)
The problem is upon checkout when entering invalid credit card data (Authorize.net (AIM)) there is no error returned to the shopper. The one-page ends up reloading. Using the default checkout the error was appear: http://prntscr.com/t2runn
In trouble shooting, I'm not even seeing the error in the message stack: https://prnt.sc/t2r9ct
The only messages in the console relate to a pinterest error.
Did you copy the required core-file changes for that older version of Zen Cart: https://github.com/lat9/one_page_che...10_or_later.md
That message_stack.php update is included in the instructions for copying.
Are there template-overrides for the OPC pages present in the TM-template's directory? If so, does reverting to the responsive_classic template correct the issue?
I've just submitted v2.3.3 of One-Page Checkout for the Zen Cart moderators' review and will post back here when it's available for download.
This release contains changes associated with the following GitHub issues and has been validated with the newly-minted Zen Cart 1.5.7:
#258: Save-to-address-book checkbox missing on shipping address.
#259: Signed-in customer, change to 'gender' not saved in database.
#260: zc157 integration, the login form's name is changed.
#261: Address' state dropdown, error when zone-name includes single-quotes (thanks, @chenly).
#263: Additional notifications for address-related handling.
#264: Account for possible loss of session.
receiving this error
The One-Page Checkout plugin has been disabled. The file ".../public_html/includes/templates/lite_red/jscript/jscript_framework.php" is required for the plugin's proper operation.
... and did you follow my instructions in your previous posting?
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2095
Zen: 1.5.6C
PHP: 7.1.31
OPC: 2.3.3 (2020-07-07)
Ultimate URLS: 3.0.6
Advanced Shipper
Bootstrap
I have already fully reinstalled OPC, tried turning off Ultimate, ran logs & debug, but I cannot clear this error:
Un-styled error "Please contact the store owner; some required elements of this page are missing." with the "Sorry but our expedited...." OPC error behind it. See image:
Attachment 19091
So before I move on to reinstalling Ultimate, I thought I would bug here and see if I missed a known issue.
Thanks in advance
~Melanie
Melanie, there should be messages in the browser's console-log that indicate which required fields haven't been provided by your (Bootstrap) template. Nothing to do with USU.
Ok, do you know the selector necessary for Bootstrap off hand?
I'm having issues with this when trying to use Guest Checkout. At first I thought it was related to my template, but I just tried a fresh install of ZenCart 1.5.7 with Responsive Classic template and a fresh install of One-Page Checkout version 2.3.3
ZC was installed with demo data. I set a random name for moneyorder payment and deleted moneyorder from the disallowed payment methods. Shipping is set as 'Flat Rate'.
When trying to do a guest checkout there is no content in the right column. so nothing related to shipping or payment.
Am I making an incorrect assumption that this should just work out of the box with responsive classic?
On initial entry to the OPC page's guest-checkout, the guest is prompted for their contact information and billing/shipping address. Until there's an address with which to pay-for/ship-to the order, there's no shipping-method or payment-method that can be suggested.
Now I'll go and hang my head in shame for not filling in the form fields before typing out the question on the forums!
My apologies. It does indeed show the right side column once the fields on the left have been saved.
... as identified in the OPC's additional documentation: https://github.com/lat9/one_page_che...y_selectors.md
I have a question about the latest version of OPC 2.3.3. I have it installed on the newest Zen 1.5.7 with php7.3 and all seems like it is working properly.
On the Checkout page under the Shipping Method it lists the radio button and the price but it does not say which USPS service goes with each price. I do have a pic that explains my situation. Is it suppose to show the service names or not and how to get the names to show up there?
Attachment 19092
Gail, what template are you using?
Thank for that, after you linked it I did find the documentation... But in reading before I fully missed it.
For Bootstrap you can just open includes/templates/bootstrap/templates/tpl_modules_order_totals.php
Change line 24 from
toCode:<td class="text-left">
Then under Configuration >> One-Page Checkout Settings > Order Total, jQuery Selector > change the value to #OPCCode:<td class="text-left" id="OPC">
Hope this helps someone else. Now I am looking for the single payment method bug where you cannot select the radio button. I think however that if only one payment or shipping module is live then there should even be a radio button.
~Melanie
Upon clicking "CONFIRM ORDER" I am getting the following error, over and over.
Your order's details have changed. Please review the current values and re-submit.
This is my console log
setFormSubmitButton, payment-module: moneyorder
VM73 jquery.checkout_one.min.js:5 Showing "confirm"
VM73 jquery.checkout_one.min.js:5 Setting orderConfirmed (0), submitter (null)
VM73 jquery.checkout_one.min.js:5 jQuery version: 3.4.0
VM73 jquery.checkout_one.min.js:5 submitFunction, 2 arguments: 0, 0,
VM73 jquery.checkout_one.min.js:5 Current order total:
$20.50
VM73 jquery.checkout_one.min.js:5 submitFunction, on exit submitter=null
VM73 jquery.checkout_one.min.js:5 Setting orderConfirmed (1), submitter (null)
VM73 jquery.checkout_one.min.js:5 Submitting order-creating form
VM73 jquery.checkout_one.min.js:5 Updating shipping method to advshipper_4-0-0, processing type: submit
index.php?main_page=checkout_one:285 {cache: false, type: "POST", traditional: true, dataType: "json", timeout: 5000, …}
VM73 jquery.checkout_one.min.js:5 Shipping method updated, error: false
VM73 jquery.checkout_one.min.js:5 Form submitted, type (submit), orderConfirmed (1)
VM73 jquery.checkout_one.min.js:5 Form checked, passed (true)
Navigated to https://####.com/index.php?main_page=checkout_one
2index.php?main_page=checkout_one:259 A parser-blocking, cross site (i.e. different eTLD+1) script, https://code.jquery.com/jquery-3.4.0.min.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
(anonymous) @ index.php?main_page=checkout_one:259
jquery.checkout_one.min.js?1594904786:5 setFormSubmitButton, payment-module: moneyorder
jquery.checkout_one.min.js?1594904786:5 Showing "confirm"
jquery.checkout_one.min.js?1594904786:5 Setting orderConfirmed (0), submitter (null)
jquery.checkout_one.min.js?1594904786:5 jQuery version: 3.4.0
Any insight is appreciated.
~Melanie
That's going to make it difficult to help.
I'll suggest comparing your magic template's templates sub-directory to make sure that there's not some stray, older versions of the OPC templates (delivered via the plugin's zip-file in the /template_default template's sub-directories).