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

One-Page Checkout [Support Thread]

Views: 633,114

Results 2,721 to 2,740 of 3,107
3 Feb 2024, 11:09 AM
#2721
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

One-Page Checkout [Support Thread]

ZC v1.5.8a
OPC v2.4.6

On my create account (registered) page I have the compulsory privacy checkbox enabled and, unlike the newsletter checkbox, it does not remain checked upon page reload.

This would normally not be an issue except that I am now adding a reCaptcha to this page and if it is missed by the customer - it will cause a reload and clearing of the privacy checkbox, which may then be subsequently missed potentially causing yet another refresh and customer frustration.

I would like the privacy checkbox to remain checked on page reload. For a registered account the code is

\includes\templates\MY_TEMPLATE\templates\tpl_create_account_register.php

<?php 
    echo zen_draw_checkbox_field('privacy_conditions', '1', false, 'id="privacy"');
?>
<label class="checkboxLabel" for="privacy"><?php echo TEXT_PRIVACY_CONDITIONS_CONFIRM;?></label>

\includes\modules\pages\create_account\header_php_create_account_register.php

    if (DISPLAY_PRIVACY_CONDITIONS === 'true') {
        if (!(isset($_POST['privacy_conditions']) && $_POST['privacy_conditions'] === '1')) {
            $error = true;
            $messageStack->add('create_account', ERROR_PRIVACY_STATEMENT_NOT_ACCEPTED, 'error');
        }
    }

This obviously also occurs if it is a create account (full) page.

Simon

3 Feb 2024, 6:17 PM
#2722
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

simon1066:

ZC v1.5.8a
OPC v2.4.6

On my create account (registered) page I have the compulsory privacy checkbox enabled and, unlike the newsletter checkbox, it does not remain checked upon page reload.

This would normally not be an issue except that I am now adding a reCaptcha to this page and if it is missed by the customer - it will cause a reload and clearing of the privacy checkbox, which may then be subsequently missed potentially causing yet another refresh and customer frustration.

I would like the privacy checkbox to remain checked on page reload. For a registered account the code is

\includes\templates\MY_TEMPLATE\templates\tpl_create_account_register.php

<?php echo zen_draw_checkbox_field('privacy_conditions', '1', false, 'id="privacy"'); ?>

<label class="checkboxLabel" for="privacy"><?php echo TEXT_PRIVACY_CONDITIONS_CONFIRM;?></label>

> 
> \includes\modules\pages\create_account\header_php_create_account_register.php 
> ```php
    if (DISPLAY_PRIVACY_CONDITIONS === 'true') {
        if (!(isset($_POST['privacy_conditions']) && $_POST['privacy_conditions'] === '1')) {
            $error = true;
            $messageStack->add('create_account', ERROR_PRIVACY_STATEMENT_NOT_ACCEPTED, 'error');
        }
    }

This obviously also occurs if it is a create account (full) page.
Yep, that's just mimicking the behavior of the default tpl_modules_create_account.php. You can change that behavior by the following change:

<?php 
    echo zen_draw_checkbox_field('privacy_conditions', '1', isset($_POST['privacy_conditions']), 'id="privacy"');
?>
<label class="checkboxLabel" for="privacy"><?php echo TEXT_PRIVACY_CONDITIONS_CONFIRM;?></label>
3 Feb 2024, 7:28 PM
#2723
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

Yep, that's just mimicking the behavior of the default tpl_modules_create_account.php. You can change that behavior by the following change:

<?php echo zen_draw_checkbox_field('privacy_conditions', '1', isset($_POST['privacy_conditions']), 'id="privacy"'); ?>

<label class="checkboxLabel" for="privacy"><?php echo TEXT_PRIVACY_CONDITIONS_CONFIRM;?></label>


Thank for that, I would never have got there myself.

Simon

10 Feb 2024, 7:00 AM
#2724
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Zencart 1.5.8
php 8.1

I am working on setting up OPC with bootstrap ZCA template. I need to change the format of the guest checkout form.

When I do a guest checkout the form is as follows.
First name
Last Name
Country
State (need to remove drop down)
State/province etc…….

I can’t find the place to change the order of the forms,

Can someone assist me or lead me in the right direction. I feel like this is a silly question but I cant seem to locate where to make the changes

10 Feb 2024, 7:22 AM
#2725
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

disregard I found the file path....

templates/tpl_modules_opc_address_block.php

10 Feb 2024, 1:18 PM
#2726
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

chadlly2003:

Zencart 1.5.8
php 8.1

I am working on setting up OPC with bootstrap ZCA template. I need to change the format of the guest checkout form.

When I do a guest checkout the form is as follows.
First name
Last Name
Country
State (need to remove drop down)
State/province etc…….

I can’t find the place to change the order of the forms,

Can someone assist me or lead me in the right direction. I feel like this is a silly question but I cant seem to locate where to make the changes
Why do you need to remove the drop-down? It's automatically "not displayed" when Configuration :: Customer Details :: State field - Display as pulldown ... is set to 'true'.

11 Feb 2024, 4:37 AM
#2727
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

I did not mean remove dropdown. I chose poor working there.

I am looking to make it into an input instead of a drop down for state.

I am using OPC checkout and have the setting set to false. But the drop down for state is still there.

**In the admin I have **
State field - Display as pulldown when possible? (set to false)

11 Feb 2024, 2:47 PM
#2728
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

chadlly2003:

I did not mean remove dropdown. I chose poor working there.

I am looking to make it into an input instead of a drop down for state.

I am using OPC checkout and have the setting set to false. But the drop down for state is still there.

**In the admin I have **
State field - Display as pulldown when possible? (set to false)
For which country does this drop-down state still appear, even though you've turned it off in configuration?

12 Feb 2024, 1:50 AM
#2729
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

It does it with the United States. This is an out of the box installation.
So i have not made any changes. Maybe theirs another setting i missed in the back-end?

Its seems as if all the forms are coming up correctly with states as an input instead of a dropdown except for the OPC checkout.

12 Feb 2024, 4:39 AM
#2730
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

chadlly2003:

It does it with the United States. This is an out of the box installation.
So i have not made any changes. Maybe theirs another setting i missed in the back-end?

Its seems as if all the forms are coming up correctly with states as an input instead of a dropdown except for the OPC checkout.

Just to add some more information

template: Bootstrap ZCA
zencart 1.5.8
php. 8.1

In the admin I have
State field - Display as pulldown when possible? (set to false)

When this happens I loose the dropdown for all countries. Should not be? Should only be for the United States.

Canada is a good example where I used the dropdowns to select State/Province.

But I guess lets focus on the primary issue first.

13 Feb 2024, 2:31 AM
#2731
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Template: ZCA-Bootstrap-Template-3.6.1
php version: 8.1
zencart 1.5.8

Been trying to get this to work with no success.

With My current settings
State field - Display as pulldown when possible? (set to false).

I fill out the address in the form and click enter I get
“Please select a state from the States pull down menu. State field - Display as pulldown when possible?”

**Please note that OPC forms always shows the drop down no matter what the setting is. **
What am I doing wrong?

13 Feb 2024, 1:40 PM
#2732
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

You're doing nothing wrong; that's a base Zen Cart issue for the zc158 series.

See the following PRs for the changes: https://github.com/zencart/zencart/pull/5711/files superceded by https://github.com/zencart/zencart/pull/6020/commits/a67596f815b2fc04fe6e1ec22dc1485a45cc03f9

Note that the line numbers in the latter commit will be somewhat off from the zc158 release, due to module refactoring.

13 Feb 2024, 7:25 PM
#2733
andy_77 avatar

andy_77

New Zenner

Join Date:
Apr 2023
Location:
UK
Posts:
64
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Currently using V 2.4.5 of this plugin. If we upgrade to V 2.4.6, will we keep our current settings that we have with V 2.4.5 of this plugin, and can we safely upgrade to V 2.4.6, and keep all our existing settings?

Kind Regards,

Andy

13 Feb 2024, 9:41 PM
#2734
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

That seem to work for the site. I no longer have the drop down issue.
But as for the OPC I am still showing a state dropdown

Please note: I am currently using opc 2.4.6

14 Feb 2024, 3:19 AM
#2735
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

chadlly2003:

That seem to work for the site. I no longer have the drop down issue.
But as for the OPC I am still showing a state dropdown

Please note: I am currently using opc 2.4.6
That's an OPC "feechur" that was introduced in v2.3.2: https://github.com/lat9/one_page_checkout/issues/256

Unfortunately, I can't find the reference to what the "autofill" error looked like.

14 Feb 2024, 4:51 AM
#2736
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

LAt 9

If i got this correct i made the following changes. But that drop down issue still remains?

https://github.com/lat9/one_page_checkout/commit/af15b869b1e626cd3ca503d90fd026a1e52e1f52#diff-48ff9be287ce8a5470b4b6fc5b06369be3127311bd2e558f44ae2c3565dfd3504
14 Feb 2024, 12:10 PM
#2737
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

chadlly2003:

LAt 9

If i got this correct i made the following changes. But that drop down issue still remains?

https://github.com/lat9/one_page_checkout/commit/af15b869b1e626cd3ca503d90fd026a1e52e1f52#diff-48ff9be287ce8a5470b4b6fc5b06369be3127311bd2e558f44ae2c3565dfd3504


I did some more tests when going to the address book and changing or adding an address I get the drop down (Please select a state from the States pull down menu.)
14 Feb 2024, 1:16 PM
#2738
swguy avatar

swguy

Administrator

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

Re: One-Page Checkout [Support Thread]

On PHP 8.1, OPC 2.4.6, using Bootstrap 3.6.2, I get a super quick flash of
Sorry, but our expedited checkout process cannot be used.

then it disappears.

Could it be that having FedEx and UPS and USPS enabled takes longer than expected which causes this?

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.

14 Feb 2024, 1:22 PM
#2739
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

@chadlly2003, my point with that issue is that One-Page Checkout, starting with v2.3.2, will always use the state drop-downs if a country has defined zones, regardless the value of the configuration setting.

14 Feb 2024, 1:22 PM
#2740
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

swguy:

On PHP 8.1, OPC 2.4.6, using Bootstrap 3.6.2, I get a super quick flash of
Sorry, but our expedited checkout process cannot be used.

then it disappears.

Could it be that having FedEx and UPS and USPS enabled takes longer than expected which causes this?
In a word: Yes.