Post by inventer » Thu Feb 13, 2020 1:45 pm

Hi every one can any one tell me How can i make
this "I agree Term and condition Button checked by default . i want to write the checked condition checked in its Twig file but i don't know there that file is located

this is the screen shot URL https://prnt.sc/r1l3cs

Image

Newbie

Posts

Joined
Sat Feb 01, 2020 2:25 am

Post by xxvirusxx » Thu Feb 13, 2020 4:22 pm

Try checkout/register.twig

Change

Code: Select all

<input type="checkbox" name="newsletter" value="1" id="newsletter" />
To:

Code: Select all

<input type="checkbox" name="newsletter" value="1" id="newsletter" checked="checked"  />

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by inventer » Thu Feb 13, 2020 9:49 pm

xxvirusxx wrote:
Thu Feb 13, 2020 4:22 pm
Try checkout/register.twig

Change

Code: Select all

<input type="checkbox" name="newsletter" value="1" id="newsletter" />
To:

Code: Select all

<input type="checkbox" name="newsletter" value="1" id="newsletter" checked="checked"  />
It did the same that you showed but its not working . i am using Journal theme do u know how to do that in journal 3 theme

Newbie

Posts

Joined
Sat Feb 01, 2020 2:25 am

Post by xxvirusxx » Thu Feb 13, 2020 10:07 pm

Check settings...checkout..

Attachments

Screenshot_2020-02-13_16-09-02.png

Screenshot_2020-02-13_16-09-02.png (34.39 KiB) Viewed 3580 times


Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Burt65 » Fri Feb 14, 2020 10:01 am

inventer wrote:
Thu Feb 13, 2020 9:49 pm

It did the same that you showed but its not working . i am using Journal theme do u know how to do that in journal 3 theme
In Journal, you obviously need to do the changes in the Journal/checkout folder..

If you change only the Opencart files it won't show while you are using Journal checkout...

Over 95% of all computer problems can be traced back to the interface between the keyboard and the chair...


User avatar
Active Member

Posts

Joined
Mon Nov 18, 2013 3:23 pm
Location - Oz

Post by inventer » Tue Mar 03, 2020 6:26 pm

xxvirusxx wrote:
Thu Feb 13, 2020 10:07 pm
Check settings...checkout..
Hi my settings are the same but
Image

Image url https://prnt.sc/rat4la

I agree check box is not checked by default

Can u tell how to check I agree box checked using settings

Image

Newbie

Posts

Joined
Sat Feb 01, 2020 2:25 am

Post by xxvirusxx » Tue Mar 03, 2020 7:17 pm

Try to contact Journal 3 support.

or you can try this...
From catalog/view/theme/journal3/template/journal3/checkout/confirm.twig

Change this:

Code: Select all

<input v-model="agree" type="checkbox" />
To this:

Code: Select all

<input type="agree" type="checkbox" checked="checked" />

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by inventer » Tue Mar 03, 2020 7:59 pm

xxvirusxx wrote:
Tue Mar 03, 2020 7:17 pm
Try to contact Journal 3 support.

or you can try this...
From catalog/view/theme/journal3/template/journal3/checkout/confirm.twig

Change this:

Code: Select all

<input v-model="agree" type="checkbox" />
To this:

Code: Select all

<input type="agree" type="checkbox" checked="checked" />
Thank You Very Much It Worked

Newbie

Posts

Joined
Sat Feb 01, 2020 2:25 am

Post by xxvirusxx » Tue Mar 03, 2020 8:05 pm

inventer wrote:
Tue Mar 03, 2020 7:59 pm

Thank You Very Much It Worked
Possible not...because of this....
And I don't know if vue accept that type of code...

Code: Select all

v-model will ignore the initial value, checked, or selected attributes found on any form elements. It will always treat the Vue instance data as the source of truth. You should declare the initial value on the JavaScript side, inside the data option of your component.
https://vuejs.org/v2/guide/forms.html

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by inventer » Wed Mar 04, 2020 3:13 pm

xxvirusxx wrote:
Tue Mar 03, 2020 8:05 pm
inventer wrote:
Tue Mar 03, 2020 7:59 pm

Thank You Very Much It Worked
Possible not...because of this....
And I don't know if vue accept that type of code...

Code: Select all

v-model will ignore the initial value, checked, or selected attributes found on any form elements. It will always treat the Vue instance data as the source of truth. You should declare the initial value on the JavaScript side, inside the data option of your component.
https://vuejs.org/v2/guide/forms.html
Hi its not working properly its showing the checked box checked but when i confirm it showing error that i have to check the term and condition first
can u tell me how can i do that using javascript
thankyou

Newbie

Posts

Joined
Sat Feb 01, 2020 2:25 am

Post by xxvirusxx » Wed Mar 04, 2020 4:16 pm

You can post on Commercial section.

I don't know how VUE work :laugh:

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by egmajo » Fri May 21, 2021 5:15 pm

Just at catalog/controller/journal3 find checkout.php
and at
'agree' =>false,

make it

'agree' => true,

Newbie

Posts

Joined
Mon Mar 27, 2017 10:51 pm

Post by straightlight » Fri May 21, 2021 9:23 pm

Journal is not supported on the forum.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Users browsing this forum: No registered users and 24 guests