Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Modify Newsletter box Rate Topic   * * * * - 1 votes

 
  • hbtrading
  • Senior Member
  • Members
  • Join Date: 07-Oct 09
  • 204 posts

Posted 03 March 2010 - 09:39 PM #1

How do I remove the checkbox and the ability to select the newsletter format when the customer signs up for a newsletter ? I would like for it to default to only one newsletter name and to HTML format.

Thanks in advance.

 
  • PKoscianski
  • Junior Member
  • Members
  • Join Date: 24-Feb 10
  • 8 posts

Posted 03 March 2010 - 10:22 PM #2

Who sends today "text only" newletters?
I want to swich off the possibility of selecting type of newsletter (html/text).

How to remove this selection?

 
  • jobosales
  • Senior Member
  • Members
  • Join Date: 04-Nov 06
  • 3114 posts

Posted 03 March 2010 - 11:36 PM #3

Take a look at /skins/YOURSKIN/customer/addons/news_and_emails/blocks/subscribe.tpl

Bob
CS-Cart 2.0.14 (testing)

 
  • hbtrading
  • Senior Member
  • Members
  • Join Date: 07-Oct 09
  • 204 posts

Posted 04 March 2010 - 12:33 AM #4

Thanks.

but I got no idea to what I need to change the code to in order to effect the changes I want.

 
  • hbtrading
  • Senior Member
  • Members
  • Join Date: 07-Oct 09
  • 204 posts

Posted 11 March 2010 - 09:38 PM #5

Ok figured it out:

To have it default to HTML newsletter and hide the select-box go to:
skin/yourskin/customer/addons/news_and_emails/blocks/subscribe.tpl
replace
<option value="{$smarty.const.NEWSLETTER_FORMAT_TXT}">{$lang.txt_format}</option>
	<option value="{$smarty.const.NEWSLETTER_FORMAT_HTML}">{$lang.html_format}</option>
with
<option value="{$smarty.const.NEWSLETTER_FORMAT_HTML}">{$lang.html_format}</option>
	<option value="{$smarty.const.NEWSLETTER_FORMAT_TXT}">{$lang.txt_format}</option>

then add the following to your CSS file
#newsletter_format {
	display:none;
}


 
  • anielska
  • Junior Member
  • Members
  • Join Date: 08-Jul 09
  • 5 posts

Posted 18 March 2010 - 02:04 PM #6

Or

Remove

<select name="newsletter_format" id="newsletter_format">
	<option value="{$smarty.const.NEWSLETTER_FORMAT_TXT}">{$lang.txt_format}</option>
	<option value="{$smarty.const.NEWSLETTER_FORMAT_HTML}">{$lang.html_format}</option>
</select>

And add

<input type="hidden" id="newsletter_format" name="newsletter_format" value="{$smarty.const.NEWSLETTER_FORMAT_HTML}">


 
  • MurrinMedia
  • Junior Member
  • Members
  • Join Date: 13-Apr 10
  • 43 posts

Posted 16 April 2010 - 02:04 AM #7

What about the other part of the OP?

The notion of not having a checkbox for the newsletters and it defaults to adding the one you have?

I am interested in this :)

 

Posted 07 July 2010 - 05:36 PM #8

What about the other part of the OP?

The notion of not having a checkbox for the newsletters and it defaults to adding the one you have?

I am interested in this :)


Just thought I would update this as ive just done it.

To remove the checkbox and all other text so you are just left with an email field and submit button just replace the text in subscribe.tpl to the text below, I havent tried it with multiple mailing lists but it works with a single one and adds the subscriber to it, set up an auto responde with a confirm link to confirm the subscriber sign up.

You will be left with a newsletter box like this one
Posted Image

{* $Id: subscribe.tpl 7806 2009-08-12 10:22:35Z alexions $ *}
{** block-description:mailing_lists **}

{if $mailing_lists}
<form action="{$index_script}" method="post" name="subscribe_form">
<input type="hidden" name="redirect_url" value="{$config.current_url}" />

{foreach from=$mailing_lists item=list}
	<div class="select-field">
		<input id="mailing_list_{$list.list_id}" type="hidden" class="hidden" name="mailing_lists[{$list.list_id}]" value="1" />
	</div>
{/foreach}
<input type="hidden" id="newsletter_format" name="newsletter_format" value="{$smarty.const.NEWSLETTER_FORMAT_HTML}">
</select>
{strip}
<div class="form-field">
	<label for="subscr_email" class="cm-required cm-email hidden">{$lang.email}</label>
	<input type="text" name="subscribe_email" id="subscr_email" size="20" value="{$lang.enter_email|escape:html}" class="input-text cm-hint" />
	{include file="buttons/go.tpl" but_name="newsletters.add_subscriber" alt=$lang.go}
</div>
{/strip}
</form>
{/if}


 
  • purelife
  • Member
  • Members
  • Join Date: 24-Jun 10
  • 61 posts

Posted 20 August 2010 - 05:57 AM #9

^
I tried this code above and it works but then my box says Mailing lists and not Join our Mailing list.

I tried going into customization mode and translation mode as well as searching "mailing" under languages but can't find anywhere to change the heading to Join our mailing list.

any tips thanks.

 
  • purelife
  • Member
  • Members
  • Join Date: 24-Jun 10
  • 61 posts

Posted 26 August 2010 - 05:51 AM #10

can this code work for the checkout page too? i would like it to default to HTML

Posted Image

 
  • purelife
  • Member
  • Members
  • Join Date: 24-Jun 10
  • 61 posts

Posted 26 August 2010 - 05:21 PM #11

can this code also be used on the checkout form?
i want it to default to HTML as well

Posted Image

 
  • purelife
  • Member
  • Members
  • Join Date: 24-Jun 10
  • 61 posts

Posted 11 September 2010 - 02:26 AM #12

hi anybody enlighten me on which file to edit to have HTML default on the newsletter option on checkout page?

thanks.

 
  • hbtrading
  • Senior Member
  • Members
  • Join Date: 07-Oct 09
  • 204 posts

Posted 13 September 2010 - 09:16 PM #13

This is how I did it, bare in mind I'm an amateur when it comes to these things.

Files to edit:
/skins/YOURSKIN/customer/addons/news_and_emails/blocks/subscribe.tpl
/skins/YOURSKIN/customer/style.css

in
/skins/YOURSKIN/customer/addons/news_and_emails/blocks/subscribe.tpl

change (2 instances)
<div class="select-field">
to
<div class="subscription-select-field">

also REPLACE
<select name="newsletter_format" id="newsletter_format{$block.block_id}">
<option value="{$smarty.const.NEWSLETTER_FORMAT_HTML}">{$lang.HTML_format}</option>
<option value="{$smarty.const.NEWSLETTER_FORMAT_TXT}">{$lang.TXT_format}</option>
</select>
with
<input type="hidden" id="newsletter_format" name="newsletter_format" value="{$smarty.const.NEWSLETTER_FORMAT_HTML}">


now in
/skins/YOURSKIN/customer/style.css file

add the following code
.subscription-select-field {
display: none;

}

 
  • srm110
  • Member
  • Members
  • Join Date: 17-Apr 08
  • 32 posts

Posted 13 September 2010 - 10:41 PM #14

The last post worked great for the sidebox but anyone know what to edit for the register and profile pages?

Still has the plain format box
cheers
Scott

 
  • hbtrading
  • Senior Member
  • Members
  • Join Date: 07-Oct 09
  • 204 posts

Posted 13 September 2010 - 11:24 PM #15

which version of cs-cart are you using ?

 
  • purelife
  • Member
  • Members
  • Join Date: 24-Jun 10
  • 61 posts

Posted 13 September 2010 - 11:40 PM #16

2.1.1

the post you replied up top, works for registration pages?
thanks.

 
  • hbtrading
  • Senior Member
  • Members
  • Join Date: 07-Oct 09
  • 204 posts

Posted 14 September 2010 - 12:00 AM #17

I don't see the newsletter signup box on the registration page, any idea how I enable it so I can take a look which file to edit ?

 
  • purelife
  • Member
  • Members
  • Join Date: 24-Jun 10
  • 61 posts

Posted 14 September 2010 - 01:31 AM #18

in adminstration go to content tab > join our mailing list > you need to have a mailing list there and edit the option to show on registration.

 
  • hbtrading
  • Senior Member
  • Members
  • Join Date: 07-Oct 09
  • 204 posts

Posted 14 September 2010 - 02:34 AM #19

After playing around with it a bit and getting nowhere this is what I noticed.

The Newsletter signup info on the checkout page is not directly affected by edits made to the newsletter signup side-box.

If anyone can shed some LIGHT on which file to edit to manipulate the newsletter signup info on the checkout page I would appreciate it very much !!!!!!
CS-Cart V. 2.1.1

 
  • hbtrading
  • Senior Member
  • Members
  • Join Date: 07-Oct 09
  • 204 posts

Posted 14 September 2010 - 02:52 PM #20

for registration pages you need to edit the following file

/skins/YOURSKIN/customer/addons/news_and_emails/hooks/checkout/checkout_steps.pre.tpl

replace all the text in that file with the following
{* $Id: checkout_steps.pre.tpl 10284 2010-07-30 09:08:26Z angel $ *}

{if $page_mailing_lists}
<div id="checkout-newsletter">
	{include file="common_templates/subheader.tpl" title=$lang.mailing_lists}

	<p>{$lang.text_signup_for_subscriptions}</p>
	
	{foreach from=$page_mailing_lists item=list}
		<div class="select-field">
			<input type="hidden" name="mailing_lists[{$list.list_id}]" value="0" />
			<label><input type="checkbox" checked="checked"  name="mailing_lists[{$list.list_id}]" value="1" {if $user_mailing_lists[$list.list_id]}checked="checked"{/if} class="checkbox" />{$list.object}</label>
		</div>
	{/foreach}

	<p><select name="newsletter_format">
    <option value="{$smarty.const.NEWSLETTER_FORMAT_HTML}" {if $newsletter_format == $smarty.const.NEWSLETTER_FORMAT_HTML}selected="selected"{/if}>{$lang.html_format}</option>
	<option value="{$smarty.const.NEWSLETTER_FORMAT_TXT}" {if $newsletter_format == $smarty.const.NEWSLETTER_FORMAT_TXT}selected="selected"{/if}>{$lang.txt_format}</option>
	</select></p>
    </div>

{/if}

then add this to your /skins/YOURSKIN/customer/style.css file

#checkout-newsletter{
display: none;
}