Re: 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 Code:
<?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 Code:
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.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
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 Code:
<?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 Code:
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 Code:
<?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>
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
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 Code:
<?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.
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
Re: One-Page Checkout [Support Thread]
disregard I found the file path....
templates/tpl_modules_opc_address_block.php
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
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'.
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)
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
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?
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.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
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.