X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   News letter box pre-ticked (https://forum.x-cart.com/showthread.php?t=46750)

swifty1 04-03-2009 08:39 AM

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

Vetrivel 04-03-2009 09:20 AM

Re: News letter box pre-ticked
 
skin1/modules/News_Management/register_newslists.tpl

Check this file .

swifty1 04-04-2009 02:50 AM

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>

Vetrivel 04-04-2009 03:17 AM

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.

swifty1 04-04-2009 03:25 AM

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.

Vetrivel 04-04-2009 09:40 AM

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 ?

swifty1 04-05-2009 01:30 AM

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.

mike5906 07-03-2009 12:55 PM

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.

maxhodges 07-30-2009 06:49 AM

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} />

Pyro 11-27-2009 04:43 PM

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.


All times are GMT -8. The time now is 03:57 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.