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

One-Page Checkout [Support Thread]

Views: 629,001

Results 2,321 to 2,340 of 3,073
27 May 2022, 4:35 PM
#2321
lat9 avatar

lat9

Administrator

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

One-Page Checkout [Support Thread]

Nick1973:

hi cindy,

I have just installed OPC 2.4.1 on 1.5.7d running PHP 7.4 and I am getting this after card details have been entered and when clicking 'confirm order'

Your order's details have changed. Please review the current values and re-submit.

So I entered my card details again, and when I reconfirm the order, it goes through without a problem.
What payment method? It sounds like something's not being recorded in the session on the initial 'confirm' click.

27 May 2022, 4:40 PM
#2322
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: One-Page Checkout [Support Thread]

lat9:

What payment method? It sounds like something's not being recorded in the session on the initial 'confirm' click.

Paypal and Square

27 May 2022, 8:55 PM
#2323
dbltoe avatar

dbltoe

Totally Zenned

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

Re: One-Page Checkout [Support Thread]

Getting the same with WebPay but only occasionally. :frusty:

Also getting completed orders that trigger a PHP notice for a missing token. Followed the process with the console and saw no problem but the notice still appeared.

28 May 2022, 10:31 AM
#2324
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

Nick1973:

Paypal and Square

dbltoe:

Getting the same with WebPay but only occasionally. :frusty:

Also getting completed orders that trigger a PHP notice for a missing token. Followed the process with the console and saw no problem but the notice still appeared.
Enable the OPC debug and send the files to my direct email so that I can see what's going on.

1 Jun 2022, 9:41 PM
#2325
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

Re: One-Page Checkout [Support Thread]

Hi Cindy,

I'm running into an issue, non related to OPC but that is affecting it. The way ZC works when it comes to free shipping (free options) and gift vouchers is a bit odd. Ideally if I offer free shipping over $100 and the customer applies a $10 discount coupon for example, free shipping should not apply anymore. However the reality is, with the way ZC is designed free shipping still applies because freeoptions works on order subtotal not order total.

The way I've made it work in the past was by hiding the place order button if certain conditions do not apply. I wrote a rudimentary piece code (perfected by @mc12345678 a little while back, to whom I will forever be grateful to) but I can't make it work with OPC.

The code determines if both discount coupons and free shipping are loaded and if the order total drops below the free shipping threshold, then the button is hidden, for the most part. I placed the code in the tpl_checkout_confirmation_default.php on the native ZC checkout which is where the place order button displays. On OPC that could be according to what I've noticed the module works, on the tpl_modules_opc_submit_block.php, but it just doesn't work, and I was wondering if you could take a look and maybe point me in the right direction?

This below is what I have.

<?php
// -----
// Part of the One-Page Checkout plugin, provided under GPL 2.0 license by lat9 ().
// Copyright (C) 2013-2017, Vinos de Frutas Tropicales.  All rights reserved.
//
// Check to see that at least one shipping-method and one payment-method is enabled; if not, don't render the submit-button.
//
if ($shipping_module_available && $payment_module_available) {
    // -----
    // Set up two form-submittal buttons, one for payment methods that require confirmation and one for those that don't.
    // This page's header_php.php has created an array of payment modules that require confirmation, which is pulled into the
    // page's jscript_main.php.
    //
?>
<!-- bof disable checkout button from displaying 1 of 3 -->
 <?php
if (!IS_ADMIN_FLAG) { 
    global $order, $db;
      if (($order->info['total'] < MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN) && (substr_count($_SESSION['shipping']['id'], 'freeoptions') !=0) && !empty($_SESSION['cot_gv']) && (($_SESSION['cot_gv'] + $order->info['total']) >= MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN)) { // Do the following (show button) if total is below the min, free options is offered, a gift certificate is used and the sum of the gift certificate and order total is equal to or greater than the minimum.

     ?>
<!-- bof disable checkout button from displaying 1 of 3 -->

<!--bof submit block -->
  <div id="checkoutOneSubmit" class="buttonRow forward">
    <span id="opc-order-confirm"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_CONFIRM, BUTTON_CHECKOUT_ONE_CONFIRM_ALT); ?></span>
    <span id="opc-order-review"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_REVIEW, BUTTON_CHECKOUT_ONE_REVIEW_ALT); ?></span>
    <?php echo zen_draw_hidden_field('order_confirmed', '1', 'id="confirm-the-order"') . zen_draw_hidden_field ('current_order_total', '0', 'id="current-order-total"'); ?>
  </div>
<?php
    if (!empty($order->customer['email_address'])) {
?>
  <div id="checkoutOneEmail" class="forward clearRight"><?php echo sprintf(TEXT_CONFIRMATION_EMAILS_SENT_TO, $order->customer['email_address']); ?></div>
<?php
    }
?>
  <div class="clearBoth"></div>
<!--eof submit block -->

<!-- bof disable checkout button from displaying 2 of 3 -->
 <?php } elseif (($order->info['total'] < MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN) && (substr_count($_SESSION['shipping']['id'], 'freeoptions') !=0)) { // Stop checkout if below the minimum and free options is displayed (Note that at this point of execution, the gift certificate is not a factor because if it "helped" then this code is not reached).
	echo '<div style="border: 3px solid #777777; padding: 10px 0;"><p style="text-align: center;"><strong>Your order no longer qualifies for Free Shipping.</strong></p>';  
    
  } else { // standard checkout, basically total is anything that doesn't cause freeoptions to display.
?> 
<!-- eof disable checkout button from displaying 2 of 2 -->

<!--bof submit block -->
  <div id="checkoutOneSubmit" class="buttonRow forward">
    <span id="opc-order-confirm"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_CONFIRM, BUTTON_CHECKOUT_ONE_CONFIRM_ALT); ?></span>
    <span id="opc-order-review"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_REVIEW, BUTTON_CHECKOUT_ONE_REVIEW_ALT); ?></span>
    <?php echo zen_draw_hidden_field('order_confirmed', '1', 'id="confirm-the-order"') . zen_draw_hidden_field ('current_order_total', '0', 'id="current-order-total"'); ?>
  </div>
<?php
    if (!empty($order->customer['email_address'])) {
?>
  <div id="checkoutOneEmail" class="forward clearRight"><?php echo sprintf(TEXT_CONFIRMATION_EMAILS_SENT_TO, $order->customer['email_address']); ?></div>
<?php
    }
?>
  <div class="clearBoth"></div>
<!--eof submit block -->

//<!-- bof disable checkout button from displaying 3 of 3 -->
<?php
}
}

When loading the page I get a popup "Please contact the store owner; some required elements of this page are missing" and in the logs "PHP Parse error: syntax error, unexpected end of file in /includes/templates/responsive_classic/templates/tpl_modules_opc_submit_block.php on line 68."

Thanks in advance for your guidance.

2 Jun 2022, 12:31 AM
#2326
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: One-Page Checkout [Support Thread]

mvstudio:

Hi Cindy,

I'm running into an issue, non related to OPC but that is affecting it. The way ZC works when it comes to free shipping (free options) and gift vouchers is a bit odd. Ideally if I offer free shipping over $100 and the customer applies a $10 discount coupon for example, free shipping should not apply anymore. However the reality is, with the way ZC is designed free shipping still applies because freeoptions works on order subtotal not order total.

The way I've made it work in the past was by hiding the place order button if certain conditions do not apply. I wrote a rudimentary piece code (perfected by @mc12345678 a little while back, to whom I will forever be grateful to) but I can't make it work with OPC.

The code determines if both discount coupons and free shipping are loaded and if the order total drops below the free shipping threshold, then the button is hidden, for the most part. I placed the code in the tpl_checkout_confirmation_default.php on the native ZC checkout which is where the place order button displays. On OPC that could be according to what I've noticed the module works, on the tpl_modules_opc_submit_block.php, but it just doesn't work, and I was wondering if you could take a look and maybe point me in the right direction?

This below is what I have.

<?php // ----- // Part of the One-Page Checkout plugin, provided under GPL 2.0 license by lat9 (). // Copyright (C) 2013-2017, Vinos de Frutas Tropicales. All rights reserved. // // Check to see that at least one shipping-method and one payment-method is enabled; if not, don't render the submit-button. // if ($shipping_module_available && $payment_module_available) { // ----- // Set up two form-submittal buttons, one for payment methods that require confirmation and one for those that don't. // This page's header_php.php has created an array of payment modules that require confirmation, which is pulled into the // page's jscript_main.php. // ?> <!-- bof disable checkout button from displaying 1 of 3 --> <?php if (!IS_ADMIN_FLAG) { global $order, $db; if (($order->info['total'] < MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN) && (substr_count($_SESSION['shipping']['id'], 'freeoptions') !=0) && !empty($_SESSION['cot_gv']) && (($_SESSION['cot_gv'] + $order->info['total']) >= MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN)) { // Do the following (show button) if total is below the min, free options is offered, a gift certificate is used and the sum of the gift certificate and order total is equal to or greater than the minimum. ?> <!-- bof disable checkout button from displaying 1 of 3 --> <!--bof submit block --> <div id="checkoutOneSubmit" class="buttonRow forward"> <span id="opc-order-confirm"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_CONFIRM, BUTTON_CHECKOUT_ONE_CONFIRM_ALT); ?></span> <span id="opc-order-review"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_REVIEW, BUTTON_CHECKOUT_ONE_REVIEW_ALT); ?></span> <?php echo zen_draw_hidden_field('order_confirmed', '1', 'id="confirm-the-order"') . zen_draw_hidden_field ('current_order_total', '0', 'id="current-order-total"'); ?> </div> <?php if (!empty($order->customer['email_address'])) { ?> <div id="checkoutOneEmail" class="forward clearRight"><?php echo sprintf(TEXT_CONFIRMATION_EMAILS_SENT_TO, $order->customer['email_address']); ?></div> <?php } ?> <div class="clearBoth"></div> <!--eof submit block --> <!-- bof disable checkout button from displaying 2 of 3 --> <?php } elseif (($order->info['total'] < MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN) && (substr_count($_SESSION['shipping']['id'], 'freeoptions') !=0)) { // Stop checkout if below the minimum and free options is displayed (Note that at this point of execution, the gift certificate is not a factor because if it "helped" then this code is not reached). echo '<div style="border: 3px solid #777777; padding: 10px 0;"><p style="text-align: center;"><strong>Your order no longer qualifies for Free Shipping.</strong></p>'; } else { // standard checkout, basically total is anything that doesn't cause freeoptions to display. ?> <!-- eof disable checkout button from displaying 2 of 2 --> <!--bof submit block --> <div id="checkoutOneSubmit" class="buttonRow forward"> <span id="opc-order-confirm"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_CONFIRM, BUTTON_CHECKOUT_ONE_CONFIRM_ALT); ?></span> <span id="opc-order-review"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_REVIEW, BUTTON_CHECKOUT_ONE_REVIEW_ALT); ?></span> <?php echo zen_draw_hidden_field('order_confirmed', '1', 'id="confirm-the-order"') . zen_draw_hidden_field ('current_order_total', '0', 'id="current-order-total"'); ?> </div> <?php if (!empty($order->customer['email_address'])) { ?> <div id="checkoutOneEmail" class="forward clearRight"><?php echo sprintf(TEXT_CONFIRMATION_EMAILS_SENT_TO, $order->customer['email_address']); ?></div> <?php } ?> <div class="clearBoth"></div> <!--eof submit block -->

//<!-- bof disable checkout button from displaying 3 of 3 -->

<?php } } ``` > > When loading the page I get a popup "Please contact the store owner; some required elements of this page are missing" and in the logs "PHP Parse error: syntax error, unexpected end of file in /includes/templates/responsive_classic/templates/tpl_modules_opc_submit_block.php on line 68." > > Thanks in advance for your guidance. you are missing a closing curly brace at the end of the file. there should be 3. you only have 2. best.
2 Jun 2022, 1:30 AM
#2327
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

Re: One-Page Checkout [Support Thread]

carlwhat:

you are missing a closing curly brace at the end of the file.

there should be 3. you only have 2.

best.

How did I miss that one?! Thank you @carlwhat! I appreciate the extra pair of eyes!

2 Jun 2022, 1:59 PM
#2328
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

Re: One-Page Checkout [Support Thread]

After adding the missing curly bracket the code doesn't work. Lowering the order total doesn't trigger the message nor hides the button. What am I doing wrong?

 <?php
// -----
// Part of the One-Page Checkout plugin, provided under GPL 2.0 license by lat9 ().
// Copyright (C) 2013-2017, Vinos de Frutas Tropicales.  All rights reserved.
//
// Check to see that at least one shipping-method and one payment-method is enabled; if not, don't render the submit-button.
//
if ($shipping_module_available && $payment_module_available) {
    // -----
    // Set up two form-submittal buttons, one for payment methods that require confirmation and one for those that don't.
    // This page's header_php.php has created an array of payment modules that require confirmation, which is pulled into the
    // page's jscript_main.php.
    //
?>
<!-- bof disable checkout button from displaying 1 of 3 -->
 <?php
if (!IS_ADMIN_FLAG) { 
    global $order, $db;
      if (($order->info['total'] < MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN) && (substr_count($_SESSION['shipping']['id'], 'freeoptions') !=0) && !empty($_SESSION['cot_gv']) && (($_SESSION['cot_gv'] + $order->info['total']) >= MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN)) { // Do the following (show button) if total is below the min, free options is offered, a gift certificate is used and the sum of the gift certificate and order total is equal to or greater than the minimum.

     ?>
<!-- bof disable checkout button from displaying 1 of 3 -->

<!--bof submit block -->
  <div id="checkoutOneSubmit" class="buttonRow forward">
    <span id="opc-order-confirm"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_CONFIRM, BUTTON_CHECKOUT_ONE_CONFIRM_ALT); ?></span>
    <span id="opc-order-review"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_REVIEW, BUTTON_CHECKOUT_ONE_REVIEW_ALT); ?></span>
    <?php echo zen_draw_hidden_field('order_confirmed', '1', 'id="confirm-the-order"') . zen_draw_hidden_field ('current_order_total', '0', 'id="current-order-total"'); ?>
  </div>
<?php
    if (!empty($order->customer['email_address'])) {
?>
  <div id="checkoutOneEmail" class="forward clearRight"><?php echo sprintf(TEXT_CONFIRMATION_EMAILS_SENT_TO, $order->customer['email_address']); ?></div>
<?php
    }
?>
  <div class="clearBoth"></div>
<!--eof submit block -->

<!-- bof disable checkout button from displaying 2 of 3 -->
 <?php } elseif (($order->info['total'] < MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN) && (substr_count($_SESSION['shipping']['id'], 'freeoptions') !=0)) { // Stop checkout if below the minimum and free options is displayed (Note that at this point of execution, the gift certificate is not a factor because if it "helped" then this code is not reached).
    echo '<div style="border: 3px solid #777777; padding: 10px 0;"><p style="text-align: center;"><strong>Your order no longer qualifies for Free Shipping.</strong></p>';  
    
  } else { // standard checkout, basically total is anything that doesn't cause freeoptions to display.
?> 
<!-- eof disable checkout button from displaying 2 of 2 -->

<!--bof submit block -->
  <div id="checkoutOneSubmit" class="buttonRow forward">
    <span id="opc-order-confirm"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_CONFIRM, BUTTON_CHECKOUT_ONE_CONFIRM_ALT); ?></span>
    <span id="opc-order-review"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_REVIEW, BUTTON_CHECKOUT_ONE_REVIEW_ALT); ?></span>
    <?php echo zen_draw_hidden_field('order_confirmed', '1', 'id="confirm-the-order"') . zen_draw_hidden_field ('current_order_total', '0', 'id="current-order-total"'); ?>
  </div>
<?php
    if (!empty($order->customer['email_address'])) {
?>
  <div id="checkoutOneEmail" class="forward clearRight"><?php echo sprintf(TEXT_CONFIRMATION_EMAILS_SENT_TO, $order->customer['email_address']); ?></div>
<?php
    }
?>
  <div class="clearBoth"></div>
<!--eof submit block -->

//<!-- bof disable checkout button from displaying 3 of 3 -->
<?php
}
} 
}
2 Jun 2022, 8:31 PM
#2329
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
362
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

I need some help to modify the display showing the billing address and shipping address. By OPC default, billing shows on the top and billing (if different than shipping) shows on the bottom. I want to display shipping on the top and billing on the bottom. We are selling physical products so we want the shipping address on the top. I did some tests, and I narrow down this function into following three php files:

\includes\templates\template_default\templates

tpl_checkout_one_default.php, tpl_modules_opc_billing_address.php and tpl_modules_opc_shipping_address.php

tpl_checkout_one_default.php file is very clear. It has two sections, one for billing and one for shipping. Just swap two sections.

The part I'm not sure is the location for the question "Shipping Address, Same as Billing". By default, this question is between the billing block and shipping block. After I changed the tpl_checkout_one_default.php, this question is above the "Billing/Shipping Address" section. I prefer to move it below this section instead, like the original OPC location, or the bottom of both address blocks.

I found the following code is located on the top of tpl_modules_opc_shipping_address.php and I suspected they are for this question. So I tried to move this section to the bottom of tpl_modules_opc_billing_address.php. It seems partially work. If I turn this question on/off for several times, or under some special patterns, the billing address block cannot be hidden anymore, unless I refreshed the whole page. So this display/hide function might use JavaScript, which I'm not familiar...

if ($is_virtual_order) {
    echo zen_draw_checkbox_field('shipping_billing', '1', false, 'id="shipping_billing" style="display: none;"');
} else {
    if (CHECKOUT_ONE_ENABLE_SHIPPING_BILLING == 'false') {
        echo zen_draw_checkbox_field('shipping_billing', '1', false, 'id="shipping_billing" style="display: none;"');
    } else {
?>
    <div id="checkoutOneShippingFlag" class="custom-control custom-checkbox" style="display: none;"><?php echo  zen_draw_checkbox_field('shipping_billing', '1', $shipping_billing, 'id="shipping_billing"');?>
      <label class="custom-control-label checkboxLabel" for="shipping_billing"><?php echo TEXT_USE_BILLING_FOR_SHIPPING; ?></label>
    </div>
<?php
    }
?>

Any help are appreciated.

20 Jun 2022, 8:12 AM
#2330
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: One-Page Checkout [Support Thread]

I am getting complaints from customers saying that the greyed out screen lags and takes ages to process a payment. This is through paypal and square up. Because there is a long delay, this confuses the customer. They are thinking that the payment isn't processing and the website has crashed. The greyed out screen is just grey and doesn't let the customers know that their payment is actually processing. It just stays grey for ages. I can't actually say whether people are clicking off this screen or not, but my orders have gone down since installing OPC so I suspect that customers are getting that far and thinking that nothing is happening.

I am running OPC 2.4.1 on Zen Cart 1.5.7D.

20 Jun 2022, 8:37 AM
#2331
titanowl avatar

titanowl

New Zenner

Join Date:
May 2022
Location:
Canada
Posts:
19
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

I've gone to the test site (https://vinosdefrutastropicales.com/zc157_bs4) using my sister's iPhone, added an item to the cart, went to guest-checkout and the DOB (05/31/1970) was accepted.

I have no idea why your devices' entry is different, but if you'll do the same as above with the devices that are not accepting the date-of-birth that will help me 'see' what is going on.

It seems this link that you mentioned uses different template from classic. I checked on the mobile and it does not pop the DOB , it asks to enter the DOB by typing it , but in my case the DOB cannot be typed, instead the date can be chosen from pop up. I believe the templates are different. So I suggest you use Classic Template to see how it goes, if you are able to enter DOB then if it goes to next step!.

20 Jun 2022, 10:41 AM
#2332
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

Nick1973:

I am getting complaints from customers saying that the greyed out screen lags and takes ages to process a payment. This is through paypal and square up. Because there is a long delay, this confuses the customer. They are thinking that the payment isn't processing and the website has crashed. The greyed out screen is just grey and doesn't let the customers know that their payment is actually processing. It just stays grey for ages. I can't actually say whether people are clicking off this screen or not, but my orders have gone down since installing OPC so I suspect that customers are getting that far and thinking that nothing is happening.

I am running OPC 2.4.1 on Zen Cart 1.5.7D.
A "standard" OPC installation displays a gif during the order processing. Perhaps you don't have /includes/templates/template_default/images/confirmation_one_loading.gif?

20 Jun 2022, 10:42 AM
#2333
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

TitanOwl:

It seems this link that you mentioned uses different template from classic. I checked on the mobile and it does not pop the DOB , it asks to enter the DOB by typing it , but in my case the DOB cannot be typed, instead the date can be chosen from pop up. I believe the templates are different. So I suggest you use Classic Template to see how it goes, if you are able to enter DOB then if it goes to next step!.

It is a different template, but the point was to see why some customers can't enter their DOB. Did you try choosing a date from the calendar popup provided by your phone ... i.e. that's not the template doing that popup.

20 Jun 2022, 10:45 AM
#2334
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

njcyx:

I need some help to modify the display showing the billing address and shipping address. By OPC default, billing shows on the top and billing (if different than shipping) shows on the bottom. I want to display shipping on the top and billing on the bottom. We are selling physical products so we want the shipping address on the top. I did some tests, and I narrow down this function into following three php files:

\includes\templates\template_default\templates

tpl_checkout_one_default.php, tpl_modules_opc_billing_address.php and tpl_modules_opc_shipping_address.php

tpl_checkout_one_default.php file is very clear. It has two sections, one for billing and one for shipping. Just swap two sections.

The part I'm not sure is the location for the question "Shipping Address, Same as Billing". By default, this question is between the billing block and shipping block. After I changed the tpl_checkout_one_default.php, this question is above the "Billing/Shipping Address" section. I prefer to move it below this section instead, like the original OPC location, or the bottom of both address blocks.

I found the following code is located on the top of tpl_modules_opc_shipping_address.php and I suspected they are for this question. So I tried to move this section to the bottom of tpl_modules_opc_billing_address.php. It seems partially work. If I turn this question on/off for several times, or under some special patterns, the billing address block cannot be hidden anymore, unless I refreshed the whole page. So this display/hide function might use JavaScript, which I'm not familiar...

if ($is_virtual_order) {
echo zen_draw_checkbox_field('shipping_billing', '1', false, 'id="shipping_billing" style="display: none;"');
} else {
if (CHECKOUT_ONE_ENABLE_SHIPPING_BILLING == 'false') {
echo zen_draw_checkbox_field('shipping_billing', '1', false, 'id="shipping_billing" style="display: none;"');
} else {
?>
<div id="checkoutOneShippingFlag" class="custom-control custom-checkbox" style="display: none;"><?php echo zen_draw_checkbox_field('shipping_billing', '1', $shipping_billing, 'id="shipping_billing"');?>
<label class="custom-control-label checkboxLabel" for="shipping_billing"><?php echo TEXT_USE_BILLING_FOR_SHIPPING; ?></label>
</div>

<?php } ?>
> 
> Any help are appreciated.
I'll suggest that you run the site with "Enable Shipping = Billing" set to false and, as you surmised, totally remove/comment-out the checkbox associated with the billing=shipping selection.  That would enable you to re-position the shipping address on top, but I'm not sure how that's going to work for guest-checkout.  It's been a while since I validated guest-checkout without shipping=billing.
20 Jun 2022, 4:07 PM
#2335
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: One-Page Checkout [Support Thread]

lat9:

A "standard" OPC installation displays a gif during the order processing. Perhaps you don't have /includes/templates/template_default/images/confirmation_one_loading.gif?

I installed 2.4.2 and it seemed faster.

I am still getting an issue with https://venturedesignandprint.co.uk which I have also installed 2.4.2 on.

On the Checkout One Page I can't click 'save changes' - it doesn't do anything. I am really struggling with finding the issue with this.

21 Jun 2022, 1:18 PM
#2336
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
362
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Hi lat9, thanks for your suggestion.

Now I'm using OPC (v2.4.1 with shipping address overwritten fix) for two weeks for my live site. It works great, but sometimes I will receive some duplicated orders (like once per week). They both use credit card payment method (paypal payment pro). And the order received interval time is about 2-3 minutes between the duplicated orders.

Before I used OPC, the chances for the duplicated order is like once per 3-4 months.

Does anyone have the same issues?

21 Jun 2022, 1:31 PM
#2337
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
362
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

I checked this previous post, and here is my answers:

What template is being used? Does it modify the tpl_ajax_checkout_confirmation.php template?
Custom template based on responsive_classic template.
I cannot find "tpl_ajax_checkout_confirmation.php" in my site. Maybe this file is no longer used?

Is the paypaldp payment-method included in the OPC's "Payment methods requiring confirmation" list?
No.

What version of jQuery is being loaded for the site?
3.5.1

What version of PHP is in use?
7.4

Is the OPC's configuration setting "Debug: Customer List" set to a non-blank value?
No. It is blank.

22 Jun 2022, 3:10 PM
#2338
gtgeorge avatar

gtgeorge

New Zenner

Join Date:
Mar 2005
Posts:
53
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Was this issue corrected? I recently installed version 2.4.1 and still experience this issue.

Originally Posted by lat9 [IMG]https://www.zen-cart.com/images/styles/zencart/buttons/viewpost-right.png[/IMG]
https://www.zen-cart.com/images/styl...quote_icon.png Originally Posted by gtgeorge https://www.zen-cart.com/images/styl...post-right.png
**Database Engine: ** MySQL 5.7.30
HP Version: 7.3.32 (Zend: 3.3.32)
Zen Cart 1.5.7d
Database Patch Level: 1.5.7b
OPC 2.3.11 (2022-02-09)

I installed OPC a few months back and have found it helpful for most customers. Thanks for this plugin.

I have an issue that seems to be giving customers a problem when they leave the checkout/cart page and add another item or make changes. When returning to the checkout page it displays a message "Your available shipping options have changed. Please re-select your desired shipping method." but we only have one shipping option available (table) and it is already selected with no way to re-select it. If doing a refresh the message disappears.

What is the site's table-rate shipping configuration? I'll try to reproduce the issue locally.

22 Jun 2022, 4:17 PM
#2339
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

A customer has reported a bug:

When credit card information is entered on the OPC page then a coupon is subsequently applied to the order, OPC clears the payment information (CC# etc) from the payment section. The customer has to then re-enter the payment information.

A workaround to this would be to put the DISCOUNT COUPON section before the payment section. This would eliminate most instances of this happening since the customer would TYPICALLY apply the coupon before entering their payment info, if the coupon section preceded the payment section.

But, the better fix would be to not have it happen at all.

Can I report this as a bug?

22 Jun 2022, 7:44 PM
#2340
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

njcyx:

I checked this previous post, and here is my answers:

What template is being used? Does it modify the tpl_ajax_checkout_confirmation.php template?
Custom template based on responsive_classic template.
I cannot find "tpl_ajax_checkout_confirmation.php" in my site. Maybe this file is no longer used?

Is the paypaldp payment-method included in the OPC's "Payment methods requiring confirmation" list?
No.

What version of jQuery is being loaded for the site?
3.5.1

What version of PHP is in use?
7.4

Is the OPC's configuration setting "Debug: Customer List" set to a non-blank value?
No. It is blank.
The "tpl_ajax_checkout_confirmation.php" file should be present in the /includes/templates/template_default/templates sub-directory.

I'm not sure what's going on with your duplicated orders. I don't have access to a site that uses PayPal Payments Pro, so debugging is going to be difficult.