Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Newsletter products, HTML email


scottyb

Recommended Posts

I am installing version 3.0.1 and have a question. In the install directions, there is no instrutions on what to do in the admin/includes/functions/html_output.php file, but the file is in the attached files.

 

Are there changes to be done to this admin/includes/functions/html_output.php file?

 

I have already modified that file with other contritbutions, so please, I need to the exact install instructions for that file, if any.

Link to comment
Share on other sites

  • Replies 268
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I am installing version 3.0.1 and have a question. In the install directions, there is no instrutions on what to do in the admin/includes/functions/html_output.php file, but the file is in the attached files.

 

Are there changes to be done to this admin/includes/functions/html_output.php file?

 

I have already modified that file with other contritbutions, so please, I need to the exact install instructions for that file, if any.

 

This one you will find it in the update_to_3.0.txt file.

Link to comment
Share on other sites

  • 5 weeks later...

I have the contribution newsletter unsubscribe. How can I use the unsubscribe link from that add on with this add on?

 

That contribution say to change the following in admin/includes/modules/newsletters/newsletter.php from this code

	  $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer'));
  $mimemessage->add_text($this->content);
  $mimemessage->build_message();
  while ($mail = tep_db_fetch_array($mail_query)) {
	$mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title);
  }

to this code

	  // Begin Unsubscribe hack
	$mimemessage = new email(array('X-Mailer: osCommerce bulk mailer'));
	while ($mail = tep_db_fetch_array($mail_query)) {
	   $mimemessage->add_html($this->content . TEXT_UNSUBSCRIBE . '<a href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '">' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '</a>');
 $mimemessage->build_message();
$mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title);
	}
  // End Unsubscribe hack

 

I am assuming I change this code in admin/includes/mdules/newsletters/newssletter_products

	  $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer', $messageId));

  //$mimemessage->add_text($this->content);
  //$text = $this->text_content();

  $mimemessage->add_html($this->html_content(), $this->text_content(), HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES);
  $mimemessage->build_message();

  while ($mail = tep_db_fetch_array($mail_query)) {
   $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title);
  }

 

Any help would be greatly appreciated.

Link to comment
Share on other sites

I have the contribution newsletter unsubscribe. How can I use the unsubscribe link from that add on with this add on?

 

That contribution say to change the following in admin/includes/modules/newsletters/newsletter.php from this code

$mimemessage->add_html($this->html_content(), $this->text_content(), HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES);

add this before: $this->html_content()

 

$this->content . TEXT_UNSUBSCRIBE . '<a href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '">' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '</a>',

 

It should looks like:

 

$mimemessage->add_html($this->content . TEXT_UNSUBSCRIBE . '<a href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '">' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '</a>', $this->html_content(), $this->text_content(), HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES)

Link to comment
Share on other sites

I have an older v2.0 of the newsletter products contribution installed but with a few hacks around for a testsend function to send a single copy of the newsletter to site admin as a tester before doing the full send

 

Well i have an issue with it, and i think it is related to a mysql5 / php5 upgrade we did earlier this year (newsletter hasnt been used since)

 

the error i get is as follows:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') on p.products_id = s.products_id where pd.products_id = p.products_id and p.pr' at line 1

select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, if(s.status, s.specials_new_products_price, NULL) as specials_price from ((products p, products_description pd) left join specials s) on p.products_id = s.products_id where pd.products_id = p.products_id and p.products_id in() and pd.language_id=1

 

help ;)

Link to comment
Share on other sites

Hi!

 

I think you need just to change the line:

$mimemessage->add_html($this->html_content(), $this->text_content(), HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES);

add this before: $this->html_content()

 

$this->content . TEXT_UNSUBSCRIBE . '<a href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '">' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '</a>',

 

It should looks like:

 

$mimemessage->add_html($this->content . TEXT_UNSUBSCRIBE . '<a href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '">' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '</a>', $this->html_content(), $this->text_content(), HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES)

 

Thank you, I wll give it a try

Link to comment
Share on other sites

  • 4 weeks later...

please help

 

my newsletter_product module and template is dispalaying now in my admin;s newsletters manager. but the products pictures are small and broken and imgetting error upon sending.......

 

the error:

 

 

 

Fatal error: Class 'email' not found in /home/www/bestsellersmobiles.org/online-store/admin/includes/modules/newsletters/newsletter_products.php on line 249

Newsletter Manager

Sending E-Mail Please wait .. sending emails ..

 

Please do not interrupt this process!

 

 

i think its forever and nothing happend.. please help..

 

 

br,

parot

Link to comment
Share on other sites

please help

 

my newsletter_product module and template is dispalaying now in my admin;s newsletters manager. but the products pictures are small and broken and imgetting error upon sending.......

 

the error:

 

 

 

Fatal error: Class 'email' not found in /home/www/bestsellersmobiles.org/online-store/admin/includes/modules/newsletters/newsletter_products.php on line 249

Newsletter Manager

Sending E-Mail Please wait .. sending emails ..

 

Please do not interrupt this process!

 

 

i think its forever and nothing happend.. please help..

 

 

br,

parot

Link to comment
Share on other sites

please help

 

my newsletter_product module and template is dispalaying now in my admin;s newsletters manager. but the products pictures are small and broken and imgetting error upon sending.......

 

the error:

 

 

 

Fatal error: Class 'email' not found in /home/www/bestsellersmobiles.org/online-store/admin/includes/modules/newsletters/newsletter_products.php on line 249

Newsletter Manager

Sending E-Mail Please wait .. sending emails ..

 

thid is my line 249 : $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer', $messageId));

 

Please do not interrupt this process!

 

 

i think its forever and nothing happend.. please help..

 

 

br,

parot

Link to comment
Share on other sites

Lookin at that it says to me you have failed to install correctly, go over the install again checking everything you do thoughally.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Lookin at that it says to me you have failed to install correctly, go over the install again checking everything you do thoughally.

 

 

thanks great sam

 

 

do i have to import the sql again?

 

 

 

thanks and take care

 

br

parot

Edited by loneparot
Link to comment
Share on other sites

thanks great sam

 

 

do i have to import the sql again?

 

 

 

thanks and take care

 

br

parot

 

No, once the entries r in your dbase do not want to repeat, as that may create duplicate entries there.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

No, once the entries r in your dbase do not want to repeat, as that may create duplicate entries there.

 

 

its working now... with reinstalling. i dont know what happend but i just restore my configure.php backup

 

but i have fck editor issue. so what i did was reverted my admin/categories.php to txt_area_firld.. now my product description can read codes.. ican copy paste a code from html. hahaha. ican even embbed youtube....thanks sam

 

 

thanks and take care

 

br,

parot

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

 

I have a problem with this contri.

When i create an email and i want to see the preview i get this error:

Parse error: syntax error, unexpected '%', expecting ']' in admin/includes/modules/newsletters/newsletter_products.php(179) : eval()'d code on line 1

 

Can someone help me to solve this?

 

Thank you

 

Twindaddy

Link to comment
Share on other sites

Hello,

 

I have a problem with this contri.

When i create an email and i want to see the preview i get this error:

Parse error: syntax error, unexpected '%', expecting ']' in admin/includes/modules/newsletters/newsletter_products.php(179) : eval()'d code on line 1

 

Can someone help me to solve this?

 

Thank you

 

Twindaddy

 

Can you post the file?

Link to comment
Share on other sites

  • 4 weeks later...

Can you post the file?

 

 

Thanks for youre help, and sorry for my late reaction.

I solved the problem by myself, i selected something wrong.

 

Butt, i stille have a question.

 

I want to putt a background image in the newsletters, butt when i press the buton, nothing happened.

I can not select an background image.

I think wehn i press the button a screen must popup so i can select an image, butt nothing happened.

Can you help me with this?

 

Thank you and sorry again.

 

regards

Twindaddy

Link to comment
Share on other sites

  • 3 weeks later...

All working!

 

Except that there is no images at all.

 

I tried modifing configure.php with diferent solutions of this thread:

  define('DIR_WS_CATALOG_IMAGES_O', DIR_WS_CATALOG .'images/');
 define('HTTP_CATALOG_SERVER_EMAIL', 'http://www.myweb.com/');
 define('DIR_WS_CATALOG_IMAGES_EMAIL', 'images/');

 

				$html_content .= '</tr><tr><td align="center" width="' . $width . '%"><a href="' . tep_catalog_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $this->productsInfo[$i]['products_id']) . '" style="' . $cssLink . '">' . tep_image_newsletter(HTTP_CATALOG_SERVER_EMAIL . DIR_WS_CATALOG_IMAGES_EMAIL . $this->productsInfo[$i]['products_image'], $this->productsInfo[$i]['products_name'], 92, 92) . '<br>' . $this->productsInfo[$i]['products_name'] . '</a><br>';
			$price = ($this->productsInfo[$i]['specials_price']) ? '<span style="'. $cssMarkdown . '">' . $currencies->display_price($this->productsInfo[$i]['products_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>  <span style="' . $cssSale . '">' . $currencies->display_price($this->productsInfo[$i]['specials_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>' : '<span style="' . $cssPrice . '">' . $currencies->display_price($this->productsInfo[$i]['products_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>';
			$html_content .= $price . '</td>';
			$col = 0;
		} else {
			$html_content .= '<td align="center" width="' . $width . '%"><a href="' . tep_catalog_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $this->productsInfo[$i]['products_id']) . '" style="' . $cssLink . '">' . tep_image_newsletter(HTTP_CATALOG_SERVER_EMAIL . DIR_WS_CATALOG_IMAGES_EMAIL . $this->productsInfo[$i]['products_image'], $this->productsInfo[$i]['products_name'], 92, 92) . '<br>' . $this->productsInfo[$i]['products_name'] . '</a><br>';
			$price = ($this->productsInfo[$i]['specials_price']) ? '<span style="' . $cssMarkdown . '">' . $currencies->display_price($this->productsInfo[$i]['products_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>  <span style="' . $cssSale . '">' . $currencies->display_price($this->productsInfo[$i]['specials_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>' : '<span style="' . $cssPrice . '">' . $currencies->display_price($this->productsInfo[$i]['products_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>';
			$html_content .= $price . '</td>';
		}

 

also this one.

 

 

				$html_content .= '</tr><tr><td align="center" width="' . $width . '%"><a href="' . tep_catalog_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $this->productsInfo[$i]['products_id']) . '" style="' . $cssLink . '">' . tep_image_newsletter(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES_O . $this->productsInfo[$i]['products_image'], $this->productsInfo[$i]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>' . $this->productsInfo[$i]['products_name'] . '</a><br>';
			$price = ($this->productsInfo[$i]['specials_price']) ? '<span style="'. $cssMarkdown . '">' . $currencies->display_price($this->productsInfo[$i]['products_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>  <span style="' . $cssSale . '">' . $currencies->display_price($this->productsInfo[$i]['specials_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>' : '<span style="' . $cssPrice . '">' . $currencies->display_price($this->productsInfo[$i]['products_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>';
			$html_content .= $price . '</td>';
			$col = 0;
		} else {
			$html_content .= '<td align="center" width="' . $width . '%"><a href="' . tep_catalog_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $this->productsInfo[$i]['products_id']) . '" style="' . $cssLink . '">' . tep_image_newsletter(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES_O . $this->productsInfo[$i]['products_image'], $this->productsInfo[$i]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>' . $this->productsInfo[$i]['products_name'] . '</a><br>';
			$price = ($this->productsInfo[$i]['specials_price']) ? '<span style="' . $cssMarkdown . '">' . $currencies->display_price($this->productsInfo[$i]['products_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>  <span style="' . $cssSale . '">' . $currencies->display_price($this->productsInfo[$i]['specials_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>' : '<span style="' . $cssPrice . '">' . $currencies->display_price($this->productsInfo[$i]['products_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>';
			$html_content .= $price . '</td>';

 

 

 

 

 

 

 

 

 

I dont know whats going bad.

 

My catalog/images folder is on the roor with CHMOD 755.

Link to comment
Share on other sites

  • 1 month later...

I posted this in another thread, but I also wanted to post it here. Can anyone help?

 

When I go into the program phpMyAdmin (provided by my hosting company) I see the table visitors is set up. This is what it shows when I click on it.

 

databaseinfo2.jpg

 

databaseinfo.jpg

 

So it appears I've created the table. Why am I still getting this error?

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /hsphere/local/home/myname/mysite.com/catalog/includes/functions/database.php:13) in /hsphere/local/home/myname/mysite.com/catalog/includes/functions/database.php  on line 13

Link to comment
Share on other sites

  • 2 weeks later...

I've installed this contribution and I'm happy with it. There's just one problem:

 

My pictures are not showed in the e-mail (and the preview). I've tried to find where the images are located in the added code, but I can't find it. In which part of the code should it be edited?

 

Thanks

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...