예제 #1
0
 function bulkUpload($inc_image = false)
 {
     global $db, $messageStack;
     $error = false;
     $result = $db->Execute("select id from " . TABLE_INVENTORY . " where catalog = '1' and inactive = '0'");
     $cnt = 0;
     while (!$result->EOF) {
         $prodXML = new oscommerce();
         if (!$prodXML->submitXML($result->fields['id'], 'product_ul', true, $inc_image)) {
             $error = true;
             break;
         }
         $cnt++;
         $result->MoveNext();
     }
     $messageStack->add(sprintf(OSCOMMERCE_BULK_UPLOAD_SUCCESS, $cnt), 'success');
     return $error ? true : false;
 }
// | modify it under the terms of the GNU General Public License as  |
// | published by the Free Software Foundation, either version 3 of  |
// | the License, or any later version.                              |
// |                                                                 |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of  |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   |
// | GNU General Public License for more details.                    |
// |                                                                 |
// | The license that is bundled with this package is located in the |
// | file: /doc/manual/ch01-Introduction/license.html.               |
// | If not, see http://www.gnu.org/licenses/                        |
// +-----------------------------------------------------------------+
//  Path: /my_files/custom/inventory/main/extra_actions.php
//
// This file contains the extra actions added to the maintain inventory module, it is executed
// before the standard switch statement
switch ($action) {
    // Begin - Upload operation added by PhreeSoft to upload products to osCommerce
    case 'osc_upload':
        $id = db_prepare_input($_POST['rowSeq']);
        require_once DIR_FS_MY_FILES . 'custom/oscommerce/classes/parser.php';
        require_once DIR_FS_MY_FILES . 'custom/oscommerce/classes/zencart.php';
        $upXML = new oscommerce();
        $upXML->submitXML($id, 'product_ul');
        $action = '';
        break;
        // End - Upload operation added by PhreeSoft
    // End - Upload operation added by PhreeSoft
    default:
}
예제 #3
0
        }
        break;
    case 'bulkupload':
        $upXML = new bulk_upload();
        $inc_image = isset($_POST['include_images']) ? true : false;
        if ($upXML->bulkUpload($inc_image)) {
            gen_add_audit_log(OSCOMMERCE_BULK_UPLOAD);
        }
        break;
    case 'sync':
        $upXML = new oscommerce();
        if ($upXML->submitXML(0, 'product_sync')) {
            gen_add_audit_log(OSCOMMERCE_PRODUCT_SYNC);
        }
        break;
    case 'confirm':
        $upXML = new oscommerce();
        $upXML->post_date = $ship_date;
        if ($upXML->submitXML(0, 'confirm')) {
            gen_add_audit_log(OSCOMMERCE_SHIP_CONFIRM, $ship_date);
        }
        break;
    default:
}
/*****************   prepare to display templates  *************************/
$include_header = true;
$include_footer = true;
$include_calendar = true;
$include_tabs = false;
$include_template = 'template_main.php';
define('PAGE_TITLE', BOX_OSCOMMERCE_MODULE);