♥JcMagpie Posted January 7, 2018 Share Posted January 7, 2018 Hi, I have not been able to find addon for price update for bootstrapp. The one i currently use makes use of filenames.php which I belive is no longer used. Is there a price update addon that works with bootstrap that I havent found? Or is cvs the way forward with bootstrap? Link to comment Share on other sites More sharing options...
burt Posted January 7, 2018 Share Posted January 7, 2018 I am pretty sure I coded up a nice price updating suite, I am trying to find it... Too much code and projects and modules to sort through. Link to comment Share on other sites More sharing options...
♥raiwa Posted January 7, 2018 Share Posted January 7, 2018 use the compatibility add on: https://apps.oscommerce.com/q=compatibility or, preferable, replace the filename constants by the real filenames: Example: find FILENAME_CUSTOMERS and replae by 'customers.php' just search the add-on files for terms beginning with FILENAME_ and replace all with the real filename. Don't forget to wrap them inside single quotes. You may need to do the same for some directory constants which have been removed from admin/includes/configure.php like: DIR_WS_IMAGES needs to be replaced by 'images/' or DIR_WS_INCLUDES replace by 'includes/' for a complete list compare an old configure file with yours. If you get it to work with the latest 2.3.4 EDGE, it would be great if you pack it in a new 2.3.4 EDGE compatible version and publish it. Like this others can benefit from your work About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥JcMagpie Posted January 8, 2018 Author Share Posted January 8, 2018 16 hours ago, burt said: I am pretty sure I coded up a nice price updating suite, I am trying to find it... Too much code and projects and modules to sort through. 16 hours ago, burt said: I am pretty sure I coded up a nice price updating suite, I am trying to find it... Too much code and projects and modules to sort through. Thanks, no rush as I have decided to get it all working before installing onto new servers. Working on a local host using XAMPP with latest PHP and so far so good install is working fine and I have got it about 90% as I need. One thing that i have come across is the server is giving errors on some addons , Im just ignoring for now as it not stoping me from doing what I need to do. this is for theme changer addon Warning: Use of undefined constant DIR_WS_ICONS - assumed 'DIR_WS_ICONS' (this will throw an Error in a future version of PHP) in and this from payments module. Warning: Use of undefined constant MODULE_PAYMENT_CHRONOPAY_SORT_ORDER - assumed 'MODULE_PAYMENT_CHRONOPAY_SORT_ORDER' (this will throw an Error in a future version of PHP) in Link to comment Share on other sites More sharing options...
♥JcMagpie Posted January 8, 2018 Author Share Posted January 8, 2018 17 hours ago, raiwa said: use the compatibility add on: https://apps.oscommerce.com/q=compatibility or, preferable, replace the filename constants by the real filenames: Example: find FILENAME_CUSTOMERS and replae by 'customers.php' just search the add-on files for terms beginning with FILENAME_ and replace all with the real filename. Don't forget to wrap them inside single quotes. You may need to do the same for some directory constants which have been removed from admin/includes/configure.php like: DIR_WS_IMAGES needs to be replaced by 'images/' or DIR_WS_INCLUDES replace by 'includes/' for a complete list compare an old configure file with yours. If you get it to work with the latest 2.3.4 EDGE, it would be great if you pack it in a new 2.3.4 EDGE compatible version and publish it. Like this others can benefit from your work OK have done all the changes as stated above but its now showing lots of new errors of this type! Do I need to define these an if so in which file. Warning: Use of undefined constant ACTIVATE_COMMERCIAL_MARGIN - assumed 'ACTIVATE_COMMERCIAL_MARGIN' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\public_html\********\quick_updates.php on line 309 Link to comment Share on other sites More sharing options...
Dan Cole Posted January 8, 2018 Share Posted January 8, 2018 1 hour ago, justcatering said: quick_updates.php on line 309 My guess...this file but I don't use it so I can't check it for you. Dan 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...
♥JcMagpie Posted January 8, 2018 Author Share Posted January 8, 2018 5 minutes ago, Dan Cole said: My guess...this file but I don't use it so I can't check it for you. Dan No Dan it was me just being stupid. Its been nearly 15 years since I did any coding and it shows! I had failed to add the new tables to the database. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted January 8, 2018 Author Share Posted January 8, 2018 OK got the basic code working but need some help with output. The code has changed the page layout totaly! I assume I have missed somthing but not sure what. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted January 8, 2018 Author Share Posted January 8, 2018 Also would welcome feed back as I have never used this addon ( iused visable price update but could not find that again) is the dispaly as it should be? Link to comment Share on other sites More sharing options...
♥raiwa Posted January 8, 2018 Share Posted January 8, 2018 15 minutes ago, justcatering said: OK got the basic code working but need some help with output. The code has changed the page layout totaly! I assume I have missed somthing but not sure what. It it breaks the layout only on that page, you probably need to add the lines which include the template_top.php and template_bottom.php to the page file. Compare with a core page file. About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥JcMagpie Posted January 8, 2018 Author Share Posted January 8, 2018 OK the files were missing so added them to top of file. Now page displays as it should but table is gone and new error, very strange why woulld price update link to payapl? Fatal error: Cannot redeclare app_paypal_get_admin_box_links() (previously declared in C:\xampp\htdocs\public_html\includes\apps\paypal\admin\functions\boxes.php:15) in C:\xampp\htdocs\public_html\includes\apps\paypal\admin\functions\boxes.php on line 49 Link to comment Share on other sites More sharing options...
♥JcMagpie Posted January 8, 2018 Author Share Posted January 8, 2018 OK fixed last problem but now, Warning: Use of undefined constant HTML_PARAMS - assumed 'HTML_PARAMS' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\public_html\admin8262\includes\template_top.php on line 14 HTML_PARAMS> Link to comment Share on other sites More sharing options...
♥raiwa Posted January 8, 2018 Share Posted January 8, 2018 Compare the page file with a core page file. There may be unneeded code left which is now in template_top.php. About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥JcMagpie Posted January 8, 2018 Author Share Posted January 8, 2018 OK code is ok but someone else should check . Have not posted code here before so if someone else wants to try but happy to email files. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted January 8, 2018 Author Share Posted January 8, 2018 After some testing display is stabel and prices update but I am geting errors in other files such as , Warning: sizeof(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\public_html\admin8262\categories.php on line 976 Fatal error: Uncaught Error: Call to undefined function mysql_query() in C:\xampp\htdocs\public_html\admin8262\quick_updates.php:126 Stack trace: #0 {main} thrown in C:\xampp\htdocs\public_html\admin8262\quick_updates.php on line 126 Fatal error: Uncaught Error: Call to undefined function mysql_query() in C:\xampp\htdocs\public_html\admin8262\quick_updates.php:117 Stack trace: #0 {main} thrown in C:\xampp\htdocs\public_html\admin8262\quick_updates.php on line 117 Link to comment Share on other sites More sharing options...
♥JcMagpie Posted January 8, 2018 Author Share Posted January 8, 2018 Line 121-- if($HTTP_POST_VARS['product_new_quantity']){ Line 122-- foreach($HTTP_POST_VARS['product_new_quantity'] as $id => $new_quantity) { Line 123-- if ($HTTP_POST_VARS['product_new_quantity'][$id] != $HTTP_POST_VARS['product_old_quantity'][$id]) { Line 124-- $count_update++; Line 125-- $item_updated[$id] = 'updated'; Line 126-- mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_quantity=$new_quantity, products_last_modified=now() WHERE products_id=$id"); Link to comment Share on other sites More sharing options...
Dan Cole Posted January 8, 2018 Share Posted January 8, 2018 I think it should be tep_db_query. That must be a pretty old add-on you have there. Dan 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...
♥raiwa Posted January 8, 2018 Share Posted January 8, 2018 line 126 replace mysql_query by the function tep_db_query. You should replace all native mysql funtions by their oscommerce equivalent. Have a look into includes/functions/database.php to find out. About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥JcMagpie Posted January 8, 2018 Author Share Posted January 8, 2018 cool that fixed all the update errors. Now whats the replacment for !ereg :) Link to comment Share on other sites More sharing options...
♥JcMagpie Posted January 8, 2018 Author Share Posted January 8, 2018 preg_match ? works but gives Warning: preg_match(): Delimiter must not be alphanumeric or backslash in C: Link to comment Share on other sites More sharing options...
♥raiwa Posted January 8, 2018 Share Posted January 8, 2018 You can easy find answers to these generic questions in Google. You need to wrap a delimiter around the regex sequence, usually forward slash, but can be anything else which is not used in the regex rule itself. Post the complete code to give you a concrete solution. About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥JcMagpie Posted January 8, 2018 Author Share Posted January 8, 2018 if ($sort_by && !ereg('order by',$sort_by)) $sort_by = 'order by '.$sort_by ; Link to comment Share on other sites More sharing options...
♥raiwa Posted January 8, 2018 Share Posted January 8, 2018 should be: if ($sort_by && !preg_match('/order by/',$sort_by)) $sort_by = 'order by '.$sort_by ; https://stackoverflow.com/questions/2217850/how-to-replace-ereg but I think you do not need preg_match in that case. A simple strpos($sort_by, 'order_by')=== false should do it and is faster. http://php.net/manual/en/function.strpos.php About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥JcMagpie Posted January 8, 2018 Author Share Posted January 8, 2018 Ok used this--- if ($sort_by && !preg_match('/order by/',$sort_by)) $sort_by = 'order by '.$sort_by ; It works so far. Thanks. Link to comment Share on other sites More sharing options...
♥raiwa Posted January 8, 2018 Share Posted January 8, 2018 you should still check if $sort_by is defined: if( $sort_by && .... or better if(isset($sort_by ) &&..... About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.