bhbilbao Posted December 26, 2009 Share Posted December 26, 2009 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. Quote Link to comment Share on other sites More sharing options...
kornel76 Posted December 27, 2009 Share Posted December 27, 2009 The 2. works for me. Check your configuration again. Quote Link to comment Share on other sites More sharing options...
21-12 Posted February 18, 2010 Share Posted February 18, 2010 I, is possible integrate "Separate Pricing per customer" ADDon only for the newsletter in this contribution. In that case is possible send mail to customers group. Sorry for my english Quote Link to comment Share on other sites More sharing options...
Jenica77 Posted February 25, 2010 Share Posted February 25, 2010 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. 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 Quote Link to comment Share on other sites More sharing options...
MarkNet85 Posted March 10, 2010 Share Posted March 10, 2010 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 Quote Link to comment Share on other sites More sharing options...
dremhmrk2 Posted March 19, 2010 Share Posted March 19, 2010 Is there possible way to send a test of a newsletter to only one email address before sending it out in bulk? Quote Link to comment Share on other sites More sharing options...
graeme john Posted March 22, 2010 Share Posted March 22, 2010 Is there possible way to send a test of a newsletter to only one email address before sending it out in bulk? use phpmyadmin to change the customer_newsletter field to 2 for every customer that has a customer_newsletter = 1. UPDATE customers SET customers_newsletter = '2' where customers_newsletter = '1' Make an account for yourself in your shop admin and set it to receive the newsletter - test away. After your testing is complete, you can change your customer newsletter subscriptions back by using the following query. UPDATE customers SET customers_newsletter = '1' where customers_newsletter = '2' Quote Link to comment Share on other sites More sharing options...
MarkNet85 Posted March 23, 2010 Share Posted March 23, 2010 I've got the same problem. How did you resolve this? I can't even find the code you quoted in your post.. In which file is it located? 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. Quote Link to comment Share on other sites More sharing options...
tomisa Posted April 2, 2010 Share Posted April 2, 2010 Hi everybody, i have installed the 3.0 Version on a modded v2.2 RC2 - double checked the installation - i also have comment out if (empty($module)) { $messageStack->add(ERROR_NEWSLETTER_MODULE, 'error'); $newsletter_error = true; } to avoid the 'Error: Newsletter module required' everything seems right but when i go to the newsletter manager and choose newsletter_products i only get the 'newsletter'.... there is no products field or template field is it possible that something with my sql changes went wrong? i'm happy for any kind of help - happy easter - tomisa Quote Link to comment Share on other sites More sharing options...
jakers Posted April 6, 2010 Share Posted April 6, 2010 For some reason my html code is getting sent instead of the html itself... anyone know how to fix that? Quote Link to comment Share on other sites More sharing options...
bhbilbao Posted April 24, 2010 Share Posted April 24, 2010 (edited) I've got the same problem. How did you resolve this? I can't even find the code you quoted in your post.. In which file is it located? Finally solved. I returned to the original code and it began to work. /admin/includes/modules/newsletters/newsletter_products.php for ($i=0, $n=sizeof($this->productsInfo); $i<$n; $i++) { if ($col > COLS-1) { $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(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . $this->productsInfo[$i]['products_image'], $this->productsInfo[$i]['products_name'], 120, 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(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . $this->productsInfo[$i]['products_image'], $this->productsInfo[$i]['products_name'], 120, 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++; } 1.You must modify configure.php 2.Replace SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT with the numbers of your needs. If you dont change it by numbers there will no any images. 3.Dont use 0 as number. If you use 100,0 or 0,100 as image width and height , the images will be send as the original size(and correct proportions). I don´t know how to resolve this. Do anybody knows how to send and email to a particular customer and not to all customers that receives newsletters??? use phpmyadmin to change the customer_newsletter field to 2 for every customer that has a customer_newsletter = 1.UPDATE customers SET customers_newsletter = '2' where customers_newsletter = '1' Make an account for yourself in your shop admin and set it to receive the newsletter - test away. After your testing is complete, you can change your customer newsletter subscriptions back by using the following query. UPDATE customers SET customers_newsletter = '1' where customers_newsletter = '2' Is there any button in admin panel to change that, before sending a newsletter(without enter phpmyadmin)??? Edited April 24, 2010 by bhbilbao Quote Link to comment Share on other sites More sharing options...
obi-wan2 Posted August 20, 2010 Share Posted August 20, 2010 Hi, I have just installed Newsletter_products V3.0 2009.07.02. When I try to preview a newsletter I created in admin I receive the following error: Fatal Error: Call to undefined function: tep_image_newsletter() in .......admin/includes/modules/newsletters/newsletter_products.php on line 157 The function does exist in admin/includes/functions/html_output.php How does OsCommerce/PHP know where to look for functions? Please help. Quote Link to comment Share on other sites More sharing options...
obi-wan2 Posted August 21, 2010 Share Posted August 21, 2010 Hi, I have just installed Newsletter_products V3.0 2009.07.02. When I try to preview a newsletter I created in admin I receive the following error: Fatal Error: Call to undefined function: tep_image_newsletter() in .......admin/includes/modules/newsletters/newsletter_products.php on line 157 The function does exist in admin/includes/functions/html_output.php How does OsCommerce/PHP know where to look for functions? Please help. OK. Thanks for all your help, the problem is solved. Quote Link to comment Share on other sites More sharing options...
kosbou Posted February 27, 2011 Share Posted February 27, 2011 i'm trying to compine bulk mail contibution with newsletter products but unfortunately i cannot. i think that the solution is to store all the newsletter including products and template in mysql. is this can be done easily? if so what is the code???? Quote Link to comment Share on other sites More sharing options...
bhbilbao Posted October 21, 2011 Share Posted October 21, 2011 (edited) I have a new issue when sending emails. The "reply to" recipient is wrong. To my customers showed like spam from extrange or new recipient. It displays: from Administrator [ myweb @ s15400000.onlinehome-server.info ] and should be: from Administrator [ info @ myweb.com ] The web is allocated in a 1&1 domain server. anybody?? $messageId = "Message-Id: <" . time() . "@" . $_SERVER['SERVER_NAME'] . ">"; // define('SERVERNAME', 'myweb.com'); // $messageId = "Message-Id: <" . time() . "@" . SERVER_NAME . ">"; // $messageId = "Message-Id: <" . time() . "@myweb.com>"; // $messageId = ' . STORE_OWNER_EMAIL_ADDRESS . '; $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer', $messageId)); // $mimemessage = new email(array('X-Mailer: osCommerce')); // $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)) { //STORE_OWNER //STORE_OWNER_EMAIL_ADDRESS //$mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title); $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], STORE_OWNER_EMAIL_ADDRESS, STORE_OWNER, $this->title); Dont bother if it could change to no-reply @ myweb.com Edited October 21, 2011 by bhbilbao Quote Link to comment Share on other sites More sharing options...
belilan Posted July 23, 2012 Share Posted July 23, 2012 Hello, Does anyone know: 1. if this contribution is compatible for oscommerce 2.3? 2. if so, should I install a previous version and then make update to 3.0, or is there a full intsallation version of the 3.0? Thank you. Quote Link to comment Share on other sites More sharing options...
bekatron Posted August 24, 2013 Share Posted August 24, 2013 Hello, Anyone has a solution for this problem? I have a new issue when sending emails. The "reply to" recipient is wrong. To my customers showed like spam from extrange or new recipient. It displays: from Administrator [ myweb @ s15400000.onlinehome-server.info ] and should be: from Administrator [ info @ myweb.com ] The web is allocated in a 1&1 domain server. anybody?? $messageId = "Message-Id: <" . time() . "@" . $_SERVER['SERVER_NAME'] . ">"; // define('SERVERNAME', 'myweb.com'); // $messageId = "Message-Id: <" . time() . "@" . SERVER_NAME . ">"; // $messageId = "Message-Id: <" . time() . "@myweb.com>"; // $messageId = ' . STORE_OWNER_EMAIL_ADDRESS . '; $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer', $messageId)); // $mimemessage = new email(array('X-Mailer: osCommerce')); // $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)) { //STORE_OWNER //STORE_OWNER_EMAIL_ADDRESS //$mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title); $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], STORE_OWNER_EMAIL_ADDRESS, STORE_OWNER, $this->title); Dont bother if it could change to no-reply @ myweb.com Quote Link to comment Share on other sites More sharing options...
herbsandhelpers Posted February 23, 2015 Share Posted February 23, 2015 Using 2.3.4 getting this error to do with the $p_string: 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 order by products_name' 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 (select * from (select products_id, specials_new_products_price, expires_date, status from specials where status = 1 order by products_id, specials_new_products_price, expires_date) as t group by products_id) as s on pd.products_id = s.products_id where pd.products_id = p.products_id and p.products_id in() and pd.language_id=1 order by products_name [TEP STOP] Is there a solution? The email won't send ... Thanks, Lorraine Quote Link to comment Share on other sites More sharing options...
burt Posted February 23, 2015 Share Posted February 23, 2015 p.products_id in() Here you are saying "find all products in this string", yet your string (the bit that should be inside the brackets) consists of nothing... Hence the error. Quote Link to comment Share on other sites More sharing options...
herbsandhelpers Posted February 23, 2015 Share Posted February 23, 2015 Here's the bit that creates it: function productInfo(){ global $languages_id; $this->productInfo = array(); $p_string = ''; for($i=0, $n=sizeof($this->products); $i<$n; $i++){ $p_string .= $this->products[$i] . ', '; } $p_string = trim($p_string, ', '); $product_query = tep_db_query("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 " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join (select * from (select products_id, specials_new_products_price, expires_date, status from " . TABLE_SPECIALS . " where status = 1 order by products_id, specials_new_products_price, expires_date) as t group by products_id) as s on pd.products_id = s.products_id where pd.products_id = p.products_id and p.products_id in(" . $p_string . ") and pd.language_id=" . (int)$languages_id . " order by products_name"); Is there an error here? Quote Link to comment Share on other sites More sharing options...
current Posted July 14, 2017 Share Posted July 14, 2017 (edited) Hi There all, I have installed the module, and I am able to send a newletter and preview it in my admin. The emails arrive well. However newsletter that are viewed online through "view_newsletter.php" show up empty and no information is showed, just the heading "View Newsletter". It does provide the correct newsletter number. It looks like the page is abruptly broken off because the other columns are not displayed either. My gues is that it has something to do with the:echo $module->html_content(); but I am not sure. --------- <?php $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_VIEWNEWS); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_VIEWNEWS)); require(DIR_WS_INCLUDES . 'template_top.php'); require('includes/application_top.php'); ?> <h1><?php echo HEADING_TITLE; ?></h1> <div class="contentContainer"> <div class="contentText"> <? $nID = (isset($HTTP_GET_VARS['nID']) ? tep_db_prepare_input($HTTP_GET_VARS['nID']) : 0); //newsletter products $newsletter_query = tep_db_query("select title, content, module, template from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int)$nID . "'"); if (tep_db_num_rows($newsletter_query) == 1) { $newsletter = tep_db_fetch_array($newsletter_query); $newsletter_products_query = tep_db_query("select products_id from " . TABLE_NEWSLETTERS_TO_PRODUCTS . " where newsletters_id = '" . (int)$nID . "'"); while ($newsletter_products = tep_db_fetch_array($newsletter_products_query)) { $news_products[] = $newsletter_products['products_id']; } $newsletter['products'] = $news_products; if ($newsletter['module'] == 'newsletter_products') { include('catalog/admin/includes/modules/newsletters/newsletter_products.php'); include('catalog/admin/includes/languages/english/modules/newsletters/newsletter_products.php'); $module = new newsletter_products($newsletter['title'], $newsletter['content'], $newsletter['products'], $newsletter['template']); }}*/ echo $module->html_content(); } else { echo nl2br($newsletter['content']); } //end newsletter products } else { echo TEXT_NOT_FOUND; } echo "\n"; ?> </div> <div class="buttonSet"> <span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?></span> </div> </div> <?php require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Edited July 14, 2017 by current Quote Link to comment Share on other sites More sharing options...
♥bitit.it Posted August 9, 2019 Share Posted August 9, 2019 (edited) i try to install your plugin in new OSCOM CE Phoenix in catalog/includes/modules/boxes/bm_information.php FIND around line 41: ' <a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . MODULE_BOXES_INFORMATION_BOX_CONDITIONS . '</a><br />' . ADD after it: ' <a href="' . tep_href_link(FILENAME_NEWSLIST) . '">' . MODULE_BOXES_INFORMATION_BOX_NEWS . '</a><br />' . i havn't nothing of similar . in attach my file this line is in: catalog/includes/templates/boxes Enrico bm_information.php Edited August 9, 2019 by bitit.it Quote Link to comment Share on other sites More sharing options...
♥bitit.it Posted August 9, 2019 Share Posted August 9, 2019 on file catalog/admin/newsletters.php require(DIR_WS_CLASSES . 'currencies.php'); don't working require( 'currencies.php'); working but give this error Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /archivio/html/osnew/admin/includes/functions/compatibility.php:18) in /archivio/html/osnew/admin/includes/functions/compatibility.php on line 29 if i change this: //newsletter products //currenices class required for price display in newsletter require( 'currencies.php'); $currencies = new currencies(); //end newsletter products whit this //newsletter products //currenices class required for price display in newsletter //require( 'currencies.php'); //$currencies = new currencies(); //end newsletter products i haven't error Enrico Quote Link to comment Share on other sites More sharing options...
♥bitit.it Posted August 9, 2019 Share Posted August 9, 2019 also this give me error //newsletter products include(DIR_WS_MODULES . 'newsletters/newsletter_products.php'); include(DIR_WS_LANGUAGES . $language . '/modules/newsletters/newsletter_products.php'); $products = new newsletter_products('','', '', ''); $parameters = array('title' => '', 'content' => '', 'module' => '', 'template' => ''); //end newsletter products this don't give error //newsletter products include("includes/modules/". 'newsletters/newsletter_products.php'); include("includes/languages/". $language . '/modules/newsletters/newsletter_products.php'); $products = new newsletter_products('','', '', ''); $parameters = array('title' => '', 'content' => '', 'module' => '', 'template' => ''); //end newsletter products But nothing is change in the interface, i don't understand if don't working or how use this module Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.