♥bruyndoncx Posted April 24, 2005 Share Posted April 24, 2005 This contribution allows you to: * List products (alphabetically) for selected category displaying the special price and implied discount * Add a % discount to all products in selected category * Add, change or remove a special price for an individual product in the selected category It is multilangual, conforming to osCommerce TABLE conventions and only makes changes in the admin. This is an easy install, just a few files to edit and load of main php and language files. It is based on the specials admin contribution (206) Demo with screenshots included in the package Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
sergioscr Posted April 30, 2005 Share Posted April 30, 2005 Very good job but i have problems: Add discounts: 1064 - You have an error in your SQL syntax near '; ' at line 1 Insert into specials (products_id, specials_new_products_price) values (6624, '743.9803'); [TEP STOP] The query sintax "Insert into specials (products_id, specials_new_products_price) values (6624, '743.9803');" is ok. Thanks This contribution allows you to: * List products (alphabetically) for selected category displaying the special price and implied discount * Add a % discount to all products in selected category * Add, change or remove a special price for an individual product in the selected category It is multilangual, conforming to osCommerce TABLE conventions and only makes changes in the admin. This is an easy install, just a few files to edit and load of main php and language files. It is based on the specials admin contribution (206) Demo with screenshots included in the package <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
sergioscr Posted April 30, 2005 Share Posted April 30, 2005 Another error: manual change price update: 1136 - Column count doesn't match value count at row 1 INSERT INTO specials VALUES ('','4932','31.0000','2005-04-30 18:35:28','','','','1'); [TEP STOP] Very good job but i have problems: Add discounts: 1064 - You have an error in your SQL syntax near '; ' at line 1 Insert into specials (products_id, specials_new_products_price) values (6624, '743.9803'); [TEP STOP] The query sintax "Insert into specials (products_id, specials_new_products_price) values (6624, '743.9803');" is ok. Thanks <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted May 4, 2005 Author Share Posted May 4, 2005 Could it be that you customized the specials section and added another contribution that adds extra columns to the specials table ? Could you go into phpmyadmin and display the table structure and copy it here ? Thx Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
sergioscr Posted May 5, 2005 Share Posted May 5, 2005 Hello specials_id int(11) No auto_increment products_id int(11) No 0 specials_new_products_price decimal(15,4) No 0.0000 specials_date_added datetime S? NULL specials_last_modified datetime S? NULL expires_date datetime S? NULL date_status_change datetime S? NULL status int(1) No 1 customers_group_id int(11) No 0 Thanks. :D Could it be that you customized the specials section and added another contribution that adds extra columns to the specials table ? Could you go into phpmyadmin and display the table structure and copy it here ? Thx <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted May 5, 2005 Author Share Posted May 5, 2005 Well, yes, you have a contribution installed that modified your specials. I'm guessing it's a B2B suite. :D it looks like you have to add the 'customers_group_id' field to the list of fields with the value set to '0', exactly in the places where you got the error just to make it work. Customer group '0' if I remember well is general retail, or no specific customer group discount. I'm not sure what other changes you find in the specials pages in the B2B suite that would modify the default specials behaviour for the B2B. Alternatively, you'd have to execute these same set of sql commands for each customer group id if you want to carry these through for all customer groups. Hope I'm talking sense here ... the choice is essentially yours. Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
sergioscr Posted May 6, 2005 Share Posted May 6, 2005 Yes is that B2B contrib, i?m not a programer only cut & paste... :'( but the SQL result ejects ok on mysqladmin, i need a little help. Sorry for my English i?m Spanish. www.scrinf.com Thanks Well, yes, you have a contribution installed that modified your specials.I'm guessing it's a B2B suite. :D it looks like you have to add the 'customers_group_id' field to the list of fields with the value set to '0', exactly in the places where you got the error just to make it work. Customer group '0' if I remember well is general retail, or no specific customer group discount. I'm not sure what other changes you find in the specials pages in the B2B suite that would modify the default specials behaviour for the B2B. Alternatively, you'd have to execute these same set of sql commands for each customer group id if you want to carry these through for all customer groups. Hope I'm talking sense here ... the choice is essentially yours. <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted May 13, 2005 Author Share Posted May 13, 2005 Sergio With B2B you have different customer groups and prices. As far as I understand this is true for specials as well. My contribution only works with a single special price. The question is really how should my contribution behave when you have multiple customer groups. You have not answered that question. This is not about having an easy fix, but really adapting my contribution to work with B2B. I do not have any test site for B2B, nor enough insight in the general working of this contribution to be able to estimate the work involved.. Have you asked for support on the B2B thread ? Carine Carine Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
sergioscr Posted May 13, 2005 Share Posted May 13, 2005 Hello Carine, the groups is not the problem because is based on a % from the single price, i think on the sql sentences. Thanks. Sergio With B2B you have different customer groups and prices. As far as I understand this is true for specials as well. My contribution only works with a single special price. The question is really how should my contribution behave when you have multiple customer groups. You have not answered that question. This is not about having an easy fix, but really adapting my contribution to work with B2B. I do not have any test site for B2B, nor enough insight in the general working of this contribution to be able to estimate the work involved.. Have you asked for support on the B2B thread ? Carine Carine <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
leonardomg Posted May 23, 2005 Share Posted May 23, 2005 I'm getting the same error. I have made no alterations to the way specials work. All I did was install the contribution and got this error when I first attempted to change percentages. Please help! Shop has to be ready soon! Thanks a lot! Very good job but i have problems: Add discounts: 1064 - You have an error in your SQL syntax near '; ' at line 1 Insert into specials (products_id, specials_new_products_price) values (6624, '743.9803'); [TEP STOP] The query sintax "Insert into specials (products_id, specials_new_products_price) values (6624, '743.9803');" is ok. Thanks <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted May 23, 2005 Author Share Posted May 23, 2005 does your specials table have the same set of colums like sergio's ? Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
leonardomg Posted May 27, 2005 Share Posted May 27, 2005 yes, except for the B2B one "customers_group_id". Any idea of what I can do? Thanks a lot. does your specials table have the same set of colums like sergio's ? <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted May 27, 2005 Author Share Posted May 27, 2005 what happens if you run the sql interactively in phpmyadmin ? if error, try without the ';' at the end if still error, try without the single quotes around the number if still error, do you use comma as decimal separator ? that's all I can think of ... You do have default values for all other mandatory columns - right ? Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
garret Posted May 29, 2005 Share Posted May 29, 2005 Hi :) the same problem, I can't manage it :( 1064 - You have an error in your SQL syntax near '; ' at line 1 Insert into specials (products_id, specials_new_products_price) values (2226, '20.286882'); [TEP STOP] my tables: specials_id int(11) No auto_increment products_id int(11) No 0 specials_new_products_price decimal(15,4) No 0.0000 specials_date_added datetime Yes NULL specials_last_modified datetime Yes NULL expires_date datetime Yes NULL date_status_change datetime Yes NULL status int(1) No 1 PLEASE HELP ME !!! :blink: PS I made Polish translation = do you wish to add my language file?? Quote Link to comment Share on other sites More sharing options...
leonardomg Posted May 30, 2005 Share Posted May 30, 2005 I tried running the sql (e.g. Insert into specials (products_id, specials_new_products_price) values (30, '5.373'); ) interactively and here's what happened: - When changing a category do 10% discount, either one or two products changed to 9% discount. The other products in the category remained without any discount. - When changing a category to 20% discount, one product would change to 20% discount, the others, again, remaining in their no-discount state. So, I don't get an error when I run the sql on phpmyadmin, but something isn't quite working. Anywhere nearer to finding out? Thanks again. what happens if you run the sql interactively in phpmyadmin ?if error, try without the ';' at the end if still error, try without the single quotes around the number if still error, do you use comma as decimal separator ? that's all I can think of ... You do have default values for all other mandatory columns - right ? <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
leonardomg Posted May 30, 2005 Share Posted May 30, 2005 Sorry, forgot one thing: I don't have a default value for "specials_id". And all the date related ones have a default of "NULL". Just to let you know. I tried running the sql (e.g. Insert into specials (products_id, specials_new_products_price) values (30, '5.373'); ) interactively and here's what happened: - When changing a category do 10% discount, either one or two products changed to 9% discount. The other products in the category remained without any discount. - When changing a category to 20% discount, one product would change to 20% discount, the others, again, remaining in their no-discount state. So, I don't get an error when I run the sql on phpmyadmin, but something isn't quite working. Anywhere nearer to finding out? Thanks again. <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted May 30, 2005 Author Share Posted May 30, 2005 I tried running the sql (e.g. Insert into specials (products_id, specials_new_products_price) values (30, '5.373'); ) interactively and here's what happened: - When changing a category do 10% discount, either one or two products changed to 9% discount. The other products in the category remained without any discount. - When changing a category to 20% discount, one product would change to 20% discount, the others, again, remaining in their no-discount state. So, I don't get an error when I run the sql on phpmyadmin, but something isn't quite working. Anywhere nearer to finding out? Thanks again. <{POST_SNAPBACK}> I'm working with garret trying to troubleshoot this situation ... stay tuned ... Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted May 30, 2005 Author Share Posted May 30, 2005 Sorry, forgot one thing: I don't have a default value for "specials_id". And all the date related ones have a default of "NULL". Just to let you know. <{POST_SNAPBACK}> Specials_id has an autoincrement set, so a new id is generated upon insertion. Thus it acts as a default, though a different incremental number each time. Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted May 30, 2005 Author Share Posted May 30, 2005 working with gerrit, his problem was solved by removing the ';' at the end of the sql string on line 120 and 123 in the code. Could you all try the same and let me know if this fixed it ? Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
garret Posted May 30, 2005 Share Posted May 30, 2005 ... new working version with Polish translation was send to bruyndoncx Please remember to clear cache at your shop after changing files otherwise .... it seems not working B) best regards thx bruyndoncx for kind work together :thumbsup: Quote Link to comment Share on other sites More sharing options...
leonardomg Posted May 31, 2005 Share Posted May 31, 2005 Great! My problem is solved! Taking the ; from the two sql strings dit it. Thanks a lot for your help and good luck with your future contributions! All the best! working with gerrit, his problem was solved by removing the ';' at the end of the sql string on line 120 and 123 in the code. Could you all try the same and let me know if this fixed it ? <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
leonardomg Posted May 31, 2005 Share Posted May 31, 2005 Another issue: When trying to update a price of an already discounted product in a category I also got an error, similar to the one I was first getting. I solved it getting rid of the ";" in the sql string on line 73 of the file. Just to let you know. Quote Link to comment Share on other sites More sharing options...
shahin Posted June 9, 2005 Share Posted June 9, 2005 Dear bruyndoncx, Thank you very much for your contribution. I am new in mysql and php. When I used your contribution I got the following error : 1064 - You have an error in your SQL syntax near '; ' at line 1 Insert into specials (products_id, specials_new_products_price) values (1, '9.303'); [TEP STOP] Could you please tell me how to solve this . Quote Link to comment Share on other sites More sharing options...
Wendy James Posted June 9, 2005 Share Posted June 9, 2005 1064 is usually caused when you have an empty table. You can try this solution... http://www.oscommerce.com/forums/index.php?sho...=144095&hl=1064 Quote Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep. Link to comment Share on other sites More sharing options...
Guest Posted June 9, 2005 Share Posted June 9, 2005 Dear bruyndoncx, Thank you very much for your contribution. I am new in mysql and php. When I used your contribution I got the following error : 1064 - You have an error in your SQL syntax near '; ' at line 1 Insert into specials (products_id, specials_new_products_price) values (1, '9.303'); [TEP STOP] Could you please tell me how to solve this . <{POST_SNAPBACK}> If you read from post #2 in this thread on, you will see the fix at post #19, as 4 other people had the same issue. Usually, if you search for an answer to your question BEFORE posting, that is considered good netiquette. I can understand re-asking the same question in a thread with 50 pages, but in a thread that has 2? :rolleyes: More specifically, your questions were already answered in this post here. 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.