Post by magisterson » Fri Jun 29, 2018 7:12 pm

OC 2.2.0.0

Hi there. I need to add another required checkbox right after accept of terms and conditions and connect it with default "CONTINUE" button. It's because new UE law of personal data protection. I think it will be somewhere in "payment_method.tpl" file. I foud there button and checkbox for terms and conditions. This file looks like below. Can U help me?

Code: Select all

<?php if ($error_warning) { ?>
<div class="alert alert-warning"><i class="fa fa-exclamation-circle"></i> <?php echo $error_warning; ?></div>
<?php } ?>
<?php if ($payment_methods) { ?>
<p><?php echo $text_payment_method; ?></p>
<?php foreach ($payment_methods as $payment_method) { ?>
<div class="radio">
  <label>
    <?php if ($payment_method['code'] == $code || !$code) { ?>
    <?php $code = $payment_method['code']; ?>
    <input type="radio" name="payment_method" value="<?php echo $payment_method['code']; ?>" checked="checked" />
    <?php } else { ?>
    <input type="radio" name="payment_method" value="<?php echo $payment_method['code']; ?>" />
    <?php } ?>
    <?php echo $payment_method['title']; ?>
    <?php if ($payment_method['terms']) { ?>
    (<?php echo $payment_method['terms']; ?>)
    <?php } ?>
  </label>
</div>
<?php } ?>
<?php } ?>
<p><strong><?php echo $text_comments; ?></strong></p>
<p>
  <textarea name="comment" rows="8" class="form-control"><?php echo $comment; ?></textarea>
</p>
<?php if ($text_agree) { ?>
<div class="buttons">
  <div class="pull-right"><?php echo $text_agree; ?>
    <?php if ($agree) { ?>
    <input type="checkbox" name="agree" value="1" checked="checked" />
    <?php } else { ?>
    <input type="checkbox" name="agree" value="1" />
    <?php } ?>
    &nbsp;
    <input type="button" value="<?php echo $button_continue; ?>" id="button-payment-method" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary" />
  </div>
</div>
<?php } else { ?>
<div class="buttons">
  <div class="pull-right">
    <input type="button" value="<?php echo $button_continue; ?>" id="button-payment-method" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary" />
  </div>
</div>
<?php } ?>

New member

Posts

Joined
Tue Jul 23, 2013 10:15 pm

Post by straightlight » Fri Jun 29, 2018 9:23 pm

All TPL files using the agreement:

Code: Select all

catalog/view/theme/custom/template/account/affiliate.tpl
catalog/view/theme/custom/template/account/register.tpl
catalog/view/theme/custom/template/account/return_form.tpl
catalog/view/theme/custom/template/account/voucher.tpl
catalog/view/theme/custom/template/affiliate/register.tpl
catalog/view/theme/custom/template/checkout/payment_method.tpl
catalog/view/theme/custom/template/checkout/register.tpl
All Controller files using the agreement:

Code: Select all

catalog/controller/account/affiliate.php
catalog/controller/account/register.php
catalog/controller/account/return.php
catalog/controller/account/voucher.php
catalog/controller/affiliate/register.php
catalog/controller/checkout/payment_method.php
catalog/controller/checkout/register.php

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by magisterson » Fri Jun 29, 2018 11:20 pm

Thanks for reply :) I know I need to change something in payment_method -> php/tpl but I not good in programing :P And here is where I need little coding help :)

New member

Posts

Joined
Tue Jul 23, 2013 10:15 pm

Post by straightlight » Fri Jun 29, 2018 11:24 pm

No problem. You can always create a new request in the Commercial Support section of the forum to get this done as a custom job.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Richardorl » Sat Jun 30, 2018 12:03 am

Hi!

If this helps you here I add a link to an vqmod xml file I did to add the first layer on information after the mentioned checkbox in the payment section of the checkout.
https://www.dropbox.com/s/tsq8ky5p3a5dr ... d.xml?dl=0

Just edit where you see the XXXXXXXXXXXXXXXX text . For the rest of the text I'm not a lawyer, so I guest that the text can be improved... :P
It's in english and spanish, if you need any other language just add new sections to the file.
<file name="catalog/language/XXXXXXXXXXXXXXXXX/checkout/checkout.php">
etc...
</file>

Regards!

Newbie

Posts

Joined
Mon Jun 06, 2016 4:08 pm

Post by magisterson » Sat Jun 30, 2018 1:05 am

Richardorl wrote:
Sat Jun 30, 2018 12:03 am
If this helps you here I add a link to an vqmod xml file I did to add the first layer on information after the mentioned checkbox in the payment section of the checkout.
https://www.dropbox.com/s/tsq8ky5p3a5dr ... d.xml?dl=0

Just edit where you see the XXXXXXXXXXXXXXXX text . For the rest of the text I'm not a lawyer, so I guest that the text can be improved... :P
It's in english and spanish, if you need any other language just add new sections to the file.
<file name="catalog/language/XXXXXXXXXXXXXXXXX/checkout/checkout.php">
etc...
</file>
Nice solution but not for me :( I need only second, required checkbox linked to CONTINUE button with hyperlink linked to GDPR info page. User must check "Terms And Conditions" (it's exist already by default in OC) and also other checkbox "I accept GDPR rules". I was trying to add checkbox in HTML5 with REQUIRED attribute but when testing i was able to go forward without checking this html5 input :/

New member

Posts

Joined
Tue Jul 23, 2013 10:15 pm

Post by straightlight » Sat Jun 30, 2018 4:01 am

Lots of GDPR extensions possibilities you can look at: https://www.opencart.com/index.php?rout ... earch=GDPR

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by magisterson » Sun Jul 01, 2018 1:18 am

I don't think it's so big problem to use any extension. It's just a one checkbox, nothing more.

New member

Posts

Joined
Tue Jul 23, 2013 10:15 pm

Post by OSWorX » Sun Jul 01, 2018 7:01 pm

magisterson wrote:
Sun Jul 01, 2018 1:18 am
I don't think it's so big problem to use any extension. It's just a one checkbox, nothing more.
Guess you did not understand what the GDPR is.
And if it is only 'one checkbox', I am sure you can do it by yourself.

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by magisterson » Mon Jul 02, 2018 5:49 am

OSWorX wrote:
Sun Jul 01, 2018 7:01 pm
magisterson wrote:
Sun Jul 01, 2018 1:18 am
I don't think it's so big problem to use any extension. It's just a one checkbox, nothing more.
Guess you did not understand what the GDPR is.
And if it is only 'one checkbox', I am sure you can do it by yourself.
Our lawyer checked all page. I need only required checbox in this place (right after term and conditions checkbox). Other elements we already provide few months ago to website, but I don't know how to make this checbox. When I was trying to add html5 checkbox (or JS I found in stackoverflow) with REGUIRED attribute I got notification that I have to check this checkbox, but after that form is passing even if I did not checked it. Don't know how to connect it to CONTINUE button to make it required.

I found lot of topics on OC support forums like this: viewtopic.php?t=67833
All of them are without solution.

Nobody?

New member

Posts

Joined
Tue Jul 23, 2013 10:15 pm

Post by synapseindia » Mon Jul 02, 2018 1:50 pm

You can rename the page "Terms and Conditions" to something like "GDPR and Terms" . Put the content on this page with Bold Heading .
So that both can be done by only one checkbox.
No need for the second checkbox.

Thanks

User avatar
Active Member

Posts

Joined
Thu Apr 05, 2018 2:27 pm

Post by OSWorX » Mon Jul 02, 2018 2:08 pm

synapseindia wrote:
Mon Jul 02, 2018 1:50 pm
You can rename the page "Terms and Conditions" to something like "GDPR and Terms" . Put the content on this page with Bold Heading .
So that both can be done by only one checkbox.
No need for the second checkbox.

Thanks
Very bad advice!
Not allowed to combine both - TOC is TOC and GDPR is GDPR and both are not related in any way.

TOC has to be agreed at checkout (if existing because not required, and maybe mandadory to check) and are a binding agreement between you and your customer, overview of GDPR and how your business handle them is 'only' a information and nothing to check.

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria
Who is online

Users browsing this forum: Bing [Bot], julianashcroft and 19 guests