ShadowMoses Posted May 23, 2007 Share Posted May 23, 2007 (edited) Not to be outdone by milerwan, the official Version 2.0 (that I have promised long ago) is released. B.K. & Kristian (don't know his username) got a sneak peak last week - I'm hoping no news is good news. This release fixes the obvious issues stated here, adds specials, adds multipart-text/html email version to help lower spam scoring. Overall, this release is more in-tune with the osCommerce standard of coding. Enjoy I get this error when i save the newsletter: 1054 - Unknown column 'newsletters_id' in 'field list' insert into newsletters_to_products (newsletters_id, products_id) values (1, 53) I thought it would be an error in the sql for creating the table? So i changed it to this: (newsletter_id => newsletters_id) ALTER TABLE newsletters ADD template varchar(64) AFTER locked; CREATE TABLE `newsletters_to_products` ( `newsletters_id` INT( 11 ) DEFAULT '0' NOT NULL , `products_id` INT( 11 ) DEFAULT '0' NOT NULL , PRIMARY KEY ( `newsletter_id` , `products_id` ) ); But then i get an error when previewing a saved newsletter: 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 EDIT: also the readme is missing instructions for editing database_tables.php ADD: //newsletter products define('TABLE_NEWSLETTERS_TO_PRODUCTS', 'newsletters_to_products'); //end newsletter products Edited May 23, 2007 by ShadowMoses Quote Link to comment Share on other sites More sharing options...
scottyb Posted May 23, 2007 Author Share Posted May 23, 2007 I get this error when i save the newsletter: 1054 - Unknown column 'newsletters_id' in 'field list' insert into newsletters_to_products (newsletters_id, products_id) values (1, 53) So i changed it to this: (newsletter_id => newsletters_id) ALTER TABLE newsletters ADD template varchar(64) AFTER locked; CREATE TABLE `newsletters_to_products` ( `newsletters_id` INT( 11 ) DEFAULT '0' NOT NULL , `products_id` INT( 11 ) DEFAULT '0' NOT NULL , PRIMARY KEY ( `newsletter_id` , `products_id` ) ); ADD: //newsletter products define('TABLE_NEWSLETTERS_TO_PRODUCTS', 'newsletters_to_products'); //end newsletter products Thanks for pointing out the error in the sql file. I think that the preview error is a result of the initial 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=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 Notice that your "in()" statement in the sql is empty. Delete the newsletter or manually put the (1, 53) values into your newsletters_to_products and it should work. Quote Link to comment Share on other sites More sharing options...
gregy Posted May 23, 2007 Share Posted May 23, 2007 any idea on error Error! Unable to determine the page link! Function used: tep_href_link('', '', 'NONSSL') in newsletter.php? Quote Link to comment Share on other sites More sharing options...
edugps Posted May 24, 2007 Share Posted May 24, 2007 any idea on error Error! Unable to determine the page link! Function used: tep_href_link('', '', 'NONSSL') in newsletter.php? I have the same error. Any idea? Quote Link to comment Share on other sites More sharing options...
ShadowMoses Posted May 24, 2007 Share Posted May 24, 2007 Notice that your "in()" statement in the sql is empty. Delete the newsletter or manually put the (1, 53) values into your newsletters_to_products and it should work. Almost! i get a new error now: 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(53) and pd.language_id=1 Does it take into account some multi image contribution? any idea on error Error! Unable to determine the page link! Function used: tep_href_link('', '', 'NONSSL') in newsletter.php? Did you modify newsletter.php or overwrite with the one in the package? At first i modified it but i got an error (i forget what it was now) so, seeing as i hadn't changed anything in it before, i just overwrote it and it worked. Quote Link to comment Share on other sites More sharing options...
gregy Posted May 24, 2007 Share Posted May 24, 2007 i used the one from package ... Quote Link to comment Share on other sites More sharing options...
edugps Posted May 24, 2007 Share Posted May 24, 2007 (edited) Same of the package (v 2.0) Edited May 24, 2007 by edugps Quote Link to comment Share on other sites More sharing options...
B.K Posted May 25, 2007 Share Posted May 25, 2007 Hi and sorry for my late answer. - I had the same problems described above. indeed, a ligne is missing in the database file that define the newsletters_to_products file. - Also care of p.products_image2 (normally p.products_image) ! - rename newsletter_id by newsletters_id in the newsletters_to_products database. I still haven't manage to join the content of my newsletter with my template in the preview step, I've got only the product. I'm woking on it. Special prices are present, it's great. See you Quote Link to comment Share on other sites More sharing options...
ShadowMoses Posted May 25, 2007 Share Posted May 25, 2007 - Also care of p.products_image2 (normally p.products_image) ! Cool, i changed that... and now get another error :) 1054 - Unknown column 'p.products_id' in 'on clause' 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(53) and pd.language_id=1 Quote Link to comment Share on other sites More sharing options...
ggbig Posted May 27, 2007 Share Posted May 27, 2007 (edited) Hi there, i have an error that no one has mentioned and need a little help. Error is as follows: 1146 - Table 'techinfoline_com_cre.TABLE_NEWSLETTERS_TO_PRODUCTS' doesn't exist select products_id from TABLE_NEWSLETTERS_TO_PRODUCTS where newsletters_id = '2' [TEP STOP] I have run the sql commands twice and inserted what i thought to be the correct id values into the new tables trying to get rid of the error with no luck :) I can create a new newsletter, Lock and unlock them, but cannot edit it? Any idea folks, thanks. I think it may be a missing database_tables.php entry, trying now Edited May 27, 2007 by ggbig Quote ------------------------------------------------- Best Regards, ggbig (maestro) Link to comment Share on other sites More sharing options...
ggbig Posted May 27, 2007 Share Posted May 27, 2007 Hi there, i have an error that no one has mentioned and need a little help. Error is as follows: 1146 - Table 'techinfoline_com_cre.TABLE_NEWSLETTERS_TO_PRODUCTS' doesn't exist select products_id from TABLE_NEWSLETTERS_TO_PRODUCTS where newsletters_id = '2' [TEP STOP] I have run the sql commands twice and inserted what i thought to be the correct id values into the new tables trying to get rid of the error with no luck :) I can create a new newsletter, Lock and unlock them, but cannot edit it? Any idea folks, thanks. I think it may be a missing database_tables.php entry, trying now Got rid of the first error with database_table define, now seeing another: 1054 - Unknown column 'newsletters_id' in 'where clause' select products_id from newsletters_to_products where newsletters_id = '2' [TEP STOP] thanks for any help :) Quote ------------------------------------------------- Best Regards, ggbig (maestro) Link to comment Share on other sites More sharing options...
ggbig Posted May 27, 2007 Share Posted May 27, 2007 Got rid of the first error with database_table define, now seeing another: 1054 - Unknown column 'newsletters_id' in 'where clause' select products_id from newsletters_to_products where newsletters_id = '2' [TEP STOP] thanks for any help :) Found the fix for that one and now another one :) That i think has been mentioned, will continue to read :) error 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(1) and pd.language_id=1 [TEP STOP] Quote ------------------------------------------------- Best Regards, ggbig (maestro) Link to comment Share on other sites More sharing options...
edugps Posted May 28, 2007 Share Posted May 28, 2007 HOUSTON, I need help!!! any idea of this error?: Error! Unable to determine the page link! Function used: tep_href_link('', '', 'NONSSL') in newsletter.php? Thanks for every thing... Quote Link to comment Share on other sites More sharing options...
culturebee Posted May 28, 2007 Share Posted May 28, 2007 HOUSTON, I need help!!! any idea of this error?: Error! Unable to determine the page link! Function used: tep_href_link('', '', 'NONSSL') in newsletter.php? Thanks for every thing... Yes everyone having this error I found where the problem is. :thumbsup: It's in admin/includes/languages/english/modules/newsletters/newsletter_products.php Comment out "//" or change this line: //define('TEXT_UNSUBSCRIBE', "\n\n" . 'You are receiving this notice because you have subscribed to our newsletter. To unsubscribe:' ."\n". HTTP_SERVER . DIR_WS_CATALOG . 'newsletters_unsubscribe.php?action=view&email='); error is in the code needs to be fixed. bless culturebee Quote Link to comment Share on other sites More sharing options...
gregy Posted May 28, 2007 Share Posted May 28, 2007 Got rid of the first error with database_table define, now seeing another: 1054 - Unknown column 'newsletters_id' in 'where clause' select products_id from newsletters_to_products where newsletters_id = '2' [TEP STOP] thanks for any help :) and the fix for error 1054 - Unknown column 'newsletters_id' in 'field list' insert into newsletters_to_products (newsletters_id, products_id) values (2, 544) [TEP STOP] is? Quote Link to comment Share on other sites More sharing options...
Tomason Posted May 28, 2007 Share Posted May 28, 2007 OK, You can try define('TEXT_UNSUBSCRIBE', '' ."\n\n" . 'You are receiving this notice because you have subscribed to our newsletter. To unsubscribe:' ."\n". HTTP_SERVER . DIR_WS_CATALOG . 'newsletters_unsubscribe.php?action=view&email='); k Quote Link to comment Share on other sites More sharing options...
ggbig Posted May 29, 2007 Share Posted May 29, 2007 and the fix for erroris? Im no expert but that looks like a simple request to insert those values in to the newsletters_to_products TABLE in your database. hope that helps :) Quote ------------------------------------------------- Best Regards, ggbig (maestro) Link to comment Share on other sites More sharing options...
ggbig Posted May 29, 2007 Share Posted May 29, 2007 Hi again guys, i know some of this has been touched on before in this topic, but i am still having some issues. They are as follows :) I click on one of my newsletters in the Newsletter Manager and then click the "edit" button and i see these two errors: Warning: reset() [function.reset]: Passed variable is not an array or object in /home2/techinfo/techinfoline-www/cre/admin/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /home2/techinfo/techinfoline-www/cre/admin/includes/classes/object_info.php on line 18 Also when i click on the "send" button i see these two errors: Warning: Missing argument 3 for newsletter_products() in /home2/techinfo/techinfoline-www/cre/admin/includes/modules/newsletters/newsletter_products.php on line 16 Warning: Missing argument 4 for newsletter_products() in /home2/techinfo/techinfoline-www/cre/admin/includes/modules/newsletters/newsletter_products.php on line 16 Thanks for any help that can be provided me on these issues :) And again Congrats on a very kewl contribution!!!! Quote ------------------------------------------------- Best Regards, ggbig (maestro) Link to comment Share on other sites More sharing options...
Scotty2k Posted May 29, 2007 Share Posted May 29, 2007 (edited) I get the following sql error. Does anyone have a solution? :)The problem occurs using MySQL 5, version 4 doesn't give any errors. 1054 - Unknown column 'p.products_id' in 'on clause' 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(738,990,938,855,175,353,1059,1043,874,895,884,749,350) and pd.language_id=1 [TEP STOP] If you use MYSQL 5 just change the first comma before the the left join into inner join ! 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 INNER JOIN 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(99, 100, 101, 102) and pd.language_id=2 Edited May 29, 2007 by Scotty2k Quote Link to comment Share on other sites More sharing options...
Guest Posted June 4, 2007 Share Posted June 4, 2007 Just installed this contribution but getting error mesage: Catchable fatal error: Object of class newsletter_products could not be converted to string in catalog\admin\includes\functions\html_output.php on line 281 Can someone help? Line 281 in here some where: // Output a form hidden field function tep_draw_hidden_field($name, $value = '', $parameters = '') { $field = '<input type="hidden" name="' . tep_output_string($name) . '"'; if (tep_not_null($value)) { $field .= ' value="' . tep_output_string($value) . '"'; } elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) { $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"'; } if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; return $field; } //// // Output a form pull down menu function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) { $field = '<select name="' . tep_output_string($name) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; Quote Link to comment Share on other sites More sharing options...
Guest Posted June 18, 2007 Share Posted June 18, 2007 In local the contribution looks work fine. But when i upload it, get error: Catchable fatal error: Object of class newsletter_products could not be converted to string in catalog\admin\includes\functions\html_output.php on line 282 sorry for my english, im from argentina Quote Link to comment Share on other sites More sharing options...
Guest Posted June 18, 2007 Share Posted June 18, 2007 I cant edit my previous post. Line 282 of my html_output.php: if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]); I already Change the function in admin/includes/modules/newsletters/newsletter_products.php suggested for melhaa in post #100, but nothing happen, everything follows equal. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 18, 2007 Share Posted June 18, 2007 OK... reading about another contribution (Dynamic Sitemap; http://www.oscommerce.com/forums/index.php?sho...ror&st=480; post #496) i find what "CraXyOW3" say something about the "Catchable..." problem Ok, first time i checked the BUGS section of oscommerce's site and i found my problem ! biggrin.gif now it works nicely so far! change the if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]); to if ( ($default == '' && $GLOBALS[$name] == $values[$i]['id']) || ($default == $values[$i]['id']) ); I didit and now i see the pull down menu with product list, but when i select some products with ">>> button", they not show in the right panel. Internet explorer 7, show me an page error (in the left of state bar): 'document.newsletter.elements.products[].length' he is null or it is not an object And if i "save" the newsletter, tellme "Error: Newsletter module required". Quote Link to comment Share on other sites More sharing options...
Guest Posted June 18, 2007 Share Posted June 18, 2007 NOW WORKS FINE: Solucion to Catchable fatal error: Using the original files of contribution, only do this changes: In html_output.php change the if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]); to if ( ($default == '' && $GLOBALS[$name] == $values[$i]['id']) || ($default == $values[$i]['id']) ); If you obtain "Error: Newsletter module required" when tray to save newsletter; go to admin/newsletters.php, find if (empty($module)) { $messageStack->add(ERROR_NEWSLETTER_MODULE, 'error'); $newsletter_error = true; } and comment it /* if (empty($module)) { $messageStack->add(ERROR_NEWSLETTER_MODULE, 'error'); $newsletter_error = true; } */ Quote Link to comment Share on other sites More sharing options...
Guest Posted June 19, 2007 Share Posted June 19, 2007 Hi Can any1 please help a me with the creation of the html document, I just started to learn the basics of osCommerce 3 weeks ago.... 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.