♥JcMagpie Posted May 30, 2019 Share Posted May 30, 2019 Need a bit more control, use manufacturer id to limit changes update `products` set `products_price` = (`products_price` * '1.10') WHERE `manufacturers_id` = '1'; valquiria23 1 Quote Link to comment Share on other sites More sharing options...
radhavallabh Posted May 30, 2019 Share Posted May 30, 2019 3 hours ago, BrockleyJohn said: ok, you can do this in the addon by cheating a little. Start by changing the page to show the maximum number of lines in the drop-down (100). You'll see this adds a parameter to the end of the url: row_by_page=100 Just edit this to a bigger number than the number of products you have, eg row_by_page=10000 BUT the code is not written very efficiently and you may find that it times out trying to update too many products. Gives a 413 page error too much data.. 2 hours ago, JcMagpie said: A simple solution may be to simply use phpMyAdmin to run a simple SQL query somthng like, UPDATE products SET `products_price`=`products_price`+100 (100 can be replaced by any number you like) Test by first simulating on your db and backup first. Need to do it by 5% Please Help!!! Quote Link to comment Share on other sites More sharing options...
♥JcMagpie Posted May 30, 2019 Share Posted May 30, 2019 (edited) You already have that info. price = price*1.05 is 5% update `products` set `products_price` = (`products_price` * '1.05') WHERE `manufacturers_id` = '1'; Edited May 30, 2019 by JcMagpie valquiria23 1 Quote Link to comment Share on other sites More sharing options...
dreumel Posted May 30, 2019 Share Posted May 30, 2019 (edited) if the image does not appear in the top right corner change line 538 and 543 " . '/images' . to " . 'images/' . " in quick_updates.php. Edited May 30, 2019 by dreumel Quote Link to comment Share on other sites More sharing options...
BrockleyJohn Posted May 31, 2019 Author Share Posted May 31, 2019 10 hours ago, dreumel said: if the image does not appear in the top right corner change line 538 and 543 " . '/images' . to " . 'images/' . " in quick_updates.php. Wish I'd seen that before building the next release! Incorporated for a future version - there are two places to change; one for the category image and one for the manufacturer image. Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
BrockleyJohn Posted May 31, 2019 Author Share Posted May 31, 2019 version 3.1.1 is available for download from https://apps.oscommerce.com/Apps&XpKWd&quick-update-bs Sponsored by @supercheaphobb it includes options for working with prices including tax and adding a datepicker to the specials expiry date. It also fixes the manufacturer query error that @radhavallabh hit the other day but not the latest bug above. Update is simple - just copy the files. New options are added automatically when you access the page and set to default. SCH_001, valquiria23 and dreumel 3 Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
dreumel Posted June 4, 2019 Share Posted June 4, 2019 Hi John, Is there a way to implement a search function? Like the one in the admin/categories tab? Great add-on! valquiria23 1 Quote Link to comment Share on other sites More sharing options...
drusky Posted August 23, 2019 Share Posted August 23, 2019 hi there, My client has asked if the off/on buttons can be colorized to be red/green for easier scanning. Has anyone else done this for this module, in which case can you please share? Quote Link to comment Share on other sites More sharing options...
BrockleyJohn Posted August 30, 2019 Author Share Posted August 30, 2019 @drusky Donna, radio buttons are rendered by the browser directly using built-in images so they can't be styled directly. The technique of images inside links used on the admin/categories page for status wouldn't be any good here because it requires reloading the page to change the button. On the other hand, it is possible to do something with pseudo elements - basically hide the radio buttons themselves and show something that can be styled instead. The technique is described in this answer on stackoverflow: https://stackoverflow.com/a/38468320/4384632 Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
BrockleyJohn Posted October 8, 2019 Author Share Posted October 8, 2019 I have just uploaded v3.1.2 to the addons area - https://apps.oscommerce.com/XpKWd&quick-update-bs This version, sponsored by @drusky, introduces coloured radio buttons for product and special status: It also includes the image fix by @dreumel and a bunch of fixes for php7.2 compatibility. Tested against CE Phoenix v1.0.1.2 valquiria23 and bonbec 1 1 Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
BrockleyJohn Posted February 25, 2020 Author Share Posted February 25, 2020 @artfulweb this isn't particularly a phoenix problem, it's historically crap code. If you put at the top of file - before or after including application_top $current_category_id = 0; it should behave in exactly the same way as now but without the notices. Confession - I have not tested this! Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
artfulweb Posted February 25, 2020 Share Posted February 25, 2020 11 minutes ago, BrockleyJohn said: @artfulweb this isn't particularly a phoenix problem, it's historically crap code. If you put at the top of file - before or after including application_top $current_category_id = 0; it should behave in exactly the same way as now but without the notices. Confession - I have not tested this! Perfect! Thanks John. Quote Link to comment Share on other sites More sharing options...
nedragdnuos Posted August 10, 2020 Share Posted August 10, 2020 Hi I am just trying to get this to work with Phoenix 1076 and am getting this error - any thoughts what it may be? Regards! Warning: Use of undefined constant TABLE_TAX_CLASS - assumed 'TABLE_TAX_CLASS' (this will throw an Error in a future version of PHP) in D:\XAMP\htdocs\phoenix1076\admin\quick_updates.php on line 2581146 - Table 'phoenix1076.table_tax_class' doesn't exist select tax_class_id, tax_class_title from TABLE_TAX_CLASS order by tax_class_title Quote Link to comment Share on other sites More sharing options...
♥ecartz Posted August 10, 2020 Share Posted August 10, 2020 1 hour ago, nedragdnuos said: Warning: Use of undefined constant TABLE_TAX_CLASS In general, when you see errors of this form TABLE_SOMETHING in regards to SQL, the fix is to go through and replace " . TABLE_TAX_CLASS . " with tax_class And yes, it is deliberate to remove the quotation marks and periods when doing that. Before the code was concatenating the constant into the string. Now the constant is gone and you just put the table name directly into the string. "select tax_class_id, tax_class_title from tax_class order by tax_class_title" Note that this means that the App was last updated prior to the 1.0.5.9 release. So we're two .0 versions past the change being made that broke this. And we're even further past the start of the change, which actually predates Phoenix. I mention this because unless you have budget to get this updated professionally, you might find that there are other issues that are not current in the code. This just being a particularly visible instance. Quote Always back up before making changes. Link to comment Share on other sites More sharing options...
BrockleyJohn Posted August 10, 2020 Author Share Posted August 10, 2020 2 hours ago, nedragdnuos said: Hi I am just trying to get this to work with Phoenix 1076 and am getting this error - any thoughts what it may be? Regards! Warning: Use of undefined constant TABLE_TAX_CLASS - assumed 'TABLE_TAX_CLASS' (this will throw an Error in a future version of PHP) in D:\XAMP\htdocs\phoenix1076\admin\quick_updates.php on line 2581146 - Table 'phoenix1076.table_tax_class' doesn't exist select tax_class_id, tax_class_title from TABLE_TAX_CLASS order by tax_class_title Here is a quick and dirty (and untested) update which side-steps the issue. There are some extra 'defines' at the top of the file, which you can change if I have missed any or made any tyops in the table names. Some of the code in this addon will be putting its teenage years behind it soon. It was updated to work with early Phoenix which still had the classic 2.3 admin but it has none of the latest Phoenix changes. It definitely won't be responsive and may throw some wobblies. I think there are people running it on 1.0.5.n quick_updates.php Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
nedragdnuos Posted August 11, 2020 Share Posted August 11, 2020 Hi guys thanks for the help, its thrown up a few more errors so may have to drop this addon for the time being as I am not a coder (although given covid19 gives me plenty of time kind of), its not essential, just really handy, just wondering why something like this would not be in the core? Anyways thanks for the help. Quote Link to comment Share on other sites More sharing options...
BrockleyJohn Posted August 11, 2020 Author Share Posted August 11, 2020 7 hours ago, nedragdnuos said: Hi guys thanks for the help, its thrown up a few more errors so may have to drop this addon for the time being as I am not a coder (although given covid19 gives me plenty of time kind of), its not essential, just really handy, just wondering why something like this would not be in the core? Anyways thanks for the help. What further errors did it throw up? Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
nedragdnuos Posted August 11, 2020 Share Posted August 11, 2020 Hi John, I cleaned up the top section you added, products description was still tax_class and after that change it worked and this is what I am getting, an error on the right a broken image that says "switch to complete edit" require('includes/application_top.php'); $current_category_id = 0; if (! defined('TABLE_TAX_CLASS')) define('TABLE_TAX_CLASS', 'tax_class'); if (! defined('TABLE_MANUFACTURERS')) define('TABLE_MANUFACTURERS', 'manufacturers'); if (! defined('TABLE_CATEGORIES')) define('TABLE_CATEGORIES', 'categories'); if (! defined('TABLE_PRODUCTS')) define('TABLE_PRODUCTS', 'products'); if (! defined('TABLE_PRODUCTS_DESCRIPTION')) define('TABLE_PRODUCTS_DESCRIPTION', 'products_description'); - had to change this if (! defined('TABLE_SPECIALS')) define('TABLE_SPECIALS', 'specials'); I hope this helps Quote Link to comment Share on other sites More sharing options...
BrockleyJohn Posted August 11, 2020 Author Share Posted August 11, 2020 1 hour ago, nedragdnuos said: Hi John, I cleaned up the top section you added, products description was still tax_class and after that change it worked and this is what I am getting, an error on the right a broken image that says "switch to complete edit" require('includes/application_top.php'); $current_category_id = 0; if (! defined('TABLE_TAX_CLASS')) define('TABLE_TAX_CLASS', 'tax_class'); if (! defined('TABLE_MANUFACTURERS')) define('TABLE_MANUFACTURERS', 'manufacturers'); if (! defined('TABLE_CATEGORIES')) define('TABLE_CATEGORIES', 'categories'); if (! defined('TABLE_PRODUCTS')) define('TABLE_PRODUCTS', 'products'); if (! defined('TABLE_PRODUCTS_DESCRIPTION')) define('TABLE_PRODUCTS_DESCRIPTION', 'products_description'); - had to change this if (! defined('TABLE_SPECIALS')) define('TABLE_SPECIALS', 'specials'); I hope this helps you can make that text go away by copying the attached image to admin/images/ (used to be core osc) Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
nedragdnuos Posted August 12, 2020 Share Posted August 12, 2020 Hi John, thank you for that, it fixed the missing image but when I go to update quantity etc I get this error: Fatal error: Uncaught Error: Call to undefined function tep_set_product_status() in D:\XAMP\htdocs\phoenix1076\admin\quick_updates.php:395 Stack trace: #0 {main} thrown in D:\XAMP\htdocs\phoenix1076\admin\quick_updates.php on line 395 Quote Link to comment Share on other sites More sharing options...
Dan Cole Posted December 25, 2020 Share Posted December 25, 2020 (edited) @BrockleyJohn John I was looking through the code in the quick_updates file to get a little familiar with it, in preparation for a few changes I wanted to make and noticed that the table defines weren't updated so I went ahead and did that. In case it is of some help the file is attached. Dan quick_updates.zip Edited December 25, 2020 by Dan Cole Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
kgtee Posted December 26, 2020 Share Posted December 26, 2020 On 2/25/2020 at 10:41 PM, BrockleyJohn said: @artfulweb this isn't particularly a phoenix problem, it's historically crap code. If you put at the top of file - before or after including application_top $current_category_id = 0; it should behave in exactly the same way as now but without the notices. Confession - I have not tested this! I was playing with this quick_update, and found the above line ($current_category_id = 0) did not yield the desired filter result. Apparently the cPath was not calculated correctly due to Phoenix new code I add these lines (in bold) instead at around line no. 247, and it now works: Quote // page select fix v2.8.2 June 27, 2009 $row_by_page = (isset($_GET['row_by_page']) ? (int)$_GET['row_by_page'] : MAX_DISPLAY_SEARCH_RESULTS); define('MAX_DISPLAY_ROW_BY_PAGE' , $row_by_page ); // calculate category path if (empty($_GET['cPath'])) { $current_category_id = 0; $cPath = ''; } else { $cPath_array = tep_parse_category_path($_GET['cPath']); $cPath = implode('_', $cPath_array); $current_category_id = end($cPath_array); } $manufacturer = (isset($_GET['manufacturer']) ? (int)$_GET['manufacturer'] : false); $sort_by = (isset($_GET['sort_by']) ? $_GET['sort_by'] : false); $page = (isset($_GET['page']) ? $_GET['page'] : false); //end page select fix v2.8.2 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.