Post by cirrussky » Sat Jun 23, 2012 6:06 pm

Is there a way to change the default setting for the newsletter when a person registers to YES?

thanks!

New member

Posts

Joined
Tue Feb 28, 2012 3:30 pm

Post by GoGo OpenCart » Sat Jun 23, 2012 7:09 pm

.../catalog/view/theme/default/template/account/register.tpl

1. After this:

Code: Select all

<td><?php echo $entry_newsletter; ?></td>
Add this:

Code: Select all

<?php $newsletter = 1 ?>
or

2. Change this:

Code: Select all

<?php if ($newsletter) { ?>
into this:

Code: Select all

<?php if (true) { ?>
or

3. Change this:

Code: Select all

            <input type="radio" name="newsletter" value="1" checked="checked" />
            <?php echo $text_yes; ?>
            <input type="radio" name="newsletter" value="0" />
            <?php echo $text_no; ?>
            <?php } else { ?>
            <input type="radio" name="newsletter" value="1" />
            <?php echo $text_yes; ?>
            <input type="radio" name="newsletter" value="0" checked="checked" />
into this:

Code: Select all

            <input type="radio" name="newsletter" value="1" />
            <?php echo $text_yes; ?>
            <input type="radio" name="newsletter" value="0" checked="checked" />
            <?php echo $text_no; ?>
            <?php } else { ?>
            <input type="radio" name="newsletter" value="1" checked="checked" />
            <?php echo $text_yes; ?>
            <input type="radio" name="newsletter" value="0" />
You choose which way you want to use ;)
Last edited by GoGo OpenCart on Sat Jun 23, 2012 7:31 pm, edited 2 times in total.

See all my extensions: https://www.opencart.com/index.php?rout ... 20OpenCart


User avatar
Active Member

Posts

Joined
Mon Nov 14, 2011 11:30 pm

Post by jarek79 » Sat Jun 23, 2012 7:11 pm


Amazing Gift Boxes - Is an online shop specializing in unique and exclusive hand made gift packaging. Use promo code "code10" to get 10% off and free delivery on orders over £30. | Gift Bags | Gift Boxes


User avatar
New member

Posts

Joined
Tue Jun 05, 2012 10:23 pm


Post by straightlight » Sat Jun 23, 2012 10:09 pm

You also may want to see this simple topic: http://forum.opencart.com/viewtopic.php?f=20&t=57747

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

Post by cirrussky » Sun Jun 24, 2012 4:20 pm

Thanks for all the info!! I don't want to use a mod to do something that can be done without it. Plus, don't like to use mods that add links to websites and such on my website.

Sky

New member

Posts

Joined
Tue Feb 28, 2012 3:30 pm

Post by straightlight » Sun Jun 24, 2012 7:39 pm

I wouldn't call this one a 'MOD' but more of a 'small tweak' ... besides, template modifications ain't really about MODding. Only core files which, this time, it isn't VQModed granted but it's only 1 line to demonstrate that the required modifications for this request does work as intended.

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

Post by samolesong76 » Sun Jun 24, 2012 8:37 pm

straightlight wrote:I wouldn't call this one a 'MOD' but more of a 'small tweak' ... besides, template modifications ain't really about MODding. Only core files which, this time, it isn't VQModed granted but it's only 1 line to demonstrate that the required modifications for this request does work as intended.
Really? We'll let the guy call it a "mod" because he has his own reasons lol. ::)

New member

Posts

Joined
Sun Apr 22, 2012 12:39 am

Post by straightlight » Sun Jun 24, 2012 8:45 pm

Own reasons and logic in programming are two different paths, nevertheless.

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

Post by Avvici » Mon Jun 25, 2012 1:19 am

samolesong76 wrote:
straightlight wrote:I wouldn't call this one a 'MOD' but more of a 'small tweak' ... besides, template modifications ain't really about MODding. Only core files which, this time, it isn't VQModed granted but it's only 1 line to demonstrate that the required modifications for this request does work as intended.
Really? We'll let the guy call it a "mod" because he has his own reasons lol. ::)
It's what we do here. We "teach" as well as offer support. There are no bad students, only bad teachers. No, we can't expect everyone to think like a programmer because most on here are not. However, we do our best to deliver a truthful message.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by samolesong76 » Mon Jun 25, 2012 1:21 am

avvici wrote:
samolesong76 wrote:
straightlight wrote:I wouldn't call this one a 'MOD' but more of a 'small tweak' ... besides, template modifications ain't really about MODding. Only core files which, this time, it isn't VQModed granted but it's only 1 line to demonstrate that the required modifications for this request does work as intended.
Really? We'll let the guy call it a "mod" because he has his own reasons lol. ::)
It's what we do here. We "teach" as well as offer support. There are no bad students, only bad teachers. No, we can't expect everyone to think like a programmer because most on here are not. However, we do our best to deliver a truthful message.
There is a difference between being nit-picky and programmatic. ;D

New member

Posts

Joined
Sun Apr 22, 2012 12:39 am

Post by Avvici » Mon Jun 25, 2012 1:25 am

There is a difference between being nit-picky and programmatic. ;D
<?phpecho $nitpicky;?>

The difference between that line of code and this: <?php echo $nitpicky;?> is one white space but to not have that white space would break the entire procedure. You call it nit-picky. We call it critical.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC
Who is online

Users browsing this forum: No registered users and 96 guests