Пример #1
0
         }
     }
     // custom hook that can be controlled by third-party plugin eof
     // set default Crumpath
     mslib_befe::setProductDefaultCrumpath($item['added_products_id']);
 } elseif ($item['updated_products_id']) {
     // custom hook that can be controlled by third-party plugin
     if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/admin_pages/admin_import.php']['updateProductPostHook'])) {
         $params = array('products_id' => $item['updated_products_id'], 'item' => &$item, 'prefix_source_name' => $this->post['prefix_source_name']);
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/admin_pages/admin_import.php']['updateProductPostHook'] as $funcRef) {
             \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
         }
     }
     // custom hook that can be controlled by third-party plugin eof
     // set default Crumpath
     mslib_befe::setProductDefaultCrumpath($item['updated_products_id']);
 }
 // custom hook that can be controlled by third-party plugin
 if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/admin_pages/admin_import.php']['insertAndUpdateProductPostHook'])) {
     $params = array('products_id' => $item['added_products_id'] ? $item['added_products_id'] : $item['updated_products_id'], 'import_data_collector' => &$import_data_collector, 'item' => &$item, 'prefix_source_name' => $this->post['prefix_source_name']);
     foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/admin_pages/admin_import.php']['insertAndUpdateProductPostHook'] as $funcRef) {
         \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
     }
 }
 // add/update eof
 if ($this->get['run_as_cron']) {
     $subtel++;
     $message = ($item['updated_products_id'] ? 'Updated: ' : 'Added: ') . $item['products_name'] . " (products_id: " . $products_id . ", hashed id: " . $item['extid'] . ")\n";
     if ($subtel == 50) {
         if ($start_time) {
             $end_time = microtime(true);
Пример #2
0
     if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/admin_pages/includes/admin_edit_product.php']['insertProductPostHook'])) {
         $params = array('products_id' => $prodid);
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/admin_pages/includes/admin_edit_product.php']['insertProductPostHook'] as $funcRef) {
             \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
         }
     }
     // custom hook that can be controlled by third-party plugin eof
 }
 if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/admin_pages/admin_edit_product.php']['saveProductPostHook'])) {
     $params = array('prodid' => $prodid);
     foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/admin_pages/admin_edit_product.php']['saveProductPostHook'] as $funcRef) {
         \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
     }
 }
 // set default Crumpath
 mslib_befe::setProductDefaultCrumpath($prodid);
 // lets notify plugin that we have update action in product
 tx_mslib_catalog::productsUpdateNotifierForPlugin($this->post, $prodid);
 // custom hook that can be controlled by third-party plugin eof
 if ($this->ms['MODULES']['FLAT_DATABASE']) {
     // if the flat database module is enabled we have to sync the changes to the flat table
     mslib_befe::convertProductToFlat($prodid);
 }
 if (isset($this->post['SaveClose']) || isset($this->post['save_as_new'])) {
     if (strpos($this->post['tx_multishop_pi1']['referrer'], 'action=edit_product') === false && strpos($this->post['tx_multishop_pi1']['referrer'], 'action=add_product') === false && $this->post['tx_multishop_pi1']['referrer']) {
         header("Location: " . $this->post['tx_multishop_pi1']['referrer']);
         exit;
     } else {
         header("Location: " . $this->FULL_HTTP_URL . mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=admin_products_search_and_edit', 1));
         exit;
     }
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
$content = '';
$max_pages = 2;
$prefix_domain = $this->FULL_HTTP_URL;
@unlink($log_file);
set_time_limit(7200);
ignore_user_abort(true);
$sql_chk = $GLOBALS['TYPO3_DB']->SELECTquery('products_id', 'tx_multishop_products', '', '', 'products_id asc', '');
$qry_chk = $GLOBALS['TYPO3_DB']->sql_query($sql_chk);
if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry_chk) > 0) {
    while ($product = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry_chk)) {
        mslib_befe::setProductDefaultCrumpath($product['products_id']);
    }
}
$content .= '<div class="main-heading"><h1>' . $this->pi_getLL('repair_products_default_crumpath') . '</h1></div>';
$content .= '<p>' . $this->pi_getLL('admin_label_repair_products_default_crumpath_done') . '</p>';