Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Newsletter products, HTML email


scottyb

Recommended Posts

Hi patamu,

 

to change the size of your pictures in your newsletter , just change into the module/newsletter/newsletter_product.php

the osc function tep_image

 

tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . $this->productsInfo[$i]['products_image'], $this->productsInfo[$i]['products_name'], $imgWidth, $imgHeight)

 

For Ajay,

You'll find the answer in this contribution support.

made a search at the bottom of a page, with the 'tep_href_link('', '', 'NONSSL')'

 

You'll find it out !

 

++

Link to comment
Share on other sites

  • Replies 268
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hi !

 

I've got a pb with this,

 

When I send or just preview my newsletter with newsletter_product module, I only got the pictures of the product I choose in my template.

 

But I didn't find out how to put the $content inside. Does it normaly works.

Maybe it's because I've got a error message when I edit my Nl after preview like :

Warning: reset() [function.reset]: Passed variable is not an array or object in root\admin\includes\classes\object_info.php on line 18

Warning: Variable passed to each() is not an array or object in root\admin\includes\classes\object_info.php on line 19

In this support tread, I found a post witch talk about it, but no answer and solution to resolve this !!!

 

Any Ideas?

 

Thanks!

Padaben

Link to comment
Share on other sites

I'm trying to install Newsletter products 2.0 and am having trouble when trying to create or edit a newsletter. The page displays everything down to the Contents box and then quits. When I view the last lines of the source for the pages I see the following:

 

<tr>

<td colspan="2" class="main" align="center">You need only select products and a template if you are using the newsletter_products module</td>

</tr>

<tr>

<td></td>

<td class="main">

 

I've traced the point of stoppage down to line 313 in the new newsletters.php which reads as follows:

 

<td class="main"><?php echo $products->choose_products(); ?></td>

 

 

Can anyone tell me why the $products->choose_products() would be causing PHP to suddenly quit? Just in case it matters I did use a search and replace to convert all instances of $HTTP_GET_VARS to $_GET and all instances of $HTTP_POST_VARS to $_POST in this contribution before I installed it so it would match the rest of our site and I changed the three comma joins in newsletter_products.php to the word join so that it would work with MYSQL5. Otherwise I haven't changed anything in the contribution source code so I am at a loss to explain why this contribution would work for other people but not for us.

Link to comment
Share on other sites

I'm trying to install Newsletter products 2.0 and am having trouble when trying to create or edit a newsletter. The page displays everything down to the Contents box and then quits. When I view the last lines of the source for the pages I see the following:

 

I found the problem. It had to do with the fact that our html_output.php had an old version of the function for drawing pull down menus.

Link to comment
Share on other sites

I just installed newsletter2.0 as well because my newsletters.php was cutting off right after the text box,

 

im now getting the following error: Unable to determine the page link!

 

Function used:

 

tep_href_link('', '', 'NONSSL')

Link to comment
Share on other sites

nevermind the above topic.

 

after having to go through and edit a ton of the code so this new 2.0 thing actually worked, I finally send my mail.

 

It didn't use the template. At all.

 

So now 100+ people have received an ugly email with no HTML pictures in it.

 

It seems like this 2.0 wasn't even tested at all.

 

how can i force it to use a template ?

Link to comment
Share on other sites

nevermind the above topic.

 

after having to go through and edit a ton of the code so this new 2.0 thing actually worked, I finally send my mail.

 

It didn't use the template. At all.

 

So now 100+ people have received an ugly email with no HTML pictures in it.

 

It seems like this 2.0 wasn't even tested at all.

 

how can i force it to use a template ?

 

 

answering my own question

 

 

around line 167 in admin/includes/modules/newsletters/newsletter_products.php :

		if(tep_not_null($this->template)){
		//HTML page from template
		$content = join('', file(DIR_WS_TEMPLATES . $this->template)); // this was originally commented out
		//$content = file_get_contents(DIR_WS_TEMPLATES . $this->template); // this wasn't commented out. switcharoo fixed the template not being used .
		//remove all line breaks and spaces in template to ensure no spaces resulting from email class
		$content = str_replace("\n", '', $content);

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

in preview i have this error:

 

1054 - Unknown column 'p.products_image2' in 'field list'

 

i have multiple images hack. anyone have demo templates for this contrib?

 

Thanks a lot.

 

AlexOsp

Edited by Jan Zonjee
Link to comment
Share on other sites

in preview i have this error:

 

1054 - Unknown column 'p.products_image2' in 'field list'

 

i have multiple images hack. anyone have demo templates for this contrib?

 

Thanks a lot.

 

AlexOsp

 

Hi, it's because in your dsatabase, p.products_image2 don't exists.

change in your files to p.products_image .

 

Bye

Edited by Jan Zonjee
Link to comment
Share on other sites

Hi !

 

I've got a problem :

The "content" in the newsletter doesn't show when I use the newsletter_products module

It's shows just fine when using newsletter module so it's not an empty fieldin the database...

 

To me it seems like $html_content doesn't collect the value from the field "content" in table "newsletters"...

 

What could be wrong?

 

 

BTW Great Contribution !!

Link to comment
Share on other sites

v1.0 was developed using only one language. A couple of people have contacted me about multiple products showing up when more than one language is being used.

 

Although I had included the $language_id variable in the sql, it's apparent that it doesn't work.

 

Until I have time to fix the language issue for v1.1, a fix for multiple languages can be simply changing $language_id to the actual number used for the desired language (i.e. '1' for english etc.).

Two occurances of the variable are around lines 31, and 45 of includes/modules/newsletter/newsletter_products.php.

 

Thanks to Teun for pointing this out.

 

 

Can you tell me how i send HTML base Newsletter and how to make html template(I mean how i create html base newsletter)?

Link to comment
Share on other sites

Hi,

 

I have install this contribution, but i have 2 problems.

1. after the preview, what is how i wanted, i get a error :

 

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 ') and pd.language_id=4' 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=4

 

p.products in() = empty

 

When i filled p.products in() with a productnummer in newsletter_to_products.php, emails where send.

 

2. When i look at the recieved email, i don't get the template to see, only products.

 

What could be wrong?

Link to comment
Share on other sites

Anyone have an idea of how to integrate this contribution with Simple Visitor Newsletter. I have both of these great contributions installed and working seperately.

 

I have the same wish. Anyone have an idea?

 

Thx!

Link to comment
Share on other sites

  • 3 weeks later...
Hi !

 

I've got a problem :

The "content" in the newsletter doesn't show when I use the newsletter_products module

It's shows just fine when using newsletter module so it's not an empty fieldin the database...

 

To me it seems like $html_content doesn't collect the value from the field "content" in table "newsletters"...

 

What could be wrong?

BTW Great Contribution !!

 

I've got the same issue. It's driving me crazy--does anyone else know why this field data is not carried over to the $html_content variable?

 

Thanks!

Link to comment
Share on other sites

  • 3 weeks later...

I have a question regarding the newsletter products email. I dont know if I messed up the code myself but I need to have a message above the products, any Idea how to get this there?

 

I mean when your in the admin pages / newsletter page you type a subject and below this you have the message form. I want this message above the products.

 

All help is appreciated

Link to comment
Share on other sites

Hi,

I realise that this problem has been mentioned before but I am very new to this and didn't understand how to solve the problem. Like I said I'm very new. Please could you help me with the following error that I get:

 

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 ') and pd.language_id=1' at line 1

 

select p.products_id, pd.products_name, p.products_image2, 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

 

 

I notice in a previous mention of this that you advise that it is to do with the empty () but I didn't understand how to rectify it. Please could you advise?

 

Many thanks.

Link to comment
Share on other sites

Hi,

I realise that this problem has been mentioned before but I am very new to this and didn't understand how to solve the problem. Like I said I'm very new. Please could you help me with the following error that I get:

 

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 ') and pd.language_id=1' at line 1

 

select p.products_id, pd.products_name, p.products_image2, 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

I notice in a previous mention of this that you advise that it is to do with the empty () but I didn't understand how to rectify it. Please could you advise?

 

Many thanks.

 

After seeing a few of these issues brought to my attention, it has become clear that there was an entry missing from the installation instructions. The reason for this error is because the product selection box is not popping up when newsletter_products is selected as the module.

 

So, find the line:

<?php echo tep_draw_pull_down_menu('module', $modules_array, $nInfo->module); ?>

 

And replace it with:

<?php echo tep_draw_pull_down_menu('module', $modules_array, $nInfo->module, 'onchange="showProducts()"'); ?>

 

And this should alleviate the problem.

Link to comment
Share on other sites

  • 2 weeks later...

I have installed this contrib, was quite easy, great instructions.

 

My only problems at the moment are.

 

When I select the newsletter_products module I dont get the products. I have to select that module and then click save.

This gives me an error newsletter title required but I am then given the products list below.

 

Line 262 of admin\newsletters.php is

<td class="main"><?php echo tep_draw_pull_down_menu('module', $modules_array, $nInfo->module, 'onchange="showProducts()"'); ?></td>

 

Which according to the previous post should rectify the problem of the products not being displayed when the module is selected.

 

Also I am struggling to find some templates, Can anyone help me out with these please?

 

Regards

Shaun

Link to comment
Share on other sites

Sorry for double posting but the forum wont allow me to edit my post :(

 

I have installed this contrib, was quite easy, great instructions.

 

My only problems at the moment are.

 

When I select the newsletter_products module I dont get the products. I have to select that module and then click save.

This gives me an error newsletter title required but I am then given the products list below.

 

Line 262 of admin\newsletters.php is

<td class="main"><?php echo tep_draw_pull_down_menu('module', $modules_array, $nInfo->module, 'onchange="showProducts()"'); ?></td>

 

Which according to the previous post should rectify the problem of the products not being displayed when the module is selected.

 

I also get the p.products_image2 error I too have more pics contrib installed. I see that some has got round this issue but didnt say how, I do have an images stored.

 

Also if I click edit I get:

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/getwi/public_html/dev/admin/includes/classes/object_info.php on line 17

Warning: Variable passed to each() is not an array or object in /home/getwi/public_html/dev/admin/includes/classes/object_info.php on line 18

 

I have made the mod to admin/includes/functions/html_output.php but still have the error.

 

The newsletter is also reset, so any products I have added or text I have put in has gone :(

 

 

Also I am struggling to find some templates, Can anyone help me out with these please?

 

Regards

Shaun

Link to comment
Share on other sites

Hi, it's because in your dsatabase, p.products_image2 don't exists.

change in your files to p.products_image .

 

Bye

 

 

Sir I have a similar problem that is

 

1054 - Unknown column 'p.products_image2' in 'field list'

 

select p.products_id, pd.products_name, p.products_image2, 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(79) and pd.language_id=1

 

[TEP STOP]

 

Can someone tell me what to do as I am a newbie in PHP and i really didnt understand what you want us to do in the above quotes

 

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