Results 1 to 10 of 3052

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,925
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by Nick1973 View Post
    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.

  2. #2
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by lat9 View Post
    What payment method? It sounds like something's not being recorded in the session on the initial 'confirm' click.
    Paypal and Square
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  3. #3
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,692
    Plugin Contributions
    11

    Default Re: One-Page Checkout [Support Thread]

    Getting the same with WebPay but only occasionally.

    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.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,925
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by Nick1973 View Post
    Paypal and Square
    Quote Originally Posted by dbltoe View Post
    Getting the same with WebPay but only occasionally.

    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.

  5. #5
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default 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 Code:
    <?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_CONFIRMBUTTON_CHECKOUT_ONE_CONFIRM_ALT); ?></span>
        <span id="opc-order-review"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_REVIEWBUTTON_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_CONFIRMBUTTON_CHECKOUT_ONE_CONFIRM_ALT); ?></span>
        <span id="opc-order-review"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_REVIEWBUTTON_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.

  6. #6
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,914
    Plugin Contributions
    13

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by mvstudio View Post
    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 Code:
    <?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_CONFIRMBUTTON_CHECKOUT_ONE_CONFIRM_ALT); ?></span>
        <span id="opc-order-review"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_REVIEWBUTTON_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_CONFIRMBUTTON_CHECKOUT_ONE_CONFIRM_ALT); ?></span>
        <span id="opc-order-review"><?php echo zen_image_button(BUTTON_IMAGE_CHECKOUT_ONE_REVIEWBUTTON_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.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  7. #7
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by carlwhat View Post
    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!

 

 

Similar Threads

  1. Set number of products displayed per page (support thread)
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 146
    Last Post: 2 Nov 2023, 12:50 AM
  2. v151 Banners In Main Page - Support Thread
    By stevesh in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Sep 2021, 03:36 PM
  3. v151 Site Map/Page Not Found: Combined [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 4 Jan 2016, 02:19 PM
  4. v151 PayPal Express Checkout Using NVP 84.0 [Support Thread]
    By lat9 in forum Addon Payment Modules
    Replies: 32
    Last Post: 28 Dec 2015, 04:54 PM
  5. Checkout Amazon Style -- Support Thread
    By CJPinder in forum All Other Contributions/Addons
    Replies: 72
    Last Post: 13 Apr 2011, 08:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg