/** * Custom step 2 code specific to product importing. Calls the parent ImportStep2 funciton. */ protected function _ImportStep2($MsgDesc="", $MsgStatus="") { // Set up generic import options if ($MsgDesc != "") { $GLOBALS['Message'] = MessageBox($MsgDesc, $MsgStatus); } $this->ImportSession['updateOrderStatus'] = $_POST['updateOrderStatus']; parent::_ImportStep2(); }
protected function _GenerateImportSummary() { // rebuild the nested set data for categories $nestedSet = new ISC_NESTEDSET_CATEGORIES(); $nestedSet->rebuildTree(); // update cache of root categories $GLOBALS['ISC_CLASS_DATA_STORE']->UpdateRootCategories(); // update cache for category discounts $GLOBALS['ISC_CLASS_DATA_STORE']->UpdateCustomerGroupsCategoryDiscounts(); parent::_GenerateImportSummary(); }
/** * Custom step 2 code specific to product importing. Calls the parent ImportStep2 funciton. */ protected function _ImportStep2($MsgDesc="", $MsgStatus="") { if (!empty($_POST)) { $this->ImportSession['IsBulkEdit'] = isset($_POST['BulkEditTemplate']); if ($this->ImportSession['IsBulkEdit']) { $_POST['OverrideDuplicates'] = 1; $_POST['Headers'] = 1; } } // Set up generic import options if ($MsgDesc != "") { $GLOBALS['Message'] = MessageBox($MsgDesc, $MsgStatus); } parent::_ImportStep2(); }
protected function _GenerateImportSummary() { // we still need to create other possible combinations if (isset($this->ImportSession['NewVariations']) && count($this->ImportSession['NewVariations'])) { foreach ($this->ImportSession['NewVariations'] as $productID => $varOptions) { $variationID = $this->ImportSession['NewVariationIDs'][$productID]; // update the number of options for the variation $updateVar = array( 'vnumoptions' => count($varOptions) ); $GLOBALS['ISC_CLASS_DB']->UpdateQuery('product_variations', $updateVar, 'variationid = ' . $variationID); if ($this->ImportSession['CreateAllCombos']) { // get all the option id's grouped by the option name $variationID = 0; $combinations = GetVariationCombinations($productID); foreach ($combinations as $combination) { $optionList = implode(',', $combination); // check if this combo exists $query = "SELECT * FROM [|PREFIX|]product_variation_combinations WHERE vcoptionids = '" . $optionList . "' AND vcproductid = " . $productID; $resc = $GLOBALS['ISC_CLASS_DB']->Query($query); if (!$GLOBALS['ISC_CLASS_DB']->CountResult($resc)) { // create a new combo $newCombo = array( 'vcproductid' => $productID, 'vcvariationid' => $variationID, 'vcenabled' => 1, 'vcoptionids' => $optionList ); $GLOBALS['ISC_CLASS_DB']->InsertQuery('product_variation_combinations', $newCombo); } } } } } parent::_GenerateImportSummary(); }