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

One-Page Checkout [Support Thread]

Views: 633,121

Results 2,601 to 2,620 of 3,107
27 Mar 2023, 12:00 AM
#2601
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

One-Page Checkout [Support Thread]

Just to add onto my previous post above, even though the checkbox is not interactable or visible to the user, it IS still there to some degree.

If I go to the input element immediately preceding the Reward Points box, and then hit TAB (to jump to the invisible checkbox for Rewards), hit ENTER (to select it), and then APPLY, it will apply the rewards to the order.

It's just like the checkbox isn't displaying properly and I don't know what else to do to troubleshoot it.

Attachment 20238

  • Jeff
27 Mar 2023, 12:10 AM
#2602
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

If it helps, this is currently how we have the Reward Points module creating the checkbox:

$prompt=zen_draw_checkbox_field('redeem_flag',true,isset($_SESSION['redeem_value']),' class="opc-cc-submit"').' '.zen_draw_hidden_field('redeem_checkout_flag',1);

  • Jeff
27 Mar 2023, 1:09 AM
#2603
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Cindy - Okay, I found out WHY it's not displaying, but need your advice on how to workaround it.

The reason why is the CLASS name of the input: custom-control-input

Not Working: <input type="checkbox" name="redeem_flag" value="1" class="**custom-control-input** opc-cc-submit">

Working: <input type="checkbox" name="redeem_flag" value="1" class="**opc-cc-submit**">

So I would like to know how to do one of the following:

  1. Either how to remove the "custom-control-input" from being added to this checkbox

  2. Or possibly better, I don't mind leaving things as-is (with a hidden checkbox) as long as hitting the APPLY button will automatically apply the Reward Point value towards the order. Right now, hitting APPLY with the hidden class="custom-control-input opc-cc-submit" is not applying anything.

But again, if I go into INSPECT MODE on my browser and remove the "custom-control-input" so that it looks like this (), then I see the checkbox perfectly fine and it will APPLY the Reward Points.

Any thoughts?

It looks like the code that the Reward Point module is using to create the checkbox is this:

$prompt=zen_draw_checkbox_field('redeem_flag',true,isset($_SESSION['redeem_value']),' class="opc-cc-submit"').' '.zen_draw_hidden_field('redeem_checkout_flag',1);

Attachment 20239

  • Jeff
27 Mar 2023, 11:38 AM
#2604
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

@Jeff_Mash, using the formatting in the tpl_modules_opc_conditions.php as a base, it looks like the reward points module needs to format its checkbox using something like

$prompt = 
    '<div class="custom-control custom-checkbox">' .
        zen_draw_checkbox_field('redeem_flag',true,isset($_SESSION['redeem_value']),' class="opc-cc-submit" id="redeem_flag"') . 
        ' ' . zen_draw_hidden_field('redeem_checkout_flag',1) .
        '<label class="custom-control-label checkboxLabel" for="redeem_flag"> </label>' .
    '</div>';
27 Mar 2023, 5:46 PM
#2605
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

@Jeff_Mash, using the formatting in the tpl_modules_opc_conditions.php as a base, it looks like the reward points module needs to format its checkbox using something like

$prompt =
'<div class="custom-control custom-checkbox">' .
zen_draw_checkbox_field('redeem_flag',true,isset($_SESSION['redeem_value']),' class="opc-cc-submit" id="redeem_flag"') .
'##' . zen_draw_hidden_field('redeem_checkout_flag',1) .
'<label class="custom-control-label checkboxLabel" for="redeem_flag">##</label>' .
'</div>';


You ROCK, Cindy!  That did the trick!
  • Jeff
27 Mar 2023, 9:49 PM
#2606
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

Jeff_Mash:

You ROCK, Cindy! That did the trick!
Thanks, @Jeff_Mash; I'm happy to help.

29 Mar 2023, 3:12 PM
#2607
carlwhat avatar

carlwhat

zennedOut

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

Re: One-Page Checkout [Support Thread]

simon1066:

Thanks for this. I'm currently on WebPay v1.0.1. I'll implement the temp workaround.

Have a good weekend.

hi simon,
i'm seeing different line numbers then what is in your error log.

no matter.

i would find the following code and make the following 2 code changes:

//from
'administrative_district_level_1' => (string)zen_get_zone_code($order->billing['country']['id'], $order->billing['zone_id'], $order->billing['state']),
//to
'administrative_district_level_1' => (string)zen_get_zone_code($order->billing['country']['id'], (int)$order->billing['zone_id'], $order->billing['state']),

//from
'administrative_district_level_1' => (string)zen_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], $order->delivery['state']),
//to
'administrative_district_level_1' => (string)zen_get_zone_code($order->delivery['country']['id'], (int)$order->delivery['zone_id'], $order->delivery['state']),

i would then revert line 173 back to its original form.

in addition, if there are still problems, lets move the conversation over to the square webpay forum thread so as to not continue to pollute this thread...

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

11 Apr 2023, 1:22 PM
#2608
cruiser avatar

cruiser

New Zenner

Join Date:
Aug 2006
Posts:
34
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Having an issue when international customers are checking out.

I duplicated their issue and tried various admin settings but can't seem to make this work.

Customer enters there address. Moves to change the country from United States to say Canada and the menu for Canada does not load in. It leaves the US states and just says:

"Please select a state from the States pull down menu."

Where should I look to fix this issue?

I'm on 1.5.8 and the newest OPC install. I'm not sure when this started to be an issue.

As a work around for now I removed the states as a drop down and set the minimum state value to 0. but its not ideal.

11 Apr 2023, 2:47 PM
#2609
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

cruiser:

Having an issue when international customers are checking out.

I duplicated their issue and tried various admin settings but can't seem to make this work.

Customer enters there address. Moves to change the country from United States to say Canada and the menu for Canada does not load in. It leaves the US states and just says:

"Please select a state from the States pull down menu."

Where should I look to fix this issue?

I'm on 1.5.8 and the newest OPC install. I'm not sure when this started to be an issue.

As a work around for now I removed the states as a drop down and set the minimum state value to 0. but its not ideal.
@cruiser, I'm unable to reproduce the issue on OPC 2.4.6, Zen Cart 158a. What template is in use?

19 Apr 2023, 12:04 PM
#2610
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

OPC 2.4.5 + Square + ZC 157c + Bootstrap
When I go to checkout, everything is fine unless I change shipping to "Store Pickup." When I do this, the credit card fields (number, expiry, cvv) change to a button labelled "Use Credit Card." Pressing this button grays the screen but doesn't reveal the fields.
The workaround I used was to change Admin > Configuration > OPC > Payment-Block Action on Shipping Change to Refresh (from Update), and this fixes it - the "Use Credit Card" button is displayed for just a second and then the fields re-appear.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

19 Apr 2023, 4:14 PM
#2611
carlwhat avatar

carlwhat

zennedOut

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

Re: One-Page Checkout [Support Thread]

swguy:

...the "Use Credit Card" button is displayed for just a second and then the fields re-appear.

the use credit card button is just a place holder. the button itself does nothing... it gets replaced by functions within the square javascript code.

if you do NOT want to see it you can find the code in includes/modules/payment/square_webPay.php and change:

//from
                 'fields' => [
                    [
                        'title' => '',
                        'field' => '<div id="card-container" ></div>
                            <button id="card-button" type="button">Use Credit Card</button>',
                    ],
//to:
                 'fields' => [
                    [
                        'title' => '',
                        'field' => '<div id="card-container" ></div>
                            <button id="card-button" type="button" hidden>Use Credit Card</button>',
                    ],

the problem that you are experiencing is again a javascript loading issue, and your workaround is fine. it would be nice to not have to do a complete page reload, but digging into the javascript right now is low on my totem pole...

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

19 Apr 2023, 5:45 PM
#2612
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

It's all good. I was just surprised because I don't recall ever having seen this scenario.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

15 May 2023, 4:44 PM
#2613
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

Guest Checkout with OPC - PHP 7.4 and Zen Cart 1.5.7c, OPC 2.4.5 (2022-12-27). Has anyone else seen this? Happens once in a while, not consistently.

[14-May-2023 21:32:45 UTC] PHP Notice: Malformed value for session-based shipping module; customer will need to re-select: {"id":"","title":"United Parcel Service (UPS Ground)","cost":35.76100000000000278532752417959272861480712890625} in /home/client/public_html/includes/classes/order.php on line 323

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

17 May 2023, 1:33 PM
#2614
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

swguy:

Guest Checkout with OPC - PHP 7.4 and Zen Cart 1.5.7c, OPC 2.4.5 (2022-12-27). Has anyone else seen this? Happens once in a while, not consistently.

[14-May-2023 21:32:45 UTC] PHP Notice: Malformed value for session-based shipping module; customer will need to re-select: {"id":"","title":"United Parcel Service (UPS Ground)","cost":35.76100000000000278532752417959272861480712890625} in /home/client/public_html/includes/classes/order.php on line 323
I've seen that, usually on the shopping-cart page, when a shipping method like UPS or USPS can't ship to the customer's selected country/state; nothing IMO to do with OPC.

17 May 2023, 6:52 PM
#2615
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

Seems to only happen in OPC (and only occasionally). I'm going to try a page reload when this happens to see if that helps.
Happens when the user hits confirm.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

20 Jun 2023, 5:23 PM
#2616
archelaus avatar

archelaus

New Zenner

Join Date:
Jul 2008
Posts:
24
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

ZC 1.5.8a, OPC 2.4.5

I'm in the final stages of customizing a brand new website. I thought I finally had everything under control, but I must have done something wrong at the last minute yesterday, because today I'm getting the error message, "Please contact the store owner; some required elements of this page are missing," when the program switches from tpl_login_guest.php to tpl_checkout_one_default.php. When I hit F12, I am told that jscript is saying that "Missing #orderTotalDivs" is the culprit, but I'm not entirely sure what that signifies. I made some modifications to the classes/order.php file, but I have not touched the classes/order_total.php file. Moreover, reverting classes/order.php to the original file doesn't fix the problem. When I click the "OK" button on the error message, the program resumes and lets the transaction proceed all the way through without further complaint. Any ideas? Thanks!

20 Jun 2023, 5:30 PM
#2617
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

archelaus:

ZC 1.5.8a, OPC 2.4.5

I'm in the final stages of customizing a brand new website. I thought I finally had everything under control, but I must have done something wrong at the last minute yesterday, because today I'm getting the error message, "Please contact the store owner; some required elements of this page are missing," when the program switches from tpl_login_guest.php to tpl_checkout_one_default.php. When I hit F12, I am told that jscript is saying that "Missing #orderTotalDivs" is the culprit, but I'm not entirely sure what that signifies. I made some modifications to the classes/order.php file, but I have not touched the classes/order_total.php file. Moreover, reverting classes/order.php to the original file doesn't fix the problem. When I click the "OK" button on the error message, the program resumes and lets the transaction proceed all the way through without further complaint. Any ideas? Thanks!
What template is in use? Those "missing elements" messages come from the OPC jQuery when it is looking for required "CSS Selectors", many of which (especially the order-total related ones) are customizable in the admin's Configuration :: One-Page Checkout Settings.

20 Jun 2023, 6:59 PM
#2618
archelaus avatar

archelaus

New Zenner

Join Date:
Jul 2008
Posts:
24
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

What template is in use? Those "missing elements" messages come from the OPC jQuery when it is looking for required "CSS Selectors", many of which (especially the order-total related ones) are customizable in the admin's Configuration :: One-Page Checkout Settings.

I'm using a custom template that began as Responsive Classic but no longer has any meaningful similarity to it. I've also customized the various CSS files that came with OPC and deleted the responsive.css and responsive_default.css files, which were interfering with the way I was making the site responsive to changes in screen size. All of that was done, however, long before this problem happened today. I don't think I was changing any CSS files late yesterday, and I know I wasn't today.

The only thing I'm seeing in One-Page Checkout Settings that looks relevant is "Order Total, jQuery Selector," which has been set to "#ottotal > div:first-child" since the beginning, because I didn't know what it meant and had no reason to change it.

Does that help clarify where things stand? Sorry to be so clueless. Thanks in advance!

20 Jun 2023, 8:00 PM
#2619
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

Is the test site publicly available or could you send me a link to the site via PM so that I can see what's going on?

OPC expects to find all of the order-total names and prices within an HTML element with the 'id' of orderTotalDivs; that's where the "Missing #orderTotalDivs" message comes from.

23 Jun 2023, 8:10 AM
#2620
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: One-Page Checkout [Support Thread]

I can think of two possibilities.

  1. you have modified the tpl_modules_opc_shopping_cart.php or its missing (YOURSITE>includes>templates>template_default>templates) or the copy in your template
  2. MODULE_ORDER_TOTAL_INSTALLED is missing from the configuration table on your database.

Mark Brittain
http:\innerlightcrystals.co.uk\sales\