$updateArray = array(); $updateArray['specials_new_products_price'] = $this->post['specials_new_products_price']; $updateArray['start_date'] = $specials_start_date; $updateArray['expires_date'] = $specials_expired_date; /* if ($this->post['tax_id']) { // we have to substract the vat so the price is excl. vat $tax_rate=mslib_fe::getTaxRate($this->post['tax_id']); $updateArray['specials_new_products_price']=round($updateArray['specials_new_products_price']/(1+$tax_rate),4); } */ $updateArray['status'] = $special_status; $filter = array(); $filter[] = 'products_id=' . $prodid; if (mslib_befe::ifExists('1', 'tx_multishop_products', 'imported_product', $filter)) { // lock changed columns mslib_befe::updateImportedProductsLockedFields($prodid, 'tx_multishop_specials', $updateArray); } $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_specials', 'products_id=\'' . $prodid . '\'', $updateArray); $res = $GLOBALS['TYPO3_DB']->sql_query($query); } else { $updateArray = array(); $updateArray['products_id'] = $prodid; $updateArray['specials_new_products_price'] = $this->post['specials_new_products_price']; $updateArray['start_date'] = $specials_start_date; $updateArray['expires_date'] = $specials_expired_date; /* if ($this->post['tax_id']) { // we have to substract the vat so the price is excl. vat $tax_rate=mslib_fe::getTaxRate($this->post['tax_id']); $updateArray['specials_new_products_price']=round($updateArray['specials_new_products_price']/(1+$tax_rate),4); } */
case 'delete': foreach ($this->post['selectedProducts'] as $old_categories_id => $array) { foreach ($array as $pid) { mslib_befe::deleteProduct($pid, $old_categories_id); } } break; case 'move': if (is_numeric($this->post['tx_multishop_pi1']['target_categories_id']) and mslib_befe::canContainProducts($this->post['tx_multishop_pi1']['target_categories_id'])) { foreach ($this->post['selectedProducts'] as $old_categories_id => $array) { foreach ($array as $pid) { $filter = array(); $filter[] = 'products_id=' . $pid; if (mslib_befe::ifExists('1', 'tx_multishop_products', 'imported_product', $filter)) { // lock changed columns mslib_befe::updateImportedProductsLockedFields($pid, 'tx_multishop_products_to_categories', array('categories_id' => $this->post['tx_multishop_pi1']['target_categories_id'])); } mslib_befe::moveProduct($pid, $this->post['tx_multishop_pi1']['target_categories_id'], $old_categories_id); } } } break; case 'duplicate': foreach ($this->post['selectedProducts'] as $old_categories_id => $array) { if ($this->post['tx_multishop_pi1']['target_categories_id'] > 0) { $target_cat_id = $this->post['tx_multishop_pi1']['target_categories_id']; } else { $target_cat_id = $old_categories_id; } foreach ($array as $pid) { mslib_befe::duplicateProduct($pid, $target_cat_id);