Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

News letter box pre-ticked

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-03-2009, 08:39 AM
 
swifty1 swifty1 is offline
 

eXpert
  
Join Date: Aug 2008
Location: UK
Posts: 327
 

Question News letter box pre-ticked

Hi i have seen some sites that have the subscribe to a newsletter box pre ticked, does anybody know how to do this in x-cart.

Cheers Tony
__________________
4.1.11 gold
x-special offers
CDSEO Pro
Reply With Quote
  #2  
Old 04-03-2009, 09:20 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: News letter box pre-ticked

skin1/modules/News_Management/register_newslists.tpl

Check this file .
Reply With Quote
  #3  
Old 04-04-2009, 02:50 AM
 
swifty1 swifty1 is offline
 

eXpert
  
Join Date: Aug 2008
Location: UK
Posts: 327
 

Default Re: News letter box pre-ticked

Thanks for that Vetrivel, i have added the checked="checked" in the code below after type="checkbox", this has worked but i am unsure as what to do with the rest of the code on the same line, do you have any sugestions.

Cheers Tony

<td><input type="checkbox" checked="checked" name="subscription[{$listid}]" {if $subscription[$listid] ne ""}checked="checked"{/if} /></td>
<td>{$newslists[idx].name}</td>
__________________
4.1.11 gold
x-special offers
CDSEO Pro
Reply With Quote
  #4  
Old 04-04-2009, 03:17 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: News letter box pre-ticked

you are asking about this condition ({if $subscription[$listid] ne ""}checked="checked"{/if}) right?

This is used to display the selected newslist.
EX:if you selected the one out of 5 newslist while registering then when you came back to modify profile .You can see the selected newslist.
Reply With Quote
  #5  
Old 04-04-2009, 03:25 AM
 
swifty1 swifty1 is offline
 

eXpert
  
Join Date: Aug 2008
Location: UK
Posts: 327
 

Default Re: News letter box pre-ticked

Yes this is the code i am unsure as what to do with, do i leave as is and the newsletter will work fine even though i have added checked="checked", the admin side will see the customer as requesting subscription to the newsletter, is this correct.
__________________
4.1.11 gold
x-special offers
CDSEO Pro
Reply With Quote
  #6  
Old 04-04-2009, 09:40 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: News letter box pre-ticked

See.What you are doing here is -> Making the customer to select all the newslist as default bvy checking the check box.But while registration customer can uncheck this option.

After register the default xcart will show the checked newslist here.

Leaving that code as it is will do nothing Because you override this by adding checked ="checked".

What is intention ?
Reply With Quote
  #7  
Old 04-05-2009, 01:30 AM
 
swifty1 swifty1 is offline
 

eXpert
  
Join Date: Aug 2008
Location: UK
Posts: 327
 

Default Re: News letter box pre-ticked

My intention is for the check boxes to be ticked by default, for the back end to show the customer as subscribed to the newsletter unless the customer wishes not to be subscribed for the newsletter then they can uncheck the check box.
__________________
4.1.11 gold
x-special offers
CDSEO Pro
Reply With Quote
  #8  
Old 07-03-2009, 12:55 PM
 
mike5906 mike5906 is offline
 

Member
  
Join Date: Jun 2009
Posts: 18
 

Default Re: News letter box pre-ticked

Quote:
Originally Posted by swifty1
Thanks for that Vetrivel, i have added the checked="checked" in the code below after type="checkbox", this has worked but i am unsure as what to do with the rest of the code on the same line, do you have any sugestions.

Cheers Tony

<td><input type="checkbox" checked="checked" name="subscription[{$listid}]" {if $subscription[$listid] ne ""}checked="checked"{/if} /></td>
<td>{$newslists[idx].name}</td>

Actually, you're really hurting the user experience here. If you just want people who are registering to have the box preticked, but members to act correctly (so they can tell what they are subscribed to), you should do this:

{if not $login} checked="checked"{/if}

That way, during the registration process they are ticked, but when visiting their profile, only what they are really subscribed to is ticked.
__________________
Mike | X-Cart 4.2.1 | Ubuntu 64 Server
MurraySoft :: The Application Store╝ for DotNetNuke, SharePoint, Web Design Templates, X-Cart and more!
http://www.MurraySoft.com/
Reply With Quote
  #9  
Old 07-30-2009, 06:49 AM
 
maxhodges maxhodges is offline
 

Member
  
Join Date: Nov 2005
Location: Tokyo, Japan
Posts: 23
 

Default Re: News letter box pre-ticked

You should alter the "<xart_dir>/skin1/modules/News_Management/register_newslists.tpl" template.

Find this code:
<input type="checkbox" name="subscription[{$listid}]" {if $subscription[$listid] ne ""}checked="checked"{/if} />

And replace it with this:
<input type="checkbox" name="subscription[{$listid}]" {if $subscription[$listid] ne "" or $login eq ""}checked="checked"{/if} />
__________________
Max Hodges
Creative Director
White Rabbit
www.whiterabbitpress.com
www.tokyorealtime.com
www.whiterabbitexpress.com
Reply With Quote

The following user thanks maxhodges for this useful post:
koz (08-26-2009)
  #10  
Old 11-27-2009, 04:43 PM
 
Pyro Pyro is offline
 

X-Adept
  
Join Date: Nov 2009
Posts: 506
 

Default Re: News letter box pre-ticked

Quote:
Originally Posted by maxhodges
You should alter the "<xart_dir>/skin1/modules/News_Management/register_newslists.tpl" template.

Find this code:
<input type="checkbox" name="subscription[{$listid}]" {if $subscription[$listid] ne ""}checked="checked"{/if} />

And replace it with this:
<input type="checkbox" name="subscription[{$listid}]" {if $subscription[$listid] ne "" or $login eq ""}checked="checked"{/if} />

I have tried this in 4.3 with no luck. Does anyone know if there is an alternative method for 4.3?

I would like to make sure that all newsletters are "checked" by default when a customer registers via checkout or normally.


Thanks in advance.
__________________
Best Wishes,
James

4.5.2 Gold (work in progress)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:28 AM.

   

 
X-Cart forums © 2001-2020