Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multiple Newsletters contribution


fixion

Recommended Posts

Thanks millions!

 

Somehow....

 

  require(DIR_WS_CLASSES . 'newsletters.php');

  $myLetters = new newsletters();

 

... was totally absent from my mail.php.

I guess I blinked in the installation process. It works like a charm now.

 

By the way, it works nicely with the HTML WYSIWYG contribution. Which is a bear to install and only worth it for the customer not for any osc webmaster, unless he wants the customer to edit their own pages more easily.

 

Next I am trying to get it to work well with that Frenchman's newletter subscriber v052 where people can subscribe without making accounts.

 

But the real challenge is to get newsindex to be multi-store enabled. I'm hoping Hobzilla will do that but he seems to not be around much lately so who knows when.

 

Thanks again!

Link to comment
Share on other sites

  • Replies 75
  • Created
  • Last Reply

Top Posters In This Topic

 

Hmmm, not sure what's up with the quoting on this one; normally it works great. Anyway, good deal; glad to hear that solved the problem.

 

BTW, I got curious about HTML editing, and did a search on WYSIWYG in the contribs. Looked at all of the results, and finally settled on HTMLArea, which isn't so much an osCommerce contribution as it is a drop-in-anywhere solution (though the contrib does have a convenient .php include file to further simplify life).

 

Installing it was as easy as unziping the package, changing the ownership/permissions, copying one file to admin/includes and making three one-line changes to (any form on which you want to use it); in this case admin/categories.php. (And, paranoid guy that *I* am, copying the .htaccess file from .../admin to the new htmlarea directory.)

 

But probably the biggest reason I chose it is because it supports Mozilla/Firefox as well as Internet Exploder. I may be able to run IE on my Linux desktop (really!), but that doesn't mean I *want* to. That the icon on my desktop for IE is a bomb with a lit fuse, well... That's just icing on the cake.

 

The HTMLArea package effectively works on _any_ "textarea" field (in or out of osCommerce), is fairly fast, and looks pretty decent. It does throw an odd javascript warning, but I can live with that.

 

Disclaimer: I have no connection to the project; I'm just another satisfied leech^h^h^h^h^h user. ;)

 

Last but not least, I don't do the multi-store thing, and am not really familiar with it. Got a URL for a site which uses it?

Link to comment
Share on other sites

  • 1 month later...

Hi All,

 

Is there someone that has problems with sending the newsletters only in plain text?

For some reason I cannot send the newsletters with HTML.

If I send a normal eMail to a customer or a invoice from within my shop, HTML is working perfectly.

 

I hope someone can give me a tip...hint...etc.

 

John

Link to comment
Share on other sites

Is there someone that has problems with sending the newsletters only in plain text?

For some reason I cannot send the newsletters with HTML.

If I send a normal eMail to a customer or a invoice from within my shop, HTML is working perfectly.

 

I hope someone can give me a tip...hint...etc.

 

John

 

Hi, John. I'm afraid I don't actually send any newsletters through the admin->newsletters interface; all of my go out batch, and mostly in Perl. However, I did look at the newsletter module, and it does appear to use the mime class, so at least theoretically it's _capable_ of sending HTML. I haven't a clue as to why it wouldn't be, though, especially if everything else on your site does HTML messages (i.e. the configuration option is not set to only permit TXT messages).

 

Hopefully someone else will have more insight. Did this problem only manifest after adding the multiple newsletter contribution?

Link to comment
Share on other sites

Hi, John.? I'm afraid I don't actually send any newsletters through the admin->newsletters interface; all of my go out batch, and mostly in Perl.? However, I did look at the newsletter module, and it does appear to use the mime class, so at least theoretically it's _capable_ of sending HTML.? I haven't a? clue as to why it wouldn't be, though, especially if everything else on your site does HTML messages (i.e. the configuration option is not set to only permit TXT messages).

 

Hopefully someone else will have more insight.? Did this problem only manifest after adding the multiple newsletter contribution?

 

Hi William,

 

Yes it worked without your contribution.

I have even test it with the HTML editor activated so I can enter a newsletter directly as HTML but every newsletter eMail arrives in plain text when send with your contribution.

If I send a message directly to a customer it uses the same mail.php and that eMail will arrive as HTML, but as far I can see this eMail is send from another part of the mail.php file.

This issue is driving me crazy (I allready was..) and hope that someone here could help me out or gives a hint where to look for the possible cause.

 

Thanks for you quick response :thumbsup:

 

John

Edited by JohnA
Link to comment
Share on other sites

Yes it worked without your contribution.

I have even test it with the HTML editor activated so I can enter a newsletter directly as HTML but every newsletter eMail arrives in plain text when send with your contribution.

If I send a message directly to a customer it uses the same mail.php and that eMail will arrive as HTML, but as far I can see this eMail is send from another part of the mail.php file.

This issue is driving me crazy (I allready was..) and hope that someone here could help me out or gives a hint where to look for the possible cause.

 

I'm still/even more baffled, John. The multiple newsletter contribution <b>should</b> not affect anything to do with the actual sending of the newsletters. The actual mechanics are in the admin/modules/newsletters/newsletters.php code, which (as far as I remember) isn't touched a lot by this mod....

 

1) To the other readers - has anyone else seen this problem?

2) John, could you send me copies of the files you modified for this contribution? ([email protected]; if that doesn't work, let me know.)

 

I'll try and work in some time to create a dummy newsletter and use the admin interface to create some HTML and see what happens. Not this morning; gotta get the a/c on my car fixed; Georgia has finally moved into summertime. ;)

 

--

 

- bill

Link to comment
Share on other sites

I'm still/even more baffled, John.  The multiple newsletter contribution <b>should</b> not affect anything to do with the actual sending of the newsletters.  The actual mechanics are in the admin/modules/newsletters/newsletters.php code, which (as far as I remember) isn't touched a lot by this mod....

 

1) To the other readers - has anyone else seen this problem?

2) John, could you send me copies of the files you modified for this contribution?  ([email protected]; if that doesn't work, let me know.)

 

I'll try and work in some time to create a dummy newsletter and use the admin interface to create some HTML and see what happens.  Not this morning; gotta get the a/c on my car fixed; Georgia has finally moved into summertime.  ;)

 

--

 

- bill

 

 

Hi

 

yes, I'm having this problem - BUT only with HTML emails that are recieved with Outlook. I can send an email via OSC to an outlook customer and it's ok - but via the multiple newsletters contrib it comes out as text. If this helps, the properties of the emails are here:

 

sending a single email to outlook customer:

MIME-Version: 1.0

X-Mailer: osCommerce

Content-Type: text/html; charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable

 

sending newsletter:

MIME-Version: 1.0

X-Mailer: osCommerce bulk mailer

Content-Type: text/plain; charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable

X-MIME-Autoconverted: from 8bit to quoted-printable by adelie.cabalintranet.com id j5HAQrj11919

 

I can see that my dev server has done some sort of autoconvert on the second one.

 

Debs

Link to comment
Share on other sites

Hi

 

yes, I'm having this problem - BUT only with HTML emails that are recieved with Outlook. I can send an email via OSC to an outlook customer and it's ok - but via the  multiple newsletters contrib it comes out as text. If this helps, the properties of the emails are here:

 

sending a single email to outlook customer:

MIME-Version: 1.0

X-Mailer: osCommerce

Content-Type: text/html; charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable

 

sending newsletter:

MIME-Version: 1.0

X-Mailer: osCommerce bulk mailer

Content-Type: text/plain; charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable

X-MIME-Autoconverted: from 8bit to quoted-printable by adelie.cabalintranet.com id j5HAQrj11919

 

I can see that my dev server has done some sort of autoconvert on the second one.

 

Debs

 

 

think I might have solved my own problem:

 

in file admin\includes\modules\newsletters\newsletter.php

change

$mimemessage->add_text($this->content);

to

$mimemessage->add_html($this->content);

 

now sends HTML to outlook too!

 

Debs

Link to comment
Share on other sites

think I might have solved my own problem:

 

in file admin\includes\modules\newsletters\newsletter.php

change

$mimemessage->add_text($this->content);

to

$mimemessage->add_html($this->content);

 

now sends HTML to outlook too!

 

Debs

 

 

Kudos, Debs! That appears to be an original osC buglet, although that fails to answer the question of why it works without the multiple newsletter contribution installed. THAT's going to have me pondering for a while...

Link to comment
Share on other sites

  • 3 weeks later...
Hey, John - I just wanted to ask if Debs solution (changing $mimemessage->add_text to $mimemessge->add_html) works for you?

 

Hi William,

 

Sorry that I was not responding to your question. The solution mentioned earlier, from debsjenkins, solved my problem.

 

Thanks for your time finding a solution and debsjenkins for reacting on this also!

 

John

Link to comment
Share on other sites

  • 1 month later...

[Hi all,

 

great contribution.Well done! All installed like a dream , but (there always a but!), I was setting up the perl script to automatically send out out the emails via crond ( very gd idea!), but im getting this error form the debug email.

 

Usage: /cgi-bin/newsSpecials.pl TYPE #_DAYS [send_to_address]

 

Where TYPE is the number of the newsletter you wish to send, and

#_DAYS is e.g. 1 for daily, 7 for weekly, etc.

 

 

I read the comments in the code and it says that i have to add the following in ( im guessing this is the cause of the error):

 

It requires the NUMBER (_not_ -

# the name) of the applicable newsletter to generate. (Use phpMyAdmin to -

# find the appropriate newsletter_id in the newsindex table.) -

# -

# Also required is the # of days to consider; i.e. "show specials which -

# are new/changed in the last '#' days".

 

For some reason ( maybe its just late!) but i cant see where i need to edit these values. Can someone point me in the right direction?

 

many Thanks

 

Lee

Link to comment
Share on other sites

Hi all,

 

Was my mistake! Thought I would post what i did worng incase anyone else has a bout of insanity.

 

When issuing the the command you have to pass the variables with it like so:

 

/cgi-bin/newSpecials.pl 1 7

 

With 1 being the id number of the newsletter category and 7 being the number of days in which the specials were added.

 

 

Sorry for being such a noob!

 

Lee

Edited by leecook_999
Link to comment
Share on other sites

  • 2 months later...

Hi all,

 

I have the same problem that the one you solved in create_account.php, but mine is located in account_newsletter.php.

 

Admin works fine, but nothing happen in the database when I try to update from the account page. :blink:

 

Do you have an idea? I don't paste the code 'cause I finally took the file given in the contrib.

 

Thx by advance.

Link to comment
Share on other sites

  • 2 weeks later...

Hope some people are still lingering around this thread...

 

I think I'd like to install this contrib, but I need 50 options... and I see it's limited to 32. I sell a product that targets to different people in different states- hence the reason I need 50... would like for the to choose which states they would like to receive email updates on.

 

Is this possible?

 

Thanks!

Link to comment
Share on other sites

  • 1 month later...

hello,

 

looks like a great contribution. :rolleyes:

 

i have installed this contribution 0,7 in MS2.2

in my catalog everything working fine.

i cant find any mistake.

 

by installing this contribution i got one problem with the instruction in row 544

i cant find this lines

type_db_query("select newsletter_id, title, content

in my admin/newsletters.php

 

now

 

in my admin i cant use in product details my had tag generator

i got this error

 

Produktstatus:

Fatal error: Call to undefined function: tep_draw_selection_field() in I:\www.downloadcenter.de\admin\includes\functions\html_output.php on line 232

 

also i cant use in the admin the had tag generator in colum left

only "fill tags" seams to work

 

had tag generator page controll error

Fatal error: Call to undefined function: tep_draw_checkbox_field() in I:\www.downloadcenter.de\admin\header_tags_controller.php on line 332

 

had tag generator text controll error

Fatal error: Call to undefined function: tep_draw_checkbox_field() in I:\www.downloadcenter.de\admin\header_tags_english.php on line 218

 

if i want send emails to customer from the admin i got this error

Fatal error: Call to a member function on a non-object in I:\www.downloadcenter.de\admin\mail.php on line 167

 

email manger makes this error

select newsletters_id, type, title, length(content) as content_length, module, date_added, date_sent, status, locked from newsletters order by date_added desc limit 0, 20

 

:o

 

thanks to anyone who can help me.

oneone use this contribution with hadtaggenerator, fast and easy checkout, RMA-systems, and a few more contributions

 

bg

michael

Link to comment
Share on other sites

  • 1 month later...

I think this was missing from the instructions of the v7 release, and i noticed while trying to fix the preferences not being saved from create_account.php. The instructions say this:

 

-+-+-+-+-+-+-+-+-+

 

LOCATE these lines:

 

if ($error == false)

{

$sql_data_array = array('customers_firstname' => $firstname,

...

 

INSERT the following line as indicated:

 

if ($error == false)

{

$myLetters->process(); // insert me

 

$sql_data_array = array('customers_firstname' => $firstname,

...

 

-+-+-+-+-+-+-+-+-+

the instructions are missing this line:

 

$newsletter = $myLetters->selected; // insert me

 

which should be INSERTED below this line:

 

$myLetters->process(); // insert me

 

 

by the way, great work with the contribution! saved me many hours of time.

Link to comment
Share on other sites

  • 7 months later...

I have installed this contribution and it's functionality is great, but I need help. When the newsletter options show up, I can click as many as I want. However, when I click continue none are saved. However, if I only select ONE, then it is saved. In other words, I can only select one newsletter.

 

Any ideas how to fix???

 

Thanks!

Link to comment
Share on other sites

  • 8 months later...

I have a great problem.

 

I can see the newsletter optinos ONLY in the spanish languaje. I don't know why. Because it is the default langiaje?

 

¿Anyone have this working with diferent languajes?

Link to comment
Share on other sites

  • 7 months later...
  • 2 weeks later...

Installed this contrib.

 

It all works fine, except when a user logs in, it can't manage what newsletter it wants.

 

When trying to access "account_newsletter.php" it just returns to "account.php" with the message that changes was updated.

 

How come?

 

 

EDIT: Copyed the "account_newsletter.php" from the contrib over, and it all worked out fine..

Edited by TCDK
Link to comment
Share on other sites

  • 5 months later...

Just an FYI.

 

I was having a problem getting the create_account to insert the subscribed newsletters to be saved when someone was creating an account. I followed the above to no apparent avail. However I have the Simple Registration contrib installed. Here's the solution:

 

in /catalog/create_account.php somewhere around line 270 where

	  if (SIMPLE_REGISTRATION == 'off') {
	  $sql_data_array = array('customers_firstname' => $firstname,
							  'customers_lastname' => $lastname,
							  'customers_email_address' => $email_address,
							  'customers_telephone' => $telephone,
							  'customers_fax' => $fax,
							  'customers_newsletter' => $myLetters->selected,
							  'customers_password' => tep_encrypt_password($password));

the change to the 'customers_newsletter' => input to $myLetters->selected works fine

Since this multi-newsletter contrib had you insert the code to show the available newsletters, which the newsletter is not a typical part of Simple_Registration, it seems that it now is. So, in the code above, you have to go to the ELSE part of the statement and add the newsletters to the sql statement like:

	  } else {
	  $sql_data_array = array('customers_firstname' => $firstname,
							  'customers_lastname' => $lastname,
							  'customers_email_address' => $email_address,
							  'customers_newsletter' => $myLetters->selected,
							  'customers_password' => tep_encrypt_password($password));

 

that solves it.

Edited by dmayo2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...