function insertOrdersProductPreProc(&$params, &$reference) { error_log("insertOrdersProductPreProc - begin"); $order_id = $params['insertArray']['orders_id']; $cart_product_item = $params['value']; $product_id = $cart_product_item['products_id']; $variant_id = $cart_product_item['variant_id']; // Get variant's details from the db $qry_res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('v.variant_price, v.variant_sku', 'tx_msvariants_domain_model_variants v', 'v.variant_id=' . $variant_id . ' and v.product_id=' . $product_id); if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry_res) != 1) { // TODO this should never happen - raise exception? return; } $variant_data = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry_res); // Insert variant details about the order into the db $insert_array = array('order_id' => $order_id, 'product_id' => $product_id, 'variant_id' => $variant_id, 'price' => $variant_data['variant_price'], 'quantity' => $cart_product_item['qty'], 'sku' => $variant_data['variant_sku']); $res = $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_msvariants_domain_model_variantsorders', $insert_array); // Insert variant attributes details about the order into the db $qry_res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('va.attribute_id, va.option_id, va.option_value_id', 'tx_msvariants_domain_model_variantsattributes va', 'va.variant_id=' . $variant_id . ' and va.product_id=' . $product_id); if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry_res) <= 0) { // TODO this should never happen - raise exception? return; } while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry_res)) != false) { $row['option_name'] = mslib_fe::getRealNameOptions($row['option_id']); $row['option_value_name'] = mslib_fe::getNameOptions($row['option_value_id']); $insert_array = array('order_id' => $order_id, 'product_id' => $product_id, 'variant_id' => $variant_id, 'attribute_id' => $row['attribute_id'], 'option_id' => $row['option_id'], 'option_value_id' => $row['option_value_id'], 'option_name' => $row['option_name'], 'option_value_name' => $row['option_value_name']); $res = $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_msvariants_domain_model_variantsattributesorders', $insert_array); } // while error_log("insertOrdersProductPreProc - end"); }
function init($ref) { mslib_fe::init($ref); $this->initLanguage($ref->LOCAL_LANG); static $installedPaymentMethods; // custom hook for loading the installed payment methods if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_payment.php']['mslib_payment'])) { $params = array('installedPaymentMethods' => &$installedPaymentMethods); foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_payment.php']['mslib_payment'] as $funcRef) { \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $ref); } } // custom hook for manipulating the installed payment methods if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_payment.php']['mslib_paymentPostProc'])) { $params = array('installedPaymentMethods' => &$installedPaymentMethods); foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_payment.php']['mslib_paymentPostProc'] as $funcRef) { \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $ref); } } $this->installedPaymentMethods = $params['installedPaymentMethods']; // custom hook for loading the installed payment methods eof // load enabled payment methods $filter = array(); if (!$include_hidden_items) { $filter[] = 's.status=1'; } $filter[] = 'd.language_id=\'' . $this->sys_language_uid . '\''; $filter[] = 's.id=d.id'; $filter[] = '(s.page_uid=' . $this->shop_pid . ' or s.page_uid=0)'; $str = $GLOBALS['TYPO3_DB']->SELECTquery('*', 'tx_multishop_payment_methods s, tx_multishop_payment_methods_description d', implode(' AND ', $filter), '', 's.sort_order', ''); $qry = $GLOBALS['TYPO3_DB']->sql_query($str); if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry)) { $array = array(); while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry)) { $array[$row['code']] = $row; } $this->enabledPaymentMethods = $array; } // load enabled payment methods eof }
$tmp .= '<li><div class="dyna_button"><span>' . $x . '</span></div></li>'; } else { $tmp .= '<li><div class="dyna_button"><a class="ajax_link pagination_button" href="' . mslib_fe::typolink('', 'p=' . ($x - 1) . '&' . mslib_fe::tep_get_all_get_params(array('p', 'Submit', 'page', 'mini_foto', 'clearcache')), 1) . '">' . $x . '</a></div></li>'; } } $tmp .= '</ul> </li>'; $tmp .= '<li class="pagenav_next"><div class="dyna_button">'; if (($p + 1) * $limit_per_page < $pageset['total_rows']) { $tmp .= '<a class="ajax_link pagination_button" href="' . mslib_fe::typolink('', 'p=' . ($p + 1) . '&' . mslib_fe::tep_get_all_get_params(array('p', 'Submit', 'page', 'mini_foto', 'clearcache')), 1) . '">' . $this->pi_getLL('next') . '</a>'; } else { $tmp .= '<span>' . $this->pi_getLL('next') . '</span>'; } $tmp .= '</div></li>'; $tmp .= '<li class="pagenav_last"><div class="dyna_button">'; if (($p + 1) * $limit_per_page < $pageset['total_rows']) { $times = $pageset['total_rows'] / $limit_per_page; $lastpage = floor($times); if ($lastpage == $times) { $lastpage--; } $tmp .= '<a class="ajax_link pagination_button" href="' . mslib_fe::typolink('', 'p=' . $lastpage . '&' . mslib_fe::tep_get_all_get_params(array('p', 'Submit', 'page', 'mini_foto', 'clearcache')), 1) . '">' . $this->pi_getLL('last') . '</a>'; } else { $tmp .= '<span>' . $this->pi_getLL('last') . '</span>'; } $tmp .= '</div></li>'; $tmp .= '</ul> </div> '; $content .= $tmp; }
$categoriesStartingPoint = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'categoriesStartingPoint', 's_advanced'); if (!$categoriesStartingPoint and is_numeric($this->conf['categoriesStartingPoint'])) { $categoriesStartingPoint = $this->conf['categoriesStartingPoint']; } if ($categoriesStartingPoint > 0) { $cats = mslib_fe::get_subcategory_ids($categoriesStartingPoint); $cats[] = $categoriesStartingPoint; if ($this->ms['MODULES']['FLAT_DATABASE']) { $tbl = 'pf.'; } else { $tbl = 'p2c.'; } $filter[] = '(' . $tbl . 'categories_id IN (' . implode(",", $cats) . '))'; } $limit_per_page = $this->ms['MODULES']['PRODUCTS_LISTING_LIMIT']; $pageset = mslib_fe::getProductsPageSet($filter, $offset, $this->ms['MODULES']['PRODUCTS_LISTING_LIMIT'], $orderby, $having, $select, $where, 0, $from, array(), 'hot_products', 'p.products_id,COUNT(' . $tbl . 'products_id) as total_quantity'); $products = $pageset['products']; if ($pageset['total_rows'] > 0) { if (strstr($this->ms['MODULES']['PRODUCTS_LISTING_TYPE'], "..")) { die('error in PRODUCTS_LISTING_TYPE value'); } else { if (strstr($this->ms['MODULES']['PRODUCTS_LISTING_TYPE'], "/")) { require $this->DOCUMENT_ROOT . $this->ms['MODULES']['PRODUCTS_LISTING_TYPE'] . '.php'; } else { if (!$this->ms['MODULES']['PRODUCTS_LISTING_TYPE']) { $this->ms['MODULES']['PRODUCTS_LISTING_TYPE'] = 'default'; } require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/front_pages/includes/products_listing/' . $this->ms['MODULES']['PRODUCTS_LISTING_TYPE'] . '.php'; } } // pagination
shipping_cost_popup+=\'<tr>\'; shipping_cost_popup+=\'<td class="product_shippingcost_popup_table_left_col">\' + j.deliver_to[country_iso_nr] + \'</td>\'; shipping_cost_popup+=\'<td class="product_shippingcost_popup_table_center_col">\' + shipping_cost + \'</td>\'; shipping_cost_popup+=\'<td class="product_shippingcost_popup_table_right_col">\' + j.deliver_by[country_iso_nr] + \'</td>\'; shipping_cost_popup+=\'</tr>\'; }); shipping_cost_popup+=\'</table>\'; shipping_cost_popup+=\'</div>\'; shipping_cost_popup+=\'</div>\'; msDialog("' . $this->pi_getLL('shipping_costs') . '", shipping_cost_popup, 650); } } }); });*/ }); </script> '; } } else { header('HTTP/1.0 404 Not Found'); // set custom 404 message $page = mslib_fe::getCMScontent('category_not_found_message', $GLOBALS['TSFE']->sys_language_uid); if ($page[0]['name']) { $content = '<div class="main-title"><h1>' . $page[0]['name'] . '</h1></div>'; } else { $content = '<div class="main-title"><h1>' . $this->pi_getLL('the_requested_category_does_not_exist') . '</h1></div>'; } if ($page[0]['content']) { $content .= $page[0]['content']; } }
if (!count($shipping_methods)) { $shipping_methods = $shipping_methods_group; } } } break; } } if (!count($payment_methods)) { // nothing is loaded. this cant be valid so let's load the default methods. // loading payment methods $payment_methods = mslib_fe::loadPaymentMethods(0, $user_country, true, true); } if (!count($shipping_methods)) { // loading shipping methods eof $shipping_methods = mslib_fe::loadShippingMethods(0, $delivery_user_country, true, true); } } if (count($shipping_methods) == 0 and count($payment_methods) == 0) { $stepCodes = array('checkout_address', 'checkout_review', 'checkout_finished'); } else { $stepCodes = array('checkout_address', 'checkout_shipping_payment_method', 'checkout_review', 'checkout_finished'); } function CheckoutStepping(&$steps, $current, $pointer) { $output = '<ul id="checkout_crumbar">'; for ($i = 0; $i < count($steps); $i++) { $output .= '<li class="' . $steps[$i] . ' ' . ($current == $steps[$i] ? 'active' : '') . '">'; if ($steps[$i] == $current) { $output .= '<strong>'; }
$subpartArray['###HEADER_INVOICES_ACTION###'] = $this->pi_getLL('action'); // $subpartArray['###PAGINATION###'] = $pagination_listing; $subpartArray['###INVOICES_LISTING###'] = $invoiceItem; $subpartArray['###FORM_FIELDS_LISTING_ACTION_BLOCK###'] = $form_fields_listing_block; // $subpartArray['###FOOTER_INVOICES_NUMBER###'] = $this->pi_getLL('invoice_number'); $subpartArray['###FOOTER_INVOICES_ORDER_ID###'] = $this->pi_getLL('orders_id'); $subpartArray['###FOOTER_MASTER_SHOP###'] = $master_shop; $subpartArray['###FOOTER_INVOICES_CUSTOMER###'] = $this->pi_getLL('customers'); $subpartArray['###FOOTER_INVOICES_ORDER_DATE###'] = $this->pi_getLL('order_date'); $subpartArray['###FOOTER_INVOICES_PAYMENT_METHOD###'] = $this->pi_getLL('payment_method'); $subpartArray['###FOOTER_INVOICES_PAYMENT_CONDITION###'] = $this->pi_getLL('payment_condition'); $subpartArray['###FOOTER_INVOICES_AMOUNT###'] = mslib_fe::amount2Cents($totalAmount, 0); $subpartArray['###FOOTER_INVOICES_DATE_LAST_SENT###'] = $this->pi_getLL('date_last_sent'); $subpartArray['###FOOTER_INVOICES_PAID_STATUS###'] = $this->pi_getLL('admin_paid'); $subpartArray['###FOOTER_INVOICES_ACTION###'] = $this->pi_getLL('action'); $subpartArray['###CUSTOM_MARKER_0_HEADER###'] = ''; $subpartArray['###CUSTOM_MARKER_0_FOOTER###'] = ''; $subpartArray['###CUSTOM_MARKER_1_HEADER###'] = ''; $subpartArray['###CUSTOM_MARKER_1_FOOTER###'] = ''; $subpartArray['###SHOP_PID2###'] = $this->shop_pid; $subpartArray['###FORM_POST_ACTION_URL###'] = mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=admin_invoices'); // custom page hook that can be controlled by third-party plugin if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/admin_pages/includes/invoices/invoices_listing_table.php']['adminInvoicesListingTmplPreProc'])) { $params = array('subpartArray' => &$subpartArray, 'invoice' => &$invoice); foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/admin_pages/includes/invoices/invoices_listing_table.php']['adminInvoicesListingTmplPreProc'] as $funcRef) { \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this); } } $invoices_results = $this->cObj->substituteMarkerArrayCached($subparts['invoices_results'], array(), $subpartArray);
<script> jQuery(document).ready(function($) { $(".disabled_product").css({ opacity: 0.6 }); $(".disabled_product").hover( function () { $(".disabled_product").css({ opacity: 1 }); }, function () { $(".disabled_product").css({ opacity: 0.6 }); } ); var result = jQuery(".product_listing").sortable({ cursor: "move", //axis: "y", update: function(e, ui) { href = "' . mslib_fe::typolink($this->shop_pid . ',2002', '&tx_multishop_pi1[page_section]=product&catid=' . $current_product['categories_id']) . '"; jQuery(this).sortable("refresh"); sorted = jQuery(this).sortable("serialize", "id"); jQuery.ajax({ type: "POST", url: href, data: sorted, success: function(msg) { //do something with the sorted data } }); } }); }); </script>
} else { $("#crop_save_btn_wrapper").show(); $("#crop_restore_btn_wrapper").hide(); $("#minsize_settings_btn_wrapper").show(); $("#remove_minsize").prop("checked", true); $("#aspectratio_settings_btn_wrapper").show(); $("#remove_aspectratio").prop("checked", true); activate_jcrop_js(r.aspectratio[$("#jCropImageSize").val()], r.minsize[$("#jCropImageSize").val()], r.setselect[$("#jCropImageSize").val()], r.truesize[$("#jCropImageSize").val()]); } } } }); }); $(document).on(\'click\',"#crop_restore",function(e) { e.preventDefault(); href = "' . mslib_fe::typolink($this->shop_pid . ',2002', 'tx_multishop_pi1[page_section]=restore_crop_image&tx_multishop_pi1[crop_section]=categories') . '"; var cropall=0; if ($("#onecrop_for_all").prop("checked")) { cropall=1; } jQuery.ajax({ type:"POST", url:href, data: $(".jcrop_coords").serialize() + "cid=' . (isset($this->get['cid']) && $this->get['cid'] > 0 ? $this->get['cid'] : '') . '", dataType: "json", success: function(r) { //do something with the sorted data if (r.status=="OK") { var new_image=\'<img src="\' + r.images[$("#jCropImageSize").val()] + \'" id="cropbox"/>\'; $("#jCropX").val(""); $("#jCropY").val("");
<?php if (!defined('TYPO3_MODE')) { die('Access denied.'); } $this->box_class = "multishop_basket"; $this->cObj->data['header'] = '<a href="' . mslib_fe::typolink($this->conf['shoppingcart_page_pid'], '&tx_multishop_pi1[page_section]=shopping_cart') . '">' . $this->pi_getLL('basket') . '</a>'; //$cart=$GLOBALS['TSFE']->fe_user->getKey('ses', $this->cart_page_uid); require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'pi1/classes/class.tx_mslib_cart.php'; $mslib_cart = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_mslib_cart'); $mslib_cart->init($this); $cart = $mslib_cart->getCart(); $totalitems = 0; if (count($cart['products']) > 0) { foreach ($cart['products'] as $product) { if (is_numeric($product['qty'])) { $totalitems = $totalitems + $product['qty']; } } } $content .= ' <a href="' . mslib_fe::typolink($this->conf['shoppingcart_page_pid'], '&tx_multishop_pi1[page_section]=shopping_cart') . '" class="multishop_basketbox"><span>' . $totalitems . '</span></a> ';
var ultrasearch_categories_id; var ultrasearch_exclude_negative_filter_values; var ultrasearch_fields=\'' . base64_encode($this->ultrasearch_fields) . '\';'; if ($this->filterCategoriesFormByCategoriesIdGetParam and is_numeric($this->get['categories_id'])) { //$headers.='ultrasearch_categories_id=\''.$this->get['categories_id'].'\';'; $headers .= 'filterCategoriesFormByCategoriesIdGetParam=\'1\';'; } if ($this->ultrasearch_exclude_negative_filter_values) { $headers .= 'ultrasearch_exclude_negative_filter_values=\'1\';'; } $headers .= '// location of the ultrasearch server var ultrasearch_resultset_server_path=\'' . mslib_fe::typolink($this->shop_pid . ',2002', '&tx_multishop_pi1[page_section]=ultrasearch_server&manufacturers_id=' . $this->get['manufacturers_id'] . '&categories_id=' . $this->get['categories_id'] . '&ultrasearch_exclude_negative_filter_values=' . $this->ultrasearch_exclude_negative_filter_values . '&filterCategoriesFormByCategoriesIdGetParam=' . $this->filterCategoriesFormByCategoriesIdGetParam, 1) . '\'; var shipping_costs_overview=false;' . "\n"; if ($this->ms['MODULES']['DISPLAY_SHIPPING_COSTS_ON_PRODUCTS_LISTING_PAGE']) { $headers .= ' var ultrasearch_shipping_costs_review_url=\'' . mslib_fe::typolink('', 'type=2002&tx_multishop_pi1[page_section]=get_product_shippingcost_overview') . '\'; var labels_shipping_costs = \'' . $this->pi_getLL('shipping_costs') . '\'; var labels_product_shipping_and_handling_cost_overview = \'' . $this->pi_getLL('product_shipping_and_handling_cost_overview') . '\'; var labels_deliver_to = \'' . $this->pi_getLL('deliver_to') . '\'; var labels_shipping_and_handling_cost_overview = \'' . $this->pi_getLL('shipping_and_handling_cost_overview') . '\'; var labels_deliver_by = \'' . $this->pi_getLL('deliver_by') . '\'; var labels_delivery_time=\'' . $this->pi_getLL('admin_delivery_time') . '\'; var shipping_costs_overview=true; ' . "\n"; } if ($this->hideHeader) { $headers .= 'var ultrasearcch_resultset_header=\'\';'; } else { $cmsDescriptionArray = array(); if (isset($this->get['manufacturers_id']) && is_numeric($this->get['manufacturers_id'])) { $strCms = $GLOBALS['TYPO3_DB']->SELECTquery('m.manufacturers_id, mc.content, mc.content_footer, m.manufacturers_name', 'tx_multishop_manufacturers m, tx_multishop_manufacturers_cms mc', "m.manufacturers_id='" . $this->get['manufacturers_id'] . "' AND m.status=1 and mc.language_id='" . $this->sys_language_uid . "' and m.manufacturers_id=mc.manufacturers_id", '', '', '');
function renderInterface($params, &$that) { mslib_fe::init($that); //hook to let other plugins further manipulate the method if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_mslib_admin_interface.php']['renderInterfacePreProc'])) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_mslib_admin_interface.php']['renderInterfacePreProc'] as $funcRef) { \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this); } } // for pagination $this->get = $that->get; $this->post = $that->post; if ($this->post) { if ($params['postErno']) { if (count($params['postErno'])) { $returnMarkup = ' <div style="display:none" id="msAdminPostMessage"> <table class="table table-striped table-bordered"> <thead> <tr> <th class="text-center">Status</th> <th>Message</th> </tr> </thead> <tbody> '; foreach ($params['postErno'] as $item) { switch ($item['status']) { case 'error': $item['status'] = '<span class="fa-stack text-danger"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-thumbs-down fa-stack-1x fa-inverse"></i></span>'; break; case 'info': $item['status'] = '<span class="fa-stack"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-thumbs-up fa-stack-1x fa-inverse"></i></span>'; break; } $returnMarkup .= '<tr><td class="text-center">' . $item['status'] . '</td><td>' . $item['message'] . '</td></tr>' . "\n"; } $returnMarkup .= '</tbody></table></div>'; $tableContent .= $returnMarkup; $GLOBALS['TSFE']->additionalHeaderData[] = '<script type="text/javascript" data-ignore="1"> jQuery(document).ready(function ($) { $.confirm({ title: \'\', content: $(\'#msAdminPostMessage\').html() }); }); </script> '; } } } $updateCookie = 0; if ($that->get['Search'] and $that->get['limit'] != $that->cookie['limit']) { $that->cookie['limit'] = $that->get['limit']; $updateCookie = 1; } if ($that->get['Search'] and $that->get['display_all_records'] != $that->cookie['display_all_records']) { $that->cookie['display_all_records'] = $that->get['display_all_records']; $updateCookie = 1; } if ($updateCookie) { $GLOBALS['TSFE']->fe_user->setKey('ses', 'tx_multishop_cookie', $that->cookie); $GLOBALS['TSFE']->storeSessionData(); } if ($that->cookie['display_all_records']) { $that->get['display_all_records'] = $that->cookie['display_all_records']; } else { $that->get['display_all_records'] = ''; } if ($that->cookie['limit']) { $that->get['limit'] = $that->cookie['limit']; } else { $that->get['limit'] = 50; } $that->ms['MODULES']['PAGESET_LIMIT'] = $that->get['limit']; if ($params['settings']['limit'] && is_numeric($params['settings']['limit'])) { $that->ms['MODULES']['PAGESET_LIMIT'] = $params['settings']['limit']; } if (is_numeric($that->get['p'])) { $p = $that->get['p']; } $that->searchKeywords = array(); if ($that->get['tx_multishop_pi1']['keyword']) { // using $_REQUEST cause TYPO3 converts "Command & Conquer" to "Conquer" (the & sign sucks ass) $that->get['tx_multishop_pi1']['keyword'] = trim($that->get['tx_multishop_pi1']['keyword']); $that->get['tx_multishop_pi1']['keyword'] = $GLOBALS['TSFE']->csConvObj->utf8_encode($that->get['tx_multishop_pi1']['keyword'], $GLOBALS['TSFE']->metaCharset); $that->get['tx_multishop_pi1']['keyword'] = $GLOBALS['TSFE']->csConvObj->entities_to_utf8($that->get['tx_multishop_pi1']['keyword'], true); $that->get['tx_multishop_pi1']['keyword'] = mslib_fe::RemoveXSS($that->get['tx_multishop_pi1']['keyword']); $that->searchKeywords[] = $that->get['tx_multishop_pi1']['keyword']; $that->searchMode = '%keyword%'; } $limit_search_result_selectbox = '<select name="limit" class="form-control">'; $limits = array(); $limits[] = '10'; $limits[] = '15'; $limits[] = '20'; $limits[] = '25'; $limits[] = '30'; $limits[] = '40'; $limits[] = '50'; $limits[] = '100'; $limits[] = '150'; $limits[] = '200'; $limits[] = '250'; $limits[] = '300'; $limits[] = '350'; $limits[] = '400'; $limits[] = '450'; $limits[] = '500'; $limits[] = '600'; $limits[] = '700'; $limits[] = '800'; $limits[] = '900'; $limits[] = '1000'; $limits[] = '1500'; $limits[] = '2000'; $limits[] = '2500'; $limits[] = '3000'; $limits[] = '3500'; foreach ($limits as $limit) { $limit_search_result_selectbox .= '<option value="' . $limit . '"' . ($limit == $that->get['limit'] ? ' selected="selected"' : '') . '>' . $limit . '</option>'; } $limit_search_result_selectbox .= '</select>'; $queryData = array(); $queryData['where'] = array(); if (count($that->searchKeywords)) { $keywordOr = array(); $that->searchMode = '%keyword%'; foreach ($that->searchKeywords as $searchKeyword) { if ($searchKeyword) { switch ($that->searchMode) { case 'keyword%': $that->sqlKeyword = addslashes($searchKeyword) . '%'; break; case '%keyword%': default: $that->sqlKeyword = '%' . addslashes($searchKeyword) . '%'; break; } if (is_array($params['query']['keywordSearchByColumns']) && count($params['query']['keywordSearchByColumns'])) { foreach ($params['query']['keywordSearchByColumns'] as $col) { $keywordOr[] = $col . " like '" . $that->sqlKeyword . "'"; } } } } if (is_array($keywordOr) && count($keywordOr)) { $queryData['where'][] = "(" . implode(" OR ", $keywordOr) . ")"; } } if ($params['query']['where']) { if (is_array($params['query']['where'])) { $queryData['where'] = array_merge(array_values($queryData['where']), array_values($params['query']['where'])); } else { $queryData['where'][] = $params['query']['where']; } } switch ($that->get['tx_multishop_pi1']['order_by']) { default: if (is_array($params['query']['defaultOrderByColumns']) && count($params['query']['defaultOrderByColumns'])) { $order_by = implode(',', $params['query']['defaultOrderByColumns']); } break; } switch ($that->get['tx_multishop_pi1']['order']) { case 'a': $order = 'asc'; $order_link = 'd'; break; case 'd': $order = 'desc'; $order_link = 'a'; break; default: if ($params['query']['defaultOrder'] == 'asc') { $order = 'asc'; $order_link = 'd'; } else { $order = 'desc'; $order_link = 'a'; } break; } $orderby[] = $order_by . ' ' . $order; if (is_array($params['query']['select'])) { $queryData['select'] = implode(',', $params['query']['select']); } else { $queryData['select'] = $params['query']['select']; } if (is_array($params['query']['from'])) { $queryData['from'] = implode(',', $params['query']['from']); } else { $queryData['from'] = $params['query']['from']; } if (is_array($params['query']['group_by'])) { $queryData['group_by'] = implode(',', $params['query']['group_by']); } elseif ($params['query']['group_by']) { $queryData['group_by'][] = $params['query']['group_by']; } if (is_array($params['query']['having'])) { $queryData['having'] = $params['query']['having']; } elseif ($params['query']['having']) { $queryData['having'][] = $params['query']['having']; } $queryData['order_by'] = $orderby; $queryData['limit'] = $that->ms['MODULES']['PAGESET_LIMIT']; if (is_numeric($that->get['p'])) { $p = $that->get['p']; } if ($p > 0) { $queryData['offset'] = $p * $that->ms['MODULES']['PAGESET_LIMIT']; } else { $p = 0; $queryData['offset'] = 0; } if ($params['msDebug']) { $this->msDebug = 1; } //$this->msDebug=1; //echo print_r($queryData); //die(); $pageset = mslib_fe::getRecordsPageSet($queryData); if ($this->msDebug) { echo $this->msDebugInfo; die; } if ($params['returnResultsSet']) { return $pageset; } //echo print_r($queryData); //die(); if (count($pageset['dataset'])) { $tr_type = 'even'; if (!$params['settings']['disableForm']) { $tableContent .= '<form method="post" action="' . $params['postForm']['actionUrl'] . '" enctype="multipart/form-data">'; } $tableContent .= '<div class="table-responsive">'; $tableContent .= '<table class="table table-striped table-bordered" id="msAdminTableInterface">'; $tableContent .= '<tr><thead>'; if ($params['settings']['enableRowBasedCheckboxSelection']) { $headerData = ''; $headerData .= ' <script type="text/javascript"> jQuery(document).ready(function($) { $(\'#check_all_1\').click(function(){ $(\'td > div.checkbox > input:checkbox\').prop(\'checked\', this.checked); }); }); </script>'; $GLOBALS['TSFE']->additionalHeaderData[] = $headerData; $headerData = ''; $tableContent .= ' <th class="cellCheckbox"> <div class="checkbox checkbox-success checkbox-inline"> <input type="checkbox" id="check_all_1"> <label for="check_all_1"></label> </div> </th>'; } foreach ($params['tableColumns'] as $col => $valArray) { $tdClass = array(); if ($valArray['align']) { $tdClass[] = 'text-' . $valArray['align']; } if ($valArray['nowrap']) { $tdClass[] = 'cellNoWrap'; } if ($valArray['class']) { $tdClass[] = $valArray['class']; } $tableContent .= '<th' . (count($tdClass) ? ' class="' . implode(' ', $tdClass) . '"' : '') . '>' . $valArray['title'] . '</th>'; } $tableContent .= '</thead></tr><tbody>'; $summarize = array(); $recordCounter = 0; foreach ($pageset['dataset'] as $rowKey => $row) { $recordCounter++; if (!$tr_type or $tr_type == 'even') { $tr_type = 'odd'; } else { $tr_type = 'even'; } $tableContent .= '<tr class="' . $tr_type . '">'; if ($params['settings']['enableRowBasedCheckboxSelection'] && $params['settings']['rowBasedCheckboxSelectionKey']) { $headerData = ''; $headerData .= ' <script type="text/javascript"> jQuery(document).ready(function($) { $(\'#check_all_1\').click(function(){ $(\'td > div.checkbox > input:checkbox\').prop(\'checked\', this.checked); }); }); </script>'; $GLOBALS['TSFE']->additionalHeaderData[] = $headerData; $headerData = ''; $tableContent .= '<td class="cellCheckbox"> <div class="checkbox checkbox-success checkbox-inline"> <input type="checkbox" name="tx_multishop_pi1[tableOverviewSelection][]" id="tableOverviewSelectionCheckbox_' . $row[$params['settings']['rowBasedCheckboxSelectionKey']] . '" value="' . htmlspecialchars($row[$params['settings']['rowBasedCheckboxSelectionKey']]) . '"> <label for="tableOverviewSelectionCheckbox_' . $row[$params['settings']['rowBasedCheckboxSelectionKey']] . '"></label> </div> </td>'; } foreach ($params['tableColumns'] as $col => $valArray) { $originalValue = $row[$col]; switch ($valArray['valueType']) { case 'number_format_2_decimals': $row[$col] = round(number_format($row[$col], 2, '.', ''), 2); $summarize[$col] += $row[$col]; break; case 'number_format_thousand_seperator': $row[$col] = round(number_format($row[$col], 2, '.', ''), 2); break; case 'recordCounter': $row[$col] = $recordCounter; break; case 'download_invoice': $row[$col] = '<a href="uploads/tx_multishopexactonline/' . $row[$col] . '" target="_blank">' . $row[$col] . '</a>'; break; case 'currency': $summarize[$col] += $row[$col]; $row[$col] = mslib_fe::amount2Cents($row[$col], 0); break; case 'domain_name': if ($row[$col]) { $row[$col] = '<a href="http://' . $row[$col] . '" target="_blank">' . $row[$col] . '</a>'; } break; case 'datetime': if ($row[$col]) { $row[$col] = strftime("%x %X", strtotime($row[$col])); } else { $row[$col] = ''; } break; case 'timestamp': if (is_numeric($row[$col]) && $row[$col] > 0) { $row[$col] = strftime("%x %X", $row[$col]); } else { $row[$col] = ''; } break; case 'timestamp_to_day_date_time': if (is_numeric($row[$col]) && $row[$col] > 0) { $row[$col] = strftime("%a. %x<br/>%X", $row[$col]); } else { $row[$col] = ''; } break; case 'timestamp_to_date': if (is_numeric($row[$col]) && $row[$col] > 0) { $row[$col] = strftime("%x", $row[$col]); } else { $row[$col] = ''; } break; case 'form': $content = '<form method="'; switch ($valArray['formAction']) { case 'post': $content .= 'POST'; break; case 'get': default: $content .= 'GET'; break; } $content .= '" action="' . $valArray['actionUrl'] . '" enctype="multipart/form-data">'; if ($valArray['content']) { $content .= $valArray['content']; } if (is_array($valArray['hiddenFields'])) { foreach ($valArray['hiddenFields'] as $hiddenFieldKey => $hiddenFieldVal) { foreach ($row as $tmpCol => $tmpVal) { $hiddenFieldVal = str_replace('###' . $tmpCol . '###', $row[$tmpCol], $hiddenFieldVal); } $content .= '<input name="' . $hiddenFieldKey . '" type="hidden" value="' . $hiddenFieldVal . '" />'; } } $content .= '</form>'; $row[$col] = $content; break; case 'content': foreach ($row as $tmpCol => $tmpVal) { $valArray['content'] = str_replace('###' . $tmpCol . '###', $row[$tmpCol], $valArray['content']); } $row[$col] = $valArray['content']; break; case 'products_detail_page_link': $where = ''; if ($row['categories_id']) { // get all cats to generate multilevel fake url $level = 0; $cats = mslib_fe::Crumbar($row['categories_id']); $cats = array_reverse($cats); $where = ''; if (count($cats) > 0) { foreach ($cats as $cat) { $where .= "categories_id[" . $level . "]=" . $cat['id'] . "&"; $level++; } $where = substr($where, 0, strlen($where) - 1); $where .= '&'; } // get all cats to generate multilevel fake url eof } $product_detail_link = mslib_fe::typolink($this->conf['products_detail_page_pid'], '&' . $where . '&products_id=' . $row['products_id'] . '&tx_multishop_pi1[page_section]=products_detail', 1); $row[$col] = '<a href="' . $product_detail_link . '" target="_blank">' . htmlspecialchars($row['products_name']) . '</a>'; break; case 'boolean': $status_html = ''; if (!$row[$col]) { $status_html .= '<span class="admin_status_red" alt="' . $this->pi_getLL('no') . '"></span>'; } else { $status_html .= '<span class="admin_status_green" alt="' . $this->pi_getLL('yes') . '"></span>'; } $row[$col] = $status_html; break; case 'booleanToggle': $status_html = ''; if (!$row[$col]) { $status_html .= '<span class="admin_status_red" alt="' . $this->pi_getLL('disable') . '"></span>'; if ($valArray['hrefEnable']) { foreach ($row as $tmpCol => $tmpVal) { $valArray['hrefEnable'] = str_replace('###' . $tmpCol . '###', $row[$tmpCol], $valArray['hrefEnable']); } $status_html .= '<a href="' . $valArray['hrefEnable'] . '"><span class="admin_status_green disabled" alt="' . $this->pi_getLL('enabled') . '"></span></a>'; } } else { if ($valArray['hrefDisable']) { foreach ($row as $tmpCol => $tmpVal) { $valArray['hrefDisable'] = str_replace('###' . $tmpCol . '###', $row[$tmpCol], $valArray['hrefDisable']); } $status_html .= '<a href="' . $valArray['hrefDisable'] . '"><span class="admin_status_red disabled" alt="' . $this->pi_getLL('disabled') . '"></span></a>'; } $status_html .= '<span class="admin_status_green" alt="' . $this->pi_getLL('enable') . '"></span>'; } $row[$col] = $status_html; break; } $adjustedValue = $row[$col]; if ($valArray['href']) { foreach ($row as $tmpCol => $tmpVal) { $valArray['href'] = str_replace('###' . $tmpCol . '###', $row[$tmpCol], $valArray['href']); } $adjustedValue = '<a ' . ($valArray['hrefNoFollow'] ? ' rel="nofollow"' : '') . ' href="' . $valArray['href'] . '"' . ($valArray['href_target'] ? ' target="' . $valArray['href_target'] . '""' : '') . '>' . $adjustedValue . '</a>'; } if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.tx_mslib_admin_interface.php']['tableColumnsPreProc'])) { $conf = array('col' => &$col, 'row' => &$row, 'originalValue' => &$originalValue, 'adjustedValue' => &$adjustedValue, 'params' => &$params, 'valArray' => &$valArray, 'summarize' => &$summarize); foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.tx_mslib_admin_interface.php']['tableColumnsPreProc'] as $funcRef) { \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $conf, $that); } } $tdClass = array(); if ($valArray['align']) { $tdClass[] = 'text-' . $valArray['align']; } if ($valArray['nowrap']) { $tdClass[] = 'cellNoWrap'; } if ($valArray['class']) { $tdClass[] = $valArray['class']; } $tableContent .= '<td' . (count($tdClass) ? ' class="' . implode(' ', $tdClass) . '"' : '') . '>' . $adjustedValue . '</td>'; } $tableContent .= '</tr>'; if ($params['settings']['returnResultSetAsArray']) { $pageset['dataset'][$rowKey] = $row; } } $tableContent .= '</tbody>'; if (!$params['settings']['skipSummarize']) { // Summarize footer $tableContent .= '<tfoot><tr>'; if ($params['settings']['enableRowBasedCheckboxSelection']) { $tableContent .= '<th></th>'; } foreach ($params['tableColumns'] as $col => $valArray) { switch ($valArray['valueType']) { case 'currency': $row[$col] = mslib_fe::amount2Cents($summarize[$col], 0); break; case 'number_format_2_decimals': $row[$col] = round(number_format($summarize[$col], 2, ',', '.'), 2); break; default: $row[$col] = $valArray['title']; break; } $tdClass = array(); if ($valArray['align']) { $tdClass[] = 'text-' . $valArray['align']; } if ($valArray['nowrap']) { $tdClass[] = 'cellNoWrap'; } if ($valArray['class']) { $tdClass[] = $valArray['class']; } $tableContent .= '<th' . (count($tdClass) ? ' class="' . implode(' ', $tdClass) . '"' : '') . '>' . $row[$col] . '</th>'; // $tableContent.='<th'.($valArray['align'] ? ' class="text-'.$valArray['align'].'"' : '').($valArray['nowrap'] ? ' nowrap' : '').'>'.$row[$col].'</th>'; } $tableContent .= '</tr></tfoot>'; } $tableContent .= '</table>'; if ($params['settings']['enableActionSelectionForm'] && is_array($params['settings']['tableSelectionActions']) && count($params['settings']['tableSelectionActions'])) { $actions = $params['settings']['tableSelectionActions']; if (count($actions)) { // custom page hook that can be controlled by third-party plugin eof $action_selectbox .= '<select name="tx_multishop_pi1[action]" id="msAdminTableAction" class="form-control"><option value="">' . htmlspecialchars($this->pi_getLL('choose_action')) . '</option>'; foreach ($actions as $key => $value) { $action_selectbox .= '<option value="' . htmlspecialchars($key) . '">' . htmlspecialchars($value) . '</option>'; } $action_selectbox .= '</select>'; $tableContent .= $action_selectbox; } } if ($params['settings']['contentBelowTable']) { $tableContent .= $params['settings']['contentBelowTable']; } if ($params['settings']['enableActionSelectionForm'] && is_array($params['settings']['tableSelectionActions']) && count($params['settings']['tableSelectionActions'])) { $tableContent .= '<div class="form-group"> <input class="btn btn-success" type="submit" name="submit" value="' . htmlspecialchars($this->pi_getLL('submit_form')) . '" /> </div>'; } $tableContent .= ' </div> '; if (!$params['settings']['disableForm']) { $tableContent .= '</form>'; } // pagination $paginationMarkup = ''; if (!$params['settings']['skipPaginationMarkup'] and $pageset['total_rows'] > $that->ms['MODULES']['PAGESET_LIMIT']) { $total_pages = ceil($pageset['total_rows'] / $that->ms['MODULES']['PAGESET_LIMIT']); require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/admin_pages/includes/admin_pagination.php'; $paginationMarkup = $tmp; $tableContent .= $tmp; $tmp = ''; } // pagination eof } $content = ''; $content .= '<div class="panel panel-default">'; $content .= '<div class="panel-heading">'; if ($params['interfaceTitle']) { $interfaceTitle = $params['interfaceTitle']; } else { $interfaceTitle = $params['title']; } $content .= '<h3>' . htmlspecialchars($interfaceTitle) . '</h3>'; if (is_array($params['settings']['headingButtons'])) { $content .= '<div class="form-inline">'; foreach ($params['settings']['headingButtons'] as $headingButton) { $content .= '<a href="' . $headingButton['href'] . '" class="' . $headingButton['btn_class'] . '"' . ($headingButton['attributes'] ? ' ' . $headingButton['attributes'] : '') . '><i class="' . $headingButton['fa_class'] . '"></i> ' . htmlspecialchars($headingButton['title']) . '</a> '; } $content .= '</div>'; } $content .= '</div>'; $content .= '<div class="panel-body">'; if (!$params['settings']['skipTabMarkup']) { $GLOBALS['TSFE']->additionalHeaderData['msAdminTabJs'] = '<script type="text/javascript"> jQuery(document).ready(function ($) { $(\'.nav-tabs a:first\').tab(\'show\'); }); </script> '; $content .= ' <div id="tab-container"> <ul class="nav nav-tabs" id="admin_orders" role="tablist"> <li role="presentation"><a href="#CmsListing" aria-controls="profile" role="tab" data-toggle="tab">' . htmlspecialchars($params['title']) . '</a></li> </ul> <div class="tab-content"> '; } $searchForm = ''; if ($params['settings']['enableKeywordSearch']) { $searchForm = ' <form id="form1" name="form1" method="get" action="index.php"> <div class="well"> <div class="row formfield-container-wrapper"> '; foreach ($params['searchForm']['hiddenFields'] as $key => $val) { $searchForm .= '<input name="' . $key . '" type="hidden" value="' . htmlspecialchars($val) . '" />' . "\n"; } $searchForm .= ' <div class="col-sm-8 formfield-wrapper"> <div class="form-inline"> <label class="control-label">' . $that->pi_getLL('keyword') . '</label> <input type="text" name="tx_multishop_pi1[keyword]" class="form-control" value="' . htmlspecialchars($that->get['tx_multishop_pi1']['keyword']) . '" /> <input type="submit" name="Search" class="btn btn-success" value="' . $that->pi_getLL('search') . '" /> </div> </div> <div class="col-sm-4 formfield-wrapper"> <div class="pull-right form-inline"> <label class="control-label">' . $that->pi_getLL('limit_number_of_records_to') . '</label> ' . $limit_search_result_selectbox . ' </div> </div> </div> </div> </form> '; //hook to let other plugins further manipulate the method if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_mslib_admin_interface.php']['setAdminInterfaceSearchFormPostProc'])) { $interfaceKey =& $this->interfaceKey; $params_searchform = array('interfaceKey' => &$interfaceKey, 'searchForm' => &$searchForm, 'adminInterfaceParams' => &$params); foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_mslib_admin_interface.php']['setAdminInterfaceSearchFormPostProc'] as $funcRef) { \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params_searchform, $this); } } } if (!$params['settings']['skipTabMarkup']) { $content .= ' <div role="tabpanel" id="CmsListing" class="tab-pane"> ' . $searchForm . ' ' . $tableContent . ' </div> </div> </div> '; } else { $content .= $searchForm . $tableContent; } if ($params['settings']['skipRecordCount'] || $params['settings']['skipRecordCountWhenZeroResults'] && !$pageset['total_rows']) { $skipRecordCount = 1; } if ($params['settings']['skipTotalCount'] || $params['settings']['skipTotalCountWhenZeroResults'] && !$params['summarizeData']['totalRecordsInTable']) { $skipTotalCount = 1; } if (!$skipRecordCount) { $content .= '<p class="text-center">' . $this->pi_getLL('found_records') . ': <strong>' . number_format($pageset['total_rows'], 0, '', '.') . '</strong></p>'; } if (!$skipTotalCount && isset($params['summarizeData']['totalRecordsInTable'])) { $content .= '<p class="text-center">' . $this->pi_getLL('total_records_in_database') . ': <strong>' . number_format($params['summarizeData']['totalRecordsInTable'], 0, '', '.') . '</strong></p>'; } if (!$params['settings']['skipFooterMarkup']) { $content .= '<hr><div class="clearfix"><a class="btn btn-success msAdminBackToCatalog" href="' . mslib_fe::typolink() . '"><span class="fa-stack"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-arrow-left fa-stack-1x"></i></span> ' . $that->pi_getLL('admin_close_and_go_back_to_catalog') . '</a></div>'; } $content .= '</div>'; $content .= '</div>'; if ($params['settings']['returnOnlyWhenRecordsFound'] && !$pageset['total_rows']) { //return; } else { if ($params['settings']['returnResultSetAsArray']) { $array = array(); $array['searchForm'] = $searchForm; $array['paginationMarkup'] = $paginationMarkup; $array['dataset'] = $pageset['dataset']; return $array; } else { return $content; } } }
$res = $GLOBALS['TYPO3_DB']->sql_query($query3); $counter++; } } die(); */ $navItems = array(); $navItems['categories'] = $this->pi_getLL('categories'); $navItems['products'] = $this->pi_getLL('products'); $navItems['products_attributes'] = $this->pi_getLL('admin_label_products_attributes'); $navItems['manufacturers'] = $this->pi_getLL('manufacturers'); $navItems['orders'] = $this->pi_getLL('orders'); $navItems['everything'] = $this->pi_getLL('admin_label_everything'); $content .= '<div class="panel panel-default"><div class="panel-heading"><h3>' . $this->pi_getLL('admin_label_clear_database') . '</h3></div> <div class="panel-body"> <form action="' . mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=admin_system_clear_database') . '" method="post" class="form-horizontal"> <div class="form-group"> <label class="control-label col-md-2">' . $this->pi_getLL('admin_label_items_to_delete') . '</label> <div class="col-md-10"> '; foreach ($navItems as $key => $val) { $content .= '<div class="checkbox checkbox-success"><input name="tx_multishop_pi1[items][]" type="checkbox" id="' . $key . '" value="' . $key . '" /><label for="' . $key . '">' . $val . '</label></div>' . "\n"; } $content .= ' </div> </div> <hr> <div class="clearfix"> <div class="pull-right"> <button type="submit" id="submit" class="btn btn-success" value=""><i class="fa fa-save"></i> ' . $this->pi_getLL('delete') . '</button> </div>
$deliver_to_sb .= ' <select name="deliver_to_country" id="deliver_to_country" class="country" title="' . $this->pi_getLL('country_is_required') . '"> ' . $tmpcontent_con . ' </select> '; } } // country eof $subpartArray['###SHIPPING_COST_COUNTRY_SELECTION###'] = ' <div class="shoppingcart_shipping_cost_wrapper"> <div class="shipping_deliver_to"><label for="deliver_to_country">' . $this->pi_getLL('deliver_in') . '<label>' . $deliver_to_sb . '</div> <div class="shipping_deliver_by"></div> </div> '; } // custom hook that can be controlled by third-party plugin if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/front_pages/shopping_cart/default.php']['shoppingCartPagePostHook'])) { $params = array('template' => $template, 'subpartArray' => &$subpartArray, 'cart' => &$cart); foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/front_pages/shopping_cart/default.php']['shoppingCartPagePostHook'] as $funcRef) { \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this); } } // completed the template expansion by replacing the "item" marker in the template $content .= $this->cObj->substituteMarkerArrayCached($subparts['template'], array(), $subpartArray); } else { $content .= '<div class="noitems_message">' . $this->pi_getLL('there_are_no_products_in_your_cart') . '</div>'; $content .= ' <div id="bottom-navigation"><a href="' . mslib_fe::typolink($this->shop_pid) . '" class="msFrontButton continueState arrowRight arrowPosLeft proceed_to_shop"><span>' . $this->pi_getLL('go_to_catalog') . '</span></a> <div class="cart"></div> </div>'; }
<div class="pull-right"> <a href="' . mslib_fe::typolink($this->shop_pid . ',2003', '&tx_multishop_pi1[page_section]=' . $this->ms['page'] . '&edit=1&zone_id=' . $zone['id']) . '" class="btn btn-primary btn-sm"><i class="fa fa-pencil"></i> ' . $this->pi_getLL('add_countries') . '</a> <a href="' . mslib_fe::typolink($this->shop_pid . ',2003', '&tx_multishop_pi1[page_section]=' . $this->ms['page'] . '&delete=1&zone_id=' . $zone['id']) . '" class="btn btn-danger btn-sm"><i class="fa fa-save"></i> ' . $this->pi_getLL('delete_zone') . '</a> </div> </div>'; } $content .= '</div></div>'; } $content .= ' <div class="panel panel-default"> <div class="panel-heading"><h3>' . $this->pi_getLL('add_new_zone') . '</h3></div> <div class="panel-body"> <form action="' . mslib_fe::typolink($this->shop_pid . ',2003', '&tx_multishop_pi1[page_section]=' . $this->ms['page']) . '" method="post" class="form-horizontal"> <div class="form-group"> <label for="" class="control-label col-md-2">' . $this->pi_getLL('name') . '</label> <div class="col-md-10"> <div class="input-group"> <input class="form-control" type="text" name="zone_name" id="zone_name" value=""> <span class="input-group-btn"> <input name="Submit" type="submit" value="' . $this->pi_getLL('save') . '" class="btn btn-success" /> </span> </div> </div> </div> </form> </div> </div> '; $content .= '<hr><div class="clearfix"><a class="btn btn-success msAdminBackToCatalog" href="' . mslib_fe::typolink() . '"><span class="fa-stack"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-arrow-left fa-stack-1x"></i></span> ' . $this->pi_getLL('admin_close_and_go_back_to_catalog') . '</a></div></div></div>'; $content = '<div class="panel panel-default"><div class="panel-body">' . mslib_fe::shadowBox($content) . '';
$html = '<div class="main_category_box">' . "\n" . ' <h2>' . $name . '</h2>' . "\n"; $html .= $subcats_html . "\n" . ' </div>'; } } if ($html) { $cols[] = $html; } } } $content .= '<div id="menu_category_listing">'; $delimited = ceil(count($cols) / 3); if ($delimited < 1) { $delimited = 1; } $counter = 0; for ($col = 0; $col < 3; $col++) { $content .= '<div class="three_cols_wrapper">'; for ($i = 0; $i < $delimited; $i++) { if ($cols[$counter]) { $content .= $cols[$counter]; } $counter++; } $content .= '</div>'; } $content .= '</div>'; if ($current['content_footer']) { $content .= '<div class="msCategoriesFooterDescription">' . mslib_fe::htmlBox('', $current['content_footer'], 2) . '</div>'; }
$compiledWidget['content'] .= '<td align="right">' . mslib_fe::amount2Cents($total_price, 0) . '</td>'; $total_amount = $total_amount + $total_price; if (date("Y", $start_time) == date("Y")) { $total_amount_cumulative = $total_amount_cumulative + $total_price; } } if ($this->cookie['stats_year_sb'] == date("Y") || !$this->cookie['stats_year_sb']) { $month = date("m"); $currentDay = date("d"); $dayOfTheYear = date("z"); $currentYear = 1; if ($month == 1) { $currentMonth = 1; } } else { $month = 12; $dayOfTheYear = 365; $currentDay = 31; $currentYear = 0; $currentMonth = 0; } $compiledWidget['content'] .= '<td align="right" nowrap>' . mslib_fe::amount2Cents($total_amount, 0) . '</td>'; $compiledWidget['content'] .= '<td align="right" nowrap>' . mslib_fe::amount2Cents($total_amount_cumulative / $dayOfTheYear * 365, 0) . '</td>'; $compiledWidget['content'] .= '</tr>'; if (!$tr_type or $tr_type == 'even') { $tr_type = 'odd'; } else { $tr_type = 'even'; } $compiledWidget['content'] .= ' </table>';
foreach ($unused_values as $unused_value_id) { $have_povp_record = false; $have_pa_record = false; // $sql_chk = $GLOBALS['TYPO3_DB']->SELECTquery('products_options_values_id', 'tx_multishop_products_options_values_to_products_options', "products_options_values_id = '" . $unused_value_id . "'", '', '', ''); $qry_chk = $GLOBALS['TYPO3_DB']->sql_query($sql_chk); if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry_chk) > 0) { $have_povp_record = true; } // $sql_chk = $GLOBALS['TYPO3_DB']->SELECTquery('options_values_id', 'tx_multishop_products_attributes', "options_values_id = '" . $unused_value_id . "' and page_uid='" . $this->showCatalogFromPage . "'", '', '', ''); $qry_chk = $GLOBALS['TYPO3_DB']->sql_query($sql_chk); if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry_chk) > 0) { $have_pa_record = true; } if (!$have_povp_record && !$have_pa_record) { $query = $GLOBALS['TYPO3_DB']->DELETEquery('tx_multishop_products_options_values', 'products_options_values_id=' . $unused_value_id); $res = $GLOBALS['TYPO3_DB']->sql_query($query); } } // delete double record $delete_qry = "DELETE povp1 FROM tx_multishop_products_options_values_to_products_options povp1, tx_multishop_products_options_values_to_products_options povp2 WHERE povp1.products_options_values_to_products_options_id > povp2.products_options_values_to_products_options_id AND povp1.products_options_id = povp2.products_options_id AND povp1.products_options_values_id = povp2.products_options_values_id"; $GLOBALS['TYPO3_DB']->sql_query($delete_qry); // $delete_qry = "DELETE pa1 FROM tx_multishop_products_attributes pa1, tx_multishop_products_attributes pa2 WHERE pa1.products_attributes_id > pa2.products_attributes_id AND pa1.products_id = pa2.products_id AND pa1.options_id = pa2.options_id AND pa1.options_values_id = pa2.options_values_id"; $GLOBALS['TYPO3_DB']->sql_query($delete_qry); } // header('Location: ' . $this->FULL_HTTP_URL . mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=merge_attribute_options_values')); exit; }
} $return_data[$counter]['text'] = htmlentities(implode(" > ", $catsname) . ' > ' . $row['products_name']); $return_data[$counter]['id'] = $row['products_id']; $counter++; } } } else { $products = mslib_fe::getProductsPageSet($filter, 0, 100, array($prefix . 'products_name asc')); $counter = 0; foreach ($products['products'] as $product) { if ($product['products_name'] && !empty($product['products_name'])) { $catsname = array(); if ($product['categories_id']) { // get all cats to generate multilevel fake url $level = 0; $cats = mslib_fe::Crumbar($product['categories_id']); $cats = array_reverse($cats); $where = ''; if (count($cats) > 0) { foreach ($cats as $cat) { $catsname[] = $cat['name']; } } // get all cats to generate multilevel fake url eof } $return_data[$counter]['text'] = htmlspecialchars(implode(" > ", $catsname) . ' > ' . $product['products_name']); $return_data[$counter]['id'] = $product['products_id']; $counter++; } } }
$item_products_specials_price = '<div class="price_excluding_vat">' . $this->pi_getLL('excluding_vat') . ' ' . mslib_fe::amount2Cents($product['final_price']) . '</div>'; } $item_products_price = ''; if ($product['products_price'] != $product['final_price']) { if ($product['tax_rate'] and $this->ms['MODULES']['SHOW_PRICES_INCLUDING_VAT']) { $old_price = $product['products_price'] * (1 + $product['tax_rate']); } else { $old_price = $product['products_price']; } $item_products_price = '<div class="old_price">' . mslib_fe::amount2Cents($old_price) . '</div><div class="final_price">' . mslib_fe::amount2Cents($final_price) . '</div>'; } else { $item_products_price = '<div class="final_price">' . mslib_fe::amount2Cents($final_price) . '</div>'; } $admin_menu = ''; if ($this->ADMIN_USER) { $admin_menu = '<div class="admin_menu"><a href="' . mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=edit_product&pid=' . $product['products_id'] . '&action=edit_product', 1) . '" class="admin_menu_edit"><i class="fa fa-pencil"></i></a><a href="' . mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=delete_product&pid=' . $product['products_id'] . '&action=delete_product', 1) . '" class="admin_menu_remove" title="Remove"><i class="fa fa-trash-o"></i></a></div>'; } if (!strstr($product['products_url'], 'http://') and !strstr($product['products_url'], 'http://')) { $product['products_url'] = 'http://' . $product['products_url']; } } $markerArray = array(); $markerArray['ITEM_PRODUCTS_ID'] = $product['products_id']; $markerArray['ITEM_PRODUCT_DETAILS_PAGE_LINK'] = $link; $markerArray['ITEM_PRODUCTS_NAME'] = htmlspecialchars($product['products_name']); $markerArray['ITEM_PRODUCTS_IMAGE'] = $image; $markerArray['ITEM_PRODUCTS_SPECIAL_PRICE'] = $item_products_specials_price; $markerArray['ITEM_PRODUCTS_PRICE'] = $item_products_price; $markerArray['ADMIN_MENU'] = $admin_menu; $markerArray['ADMIN_ICONS'] = $admin_menu; $markerArray['ITEM_PRODUCT_DETAILS_PAGE_LINK_TITLE'] = htmlspecialchars($this->pi_getLL('view')) . ' ' . htmlspecialchars($product['products_name']);
jQuery("#flat_weight' . $valId . '").change(function(){ jQuery.ajax({ type: "POST", url: url_relatives, data: {zone:"' . count($zones) . '",based:jQuery(this).val(),shippingid:"' . $valId . '",basedold:jQuery("#based_old' . $valId . '").val()}, success: function(data) { jQuery("#has' . $valId . '").html(data); } }); }); '; } $content .= ' $(document).on("keyup", ".msProductsPriceExcludingVat", function(e) { if (e.keyCode!=9) { priceEditRealtimeCalc(true, this); } }); $(document).on("keyup", ".msProductsPriceIncludingVat", function(e) { if (e.keyCode!=9) { priceEditRealtimeCalc(false, this); } }); }); </script>'; } else { $content .= $this->pi_getLL('admin_label_currently_no_shipping_method_defined'); } $content .= '<hr><div class="clearfix"><a class="btn btn-success msAdminBackToCatalog" href="' . mslib_fe::typolink() . '"><span class="fa-stack"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-arrow-left fa-stack-1x"></i></span> ' . $this->pi_getLL('admin_close_and_go_back_to_catalog') . '</a></div></div></div>'; $content = '' . mslib_fe::shadowBox($content) . '';
} else { $content = '<div class="main-title"><h1>' . $this->pi_getLL('the_requested_manufacturer_does_not_exist') . '</h1></div>'; } if ($page[0]['content']) { $content .= $page[0]['content']; } } if ($this->ROOTADMIN_USER or $this->ADMIN_USER and $this->CATALOGADMIN_USER) { $content .= ' <script type="text/javascript"> jQuery(document).ready(function($) { jQuery("#manufacturers_sortable_' . $output['manufacturers_uid'] . '").sortable({ cursor: "move", //axis: "y", update: function(e, ui) { href = "' . mslib_fe::typolink($this->shop_pid . ',2002', '&tx_multishop_pi1[page_section]=manufacturers') . '"; jQuery(this).sortable("refresh"); sorted = jQuery(this).sortable("serialize", "id"); jQuery.ajax({ type: "POST", url: href, data: sorted, success: function(msg) { //do something with the sorted data } }); } }); }); </script> ';
$data['available_shippingcost_method_box'][$sids] = mslib_fe::currency() . ' +' . mslib_fe::amount2Cents($priceArray['shipping_costs_method_box_including_vat'], 0, 0); } else { if ($priceArray['shipping_costs_including_vat'] < 0) { $data['available_shippingcost'][$sids] = mslib_fe::currency() . ' -' . mslib_fe::amount2Cents($priceArray['shipping_costs_including_vat'], 0, 0); $data['available_shippingcost_method_box'][$sids] = mslib_fe::currency() . ' -' . mslib_fe::amount2Cents($priceArray['shipping_costs_method_box_including_vat'], 0, 0); } } } else { $data['available_shippingcost'][$sids] = ''; if ($priceArray['shipping_costs'] > 0 || $this->ms['MODULES']['ALWAYS_DISPLAY_SHIPPING_COSTS'] > 0) { $data['available_shippingcost'][$sids] = mslib_fe::currency() . ' +' . mslib_fe::amount2Cents($priceArray['shipping_costs'], 0, 0); $data['available_shippingcost_method_box'][$sids] = mslib_fe::currency() . ' +' . mslib_fe::amount2Cents($priceArray['shipping_costs_method_box'], 0, 0); } else { if ($priceArray['shipping_costs'] < 0) { $data['available_shippingcost'][$sids] = mslib_fe::currency() . ' -' . mslib_fe::amount2Cents($priceArray['shipping_costs'], 0, 0); $data['available_shippingcost_method_box'][$sids] = mslib_fe::currency() . ' -' . mslib_fe::amount2Cents($priceArray['shipping_costs_method_box'], 0, 0); } } } } // we display the shipping costs and payment costs including vat if ($this->ms['MODULES']['PRODUCT_EDIT_METHOD_FILTER'] && !$this->post['tx_multishop_pi1']['sid']) { if (count($available_sid) == 1) { $this->post['tx_multishop_pi1']['sid'] = $available_sid[0]; } else { // set to unreachable number for shipping method id so the session for shipping method are cleared $this->post['tx_multishop_pi1']['sid'] = 999999; } } $data['shipping_preselected_id'] = $this->post['tx_multishop_pi1']['sid']; $this->post['caller_segment'] = 'getHtmlCartContents';
$excelHeaderCols['product_final_price_excl_tax' . $i] = 'product_final_price_excl_tax' . $i; $excelHeaderCols['product_final_price_incl_tax' . $i] = 'product_final_price_incl_tax' . $i; $excelHeaderCols['product_price_total_excl_tax' . $i] = 'product_final_price_total_excl_tax' . $i; $excelHeaderCols['product_price_total_incl_tax' . $i] = 'product_final_price_total_incl_tax' . $i; $excelHeaderCols['product_tax_rate' . $i] = 'product_tax_rate' . $i; } } } if ($this->get['format'] == 'excel') { $excelRows[] = $excelHeaderCols; } else { $excelRows[] = implode($post_data['delimeter_type'], $excelHeaderCols); } foreach ($records as $row) { $order_tax_data = unserialize($row['orders_tax_data']); $order_tmp = mslib_fe::getOrder($row['orders_id']); $excelCols = array(); $total = count($fields); $count = 0; foreach ($fields as $counter => $field) { $count++; $tmpcontent = ''; switch ($field) { case 'orders_id': $excelCols[] = $row['orders_id']; break; case 'customer_id': $excelCols[] = $row['customer_id']; break; case 'orders_status': $excelCols[] = $row['orders_status'];
$markerArray['ORDERS_ID'] = $order['orders_id']; $markerArray['USER_AGENT'] = $order['user_agent']; // custom page hook that can be controlled by third-party plugin eof $orderItem .= $this->cObj->substituteMarkerArray($subparts['useragents_listing'], $markerArray, '###|###'); } $actions = array(); $formFields = array(); $query_string = mslib_fe::tep_get_all_get_params(array('tx_multishop_pi1[action]', 'tx_multishop_pi1[order_by]', 'tx_multishop_pi1[order]', 'p', 'Submit', 'weergave', 'clearcache')); $subpartArray = array(); $subpartArray['###LABEL_HEADER_ORDERS_ID###'] = $this->pi_getLL('orders_id'); $subpartArray['###LABEL_FOOTER_ORDERS_ID###'] = $this->pi_getLL('orders_id'); $subpartArray['###LABEL_HEADER_CUSTOMER###'] = $this->pi_getLL('customer'); $subpartArray['###LABEL_FOOTER_CUSTOMER###'] = $this->pi_getLL('customer'); $subpartArray['###LABEL_HEADER_IP_ADDRESS###'] = $this->pi_getLL('ip_address'); $subpartArray['###LABEL_FOOTER_IP_ADDRESS###'] = $this->pi_getLL('ip_address'); $subpartArray['###LABEL_HEADER_USER_AGENT###'] = $this->pi_getLL('user_agent', 'user agents'); $subpartArray['###LABEL_FOOTER_USER_AGENT###'] = $this->pi_getLL('user_agent', 'user agents'); $subpartArray['###ADMIN_LABEL_LINK_DOWNLOAD_AS_EXCEL###'] = $this->pi_getLL('admin_label_link_download_as_excel'); // pagination $this->ms['MODULES']['PAGESET_LIMIT'] = $this->ms['MODULES']['ORDERS_LISTING_LIMIT']; if (!$this->ms['nopagenav'] and $pageset['total_rows'] > $this->ms['MODULES']['PAGESET_LIMIT']) { $tmp = ''; require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/admin_pages/includes/admin_pagination.php'; $pagination_listing = $tmp; } // pagination eof $subpartArray['###DOWNLOAD_EXCEL###'] = mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=admin_useragent_export'); $subpartArray['###PAGINATION###'] = $pagination_listing; $subpartArray['###ORDERS_LISTING###'] = $orderItem; // custom page hook that can be controlled by third-party plugin eof $order_results = $this->cObj->substituteMarkerArrayCached($subparts['useragents_results'], array(), $subpartArray);
function compareDatabaseRebuildProductsToCategoryTree($pid, $deepest_cat_id, $dataArray = array()) { if (!is_numeric($pid)) { return false; } if (!is_numeric($deepest_cat_id)) { return false; } $level = 1; $cats = mslib_fe::globalCrumbarTree($deepest_cat_id); $cats = array_reverse($cats); // $crumbar_ident_string = ''; $crumbar_ident_array = array(); foreach ($cats as $item) { $crumbar_ident_array[] = $item['id']; } $crumbar_ident_string = implode(',', $crumbar_ident_array); $count_cats = count($cats); /*if ($count_cats>1) { // remove the deepest cat id record // disabled by bas //unset($cats[$count_cats-1]); //recount //$count_cats=count($cats); }*/ if ($count_cats > 0) { foreach ($cats as $item) { if ($item['id']) { $rec = tx_mslib_catalog::isProductToCategoryLinkingExist($pid, $item['id'], $crumbar_ident_string); if (!$rec) { $insertArray = array(); if (!is_array($dataArray) || is_array($dataArray) && !count($dataArray)) { $insertArray['categories_id'] = $deepest_cat_id; $insertArray['products_id'] = $pid; $insertArray['page_uid'] = $item['page_uid']; $insertArray['sort_order'] = time(); $insertArray['related_to'] = 0; } else { foreach ($dataArray as $idx => $val) { $insertArray[$idx] = $val; } } $insertArray['node_id'] = $item['id']; if ($item['id'] == $deepest_cat_id) { $insertArray['is_deepest'] = 1; } else { $insertArray['is_deepest'] = 0; } $insertArray['crumbar_identifier'] = $crumbar_ident_string; $query = $GLOBALS['TYPO3_DB']->INSERTquery('tx_multishop_products_to_categories', $insertArray); $res = $GLOBALS['TYPO3_DB']->sql_query($query); } else { $updateArray = array(); if (!empty($rec['crumbar_identifier'])) { $tmp_cid = explode(',', $rec['crumbar_identifier']); $last_index = count($tmp_cid) - 1; if ($tmp_cid[$last_index] == $deepest_cat_id) { if ($item['id'] == $deepest_cat_id) { $updateArray['is_deepest'] = 1; } else { $updateArray['is_deepest'] = 0; } $updateArray['crumbar_identifier'] = $crumbar_ident_string; $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_products_to_categories', 'products_to_categories_id=\'' . $rec['products_to_categories_id'] . '\'', $updateArray); $res = $GLOBALS['TYPO3_DB']->sql_query($query); } } else { if ($item['id'] == $deepest_cat_id) { $updateArray['is_deepest'] = 1; } else { $updateArray['is_deepest'] = 0; } $updateArray['crumbar_identifier'] = $crumbar_ident_string; $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_products_to_categories', 'products_to_categories_id=\'' . $rec['products_to_categories_id'] . '\'', $updateArray); $res = $GLOBALS['TYPO3_DB']->sql_query($query); } } $level++; /*if ($pid==508) { echo "<pre>"; var_dump($query); echo "<br/>"; }*/ } } //return true; } }
if (!count($plugins_extra_tab['tabs_header']) && !count($plugins_extra_tab['tabs_content'])) { $subpartArray['###LABEL_EXTRA_PLUGIN_TABS###'] = ''; $subpartArray['###CONTENT_EXTRA_PLUGIN_TABS###'] = ''; } else { $subpartArray['###LABEL_EXTRA_PLUGIN_TABS###'] = implode("\n", $plugins_extra_tab['tabs_header']); $subpartArray['###CONTENT_EXTRA_PLUGIN_TABS###'] = implode("\n", $plugins_extra_tab['tabs_content']); } $subpartArray['###ADMIN_LABEL_JS_PLEASE_SELECT_CATEGORY_FOR_THIS_PRODUCT###'] = $this->pi_getLL('admin_label_js_please_select_category_for_this_product'); $subpartArray['###ADMIN_LABEL_JS_PRODUCT_NAME_IS_EMPTY###'] = addslashes(htmlspecialchars($this->pi_getLL('admin_label_js_product_name_is_empty'))); $subpartArray['###ADMIN_LABEL_JS_DEFINE_PRODUCT_NAME_FIRST_IN_DETAILS_TABS###'] = addslashes(htmlspecialchars($this->pi_getLL('admin_label_js_define_product_name_first_in_details_tabs'))); $subpartArray['###ADMIN_LABEL_PRODUCT_NOT_LOADED_SORRY_WE_CANT_FIND_IT###'] = $this->pi_getLL('admin_label_product_not_loaded_sorry_we_cant_find_it'); if (!$this->ms['MODULES']['DISPLAY_MANUFACTURERS_ADVICE_PRICE_INPUT']) { $subpartArray['###MANUFACTURERS_ADVICE_PRICE###'] = ''; } else { $manufacturers_advice_price_tax = mslib_fe::taxDecimalCrop($product['manufacturers_advice_price'] * $product_tax_rate / 100); $manufacturers_advice_price_excl_vat_display = mslib_fe::taxDecimalCrop($product['manufacturers_advice_price'], 2, false); $manufacturers_advice_price_incl_vat_display = mslib_fe::taxDecimalCrop($product['manufacturers_advice_price'] + $manufacturers_advice_price_tax, 2, false); $subpartArray['###LABEL_MANUFACTURERS_ADVIES_PRICE###'] = $this->pi_getLL('admin_label_manufacturers_advice_price'); $subpartArray['###LABEL_EXCLUDING_VAT3###'] = $this->pi_getLL('excluding_vat'); $subpartArray['###LABEL_INCLUDING_VAT3###'] = $this->pi_getLL('including_vat'); $subpartArray['###LABEL_CURRENCY6###'] = mslib_fe::currency(); $subpartArray['###LABEL_CURRENCY7###'] = mslib_fe::currency(); $subpartArray['###VALUE_EXCL_VAT_MANUFACTURERS_ADVICE_PRICE###'] = $manufacturers_advice_price_excl_vat_display; $subpartArray['###VALUE_INCL_VAT_MANUFACTURERS_ADVICE_PRICE###'] = $manufacturers_advice_price_incl_vat_display; $subpartArray['###VALUE_ORIGINAL_MANUFACTURERS_ADVICE_PRICE###'] = $product['manufacturers_advice_price']; } $content .= $this->cObj->substituteMarkerArrayCached($subparts['template'], array(), $subpartArray); } else { $content .= $this->pi_getLL('admin_label_product_not_loaded_sorry_we_cant_find_it'); } }
public function customerAddressFormat($address_data, $address_type = 'billing', $address_format = 'default') { $address_format_setting = $this->ms['MODULES']['ADDRESS_FORMAT']; //hook to let other plugins further manipulate the settings if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_befe.php']['customerAddressFormatSetting'])) { $params = array('address_format_setting' => &$address_format_setting, 'address_data' => &$address_data, 'address_type' => &$address_type, 'address_format' => &$address_format); foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_befe.php']['customerAddressFormatSetting'] as $funcRef) { \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this); } } $array1 = array(); $array2 = array(); $array1[] = '###STREET_NAME###'; $array2[] = $address_data['street_name']; if (!empty($address_data['building'])) { $array1[] = '###BUILDING###'; $array2[] = $address_data['building']; } else { if (strpos($address_format_setting, '###BUILDING###<br/>') !== false) { $array1[] = '###BUILDING###<br/>'; $array2[] = ''; } else { $array1[] = '###BUILDING###'; $array2[] = ''; } } if (strpos($address_format_setting, '###BUILDING###') === false && $address_data['building']) { $array1[] = '###ADDRESS###'; $array2[] = $address_data['building'] . '<br/>' . $address_data['address']; } else { $array1[] = '###ADDRESS###'; $array2[] = $address_data['address']; } $array1[] = '###ZIP###'; $array2[] = $address_data['zip']; $array1[] = '###CITY###'; $array2[] = $address_data['city']; $array1[] = '###COUNTRY###'; $array2[] = mslib_fe::getTranslatedCountryNameByEnglishName($this->lang, $address_data['country']); $array1[] = '###STATE###'; $array2[] = $address_data['state']; $array1[] = '###FULL_NAME###'; $array2[] = $address_data['name']; $array1[] = '###FIRST_NAME###'; $array2[] = $address_data['first_name']; $array1[] = '###LAST_NAME###'; $array2[] = $address_data['last_name']; $array1[] = '###EMAIL###'; $array2[] = $address_data['email']; $array1[] = '###TELEPHONE###'; $array2[] = $address_data['telephone']; $array1[] = '###FAX###'; $array2[] = $address_data['fax']; $array1[] = '###VAT_ID###'; $array2[] = $address_data['vat_id']; $array1[] = '###COC_ID###'; $array2[] = $address_data['coc_id']; $address_format_value = ''; if ($address_format_setting) { $address_format_value = str_replace($array1, $array2, $address_format_setting); } return $address_format_value; }
<form action="' . mslib_fe::typolink($this->shop_pid . ',2003', '&tx_multishop_pi1[page_section]=admin_customer_import&upload=task') . '" method="post" enctype="multipart/form-data" name="upload_task" id="upload_task" class="form-horizontal blockSubmitForm"> <div class="form-group"> <label for="new_cron_name" class="control-label col-md-2">' . $this->pi_getLL('name') . '</label> <div class="col-md-10"> <input name="new_cron_name" type="text" value="" class="form-control" > </div> </div> <div class="form-group"> <label for="new_prefix_source_name" class="control-label col-md-2">' . $this->pi_getLL('source_name') . '</label> <div class="col-md-10"> <input name="new_prefix_source_name" type="text" value="" class="form-control" /> </div> </div> <div class="form-group"> <label for="upload_task_file" class="control-label col-md-2">' . $this->pi_getLL('file') . '</label> <div class="col-md-10"> <input type="file" name="task_file" class="form-control"> </div> </div> <div class="form-group"> <div class="col-md-10 col-md-offset-2"> <input type="submit" name="upload_task_file" class="submit btn btn-success" id="upload_task_file" value="upload"> </div> </form> </div> </div></div>'; } } $content .= '<hr><div class="clearfix"><a class="btn btn-success msAdminBackToCatalog" href="' . mslib_fe::typolink() . '"><span class="fa-stack"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-arrow-left fa-stack-1x"></i></span> ' . $this->pi_getLL('admin_close_and_go_back_to_catalog') . '</a></div></div>'; $content = '<div class="panel panel-default">' . mslib_fe::shadowBox($content) . '</div>';
$headingButton['btn_class'] = 'btn btn-primary'; $headingButton['fa_class'] = 'fa fa-plus-circle'; $headingButton['title'] = $this->pi_getLL('admin_create_new_products_here'); $headingButton['href'] = mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=add_product&action=add_product'); $headerButtons[] = $headingButton; // Create category button $headingButton['btn_class'] = 'btn btn-primary'; $headingButton['fa_class'] = 'fa fa-plus-circle'; $headingButton['title'] = $this->pi_getLL('admin_add_new_category_to_the_catalog'); $headingButton['href'] = mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=add_category&action=add_category'); $headerButtons[] = $headingButton; // Create multiple categories button $headingButton = array(); $headingButton['btn_class'] = 'btn btn-primary'; $headingButton['fa_class'] = 'fa fa-plus-circle'; $headingButton['title'] = $this->pi_getLL('admin_add_new_multiple_category_to_the_catalog', 'Add new categories simultaneous'); $headingButton['href'] = mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=add_multiple_category&action=add_multiple_category'); $headerButtons[] = $headingButton; // Set header buttons through interface class so other plugins can adjust it $objRef->setHeaderButtons($headerButtons); // Get header buttons through interface class so we can render them $interfaceHeaderButtons = $objRef->renderHeaderButtons(); // Get header buttons through interface class so we can render them $subpartArray['###INTERFACE_HEADER_BUTTONS###'] = $objRef->renderHeaderButtons(); $content .= $this->cObj->substituteMarkerArrayCached($subparts['template'], array(), $subpartArray); $content = $prepending_content . '<div class="fullwidth_div">' . mslib_fe::shadowBox($content) . '</div>'; $GLOBALS['TSFE']->additionalHeaderData[] = '<script type="text/javascript" data-ignore="1"> var product_tax_rate_js=[]; ' . implode("\n", $product_tax_rate_js) . ' </script> ';