PDA

View Full Version : Quickly Update Product Stock



michael_s
09-19-2014, 12:24 AM
NOTE: Not a full package, just instructions to update.

This mod makes the contribution work with PHP 5.3 and OSC 2.3.3.2
Open file catalog/admin/quick_stockupdate.php

-For PHP 5.3 compatibility find on line 147:

if ( (eregi('alter ', $next)) || (eregi('update', $next)) || (eregi('create', $next)) || (eregi('insert', $next)) || (eregi('delete', $next)) || (eregi('drop t', $next)) ) {

REPLACE WITH

if ( (preg_match('/alter /i', $next)) || (preg_match('/update/i', $next)) || (preg_match('/create/i', $next)) || (preg_match('/insert/i', $next)) || (preg_match('/delete/i', $next)) || (preg_match('/drop t/i', $next)) ) {



-For Oscommerce 3.3.3.2 Find on line 93:

return mysql_query($query, $$link);

REPLACE WITH:

return mysqli_query($$link, $query);

More... (http://addons.oscommerce.com/info/558)