本文整理汇总了PHP中mslib_fe::Crumbar方法的典型用法代码示例。如果您正苦于以下问题:PHP mslib_fe::Crumbar方法的具体用法?PHP mslib_fe::Crumbar怎么用?PHP mslib_fe::Crumbar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mslib_fe
的用法示例。
在下文中一共展示了mslib_fe::Crumbar方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
die('Access denied.');
}
if (!$this->imageWidth) {
$this->imageWidth = '100';
}
if ($show_default_header) {
$content .= '<div class="main-heading"><h2>' . trim($current['categories_name']) . '</h2></div>';
}
$content .= '<ul class="product_listing">';
$counter = 0;
foreach ($products as $current_product) {
$where = '';
if ($current_product['categories_id']) {
// get all cats to generate multilevel fake url
$level = 0;
$cats = mslib_fe::Crumbar($current_product['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
}
$link = mslib_fe::typolink($this->conf['products_detail_page_pid'], '&' . $where . '&products_id=' . $current_product['products_id'] . '&tx_multishop_pi1[page_section]=products_detail');
$catlink = mslib_fe::typolink($this->conf['products_listing_page_pid'], '&' . $where . '&tx_multishop_pi1[page_section]=products_listing');
$counter++;
示例2: htmlentities
}
$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++;
}
}
}
示例3: substr
$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=' . $rs['products_id'] . '&tx_multishop_pi1[page_section]=products_detail');
// view product link eof
$tmp_product_categories = mslib_fe::getProductToCategories($rs['products_id'], $rs['categories_id']);
$product_categories = explode(',', $tmp_product_categories);
$cat_crumbar = '';
foreach ($product_categories as $product_category) {
$cat_crumbar .= '<ul class="msAdminCategoriesCrum list-inline">';
$cats = mslib_fe::Crumbar($product_category);
$teller = 0;
$total = count($cats);
for ($i = $total - 1; $i >= 0; $i--) {
$teller++;
// get all cats to generate multilevel fake url eof
if ($total == $teller) {
$class = 'lastItem';
} else {
$class = '';
}
$cat_crumbar .= '<li class="' . $class . '"><a href="' . mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=edit_category&cid=' . $cats[$i]['id'] . '&action=edit_category') . '">' . $cats[$i]['name'] . '</a></li>';
}
$cat_crumbar .= '</ul>';
}
$status = '';
示例4: array
$cols = array();
if ($current['content']) {
$content .= mslib_fe::htmlBox($current['categories_name'], $current['content'], 1);
} else {
$content .= '<div class="main-heading"><h1>' . $current['categories_name'] . '</h1></div>';
}
$counter = 0;
foreach ($categories as $category) {
$html = '';
if ($category['categories_name']) {
$counter++;
if (mslib_fe::hasProducts($category['categories_id'])) {
// get all cats to generate multilevel fake url
$level = 0;
$cats = mslib_fe::Crumbar($category['categories_id']);
$cats = array_reverse($cats);
$where = '';
if (count($cats) > 0) {
foreach ($cats as $item) {
$where .= "categories_id[" . $level . "]=" . $item['id'] . "&";
$level++;
}
$where = substr($where, 0, strlen($where) - 1);
$where .= '&';
}
$where .= 'categories_id[' . $level . ']=' . $category['categories_id'];
// get all cats to generate multilevel fake url eof
if ($category['categories_external_url']) {
$link = $category['categories_external_url'];
} else {
示例5: renderInterface
//.........这里部分代码省略.........
$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']);
}
示例6: convertProductToFlat
//.........这里部分代码省略.........
break;
}
if ($tel == $total) {
if ($flat_product['final_price'] > $cols[1]) {
$flat_product['price_filter'] = $cols[1];
}
}
}
}
// now we are going to define the price filter start value, so we can search very fast on it eof
$flat_product['products_multiplication'] = $row['products_multiplication'];
$flat_product['minimum_quantity'] = $row['minimum_quantity'];
$flat_product['maximum_quantity'] = $row['maximum_quantity'];
$flat_product['products_date_available'] = $row['products_date_available'];
$flat_product['products_last_modified'] = $row['products_last_modified'];
$flat_product['tax_id'] = $row['tax_id'];
$flat_product['categories_id'] = $row['categories_id'];
$flat_product['categories_name'] = $row['categories_name'];
$flat_product['manufacturers_id'] = $row['manufacturers_id'];
$flat_product['manufacturers_name'] = $row['manufacturers_name'];
$flat_product['products_negative_keywords'] = $row['products_negative_keywords'];
$flat_product['products_meta_title'] = $row['products_meta_title'];
$flat_product['products_meta_description'] = $row['products_meta_description'];
$flat_product['products_meta_keywords'] = $row['products_meta_keywords'];
$flat_product['products_url'] = $row['products_url'];
$flat_product['vendor_code'] = $row['vendor_code'];
$flat_product['sku_code'] = $row['sku_code'];
$flat_product['ean_code'] = $row['ean_code'];
$flat_product['language_id'] = $row['language_id'];
if ($flat_product['categories_id']) {
// get all cats to generate multilevel fake url
$level = 0;
if ($row['page_uid']) {
$cats = mslib_fe::Crumbar($flat_product['categories_id'], '', array(), $row['page_uid']);
} else {
$cats = mslib_fe::Crumbar($flat_product['categories_id']);
}
if (is_array($cats) && count($cats)) {
$cats = array_reverse($cats);
$where = '';
if (count($cats) > 0) {
$i = 0;
foreach ($cats as $cat) {
$flat_product['categories_id_' . $i] = $cat['id'];
$flat_product['categories_name_' . $i] = $cat['name'];
$i++;
}
}
// get all cats to generate multilevel fake url eof
}
}
for ($x = 0; $x < $this->ms['MODULES']['NUMBER_OF_PRODUCT_IMAGES']; $x++) {
$i = $x;
if ($i == 0) {
$i = '';
}
$flat_product['products_image' . $i] = $row['products_image' . $i];
}
if ($flat_product['products_image']) {
$flat_product['contains_image'] = 1;
} else {
$flat_product['contains_image'] = 0;
}
$flat_product['products_date_added'] = $row['products_date_added'];
$flat_product['products_weight'] = $row['products_weight'];
$flat_product['sort_order'] = $row['p2c_sort_order'];
示例7: subMenuArray
function subMenuArray($dataArray)
{
if (count($dataArray['subs'])) {
$tel = 0;
foreach ($dataArray['subs'] as $item) {
$menuArr[$tel]['title'] = $item['categories_name'];
$menuArr[$tel]['uid'] = '9999' . $item['categories_id'];
$menuArr[$tel]['description'] = $item['meta_description'];
$menuArr[$tel]['keywords'] = $item['meta_keywords'];
$menuArr[$tel]['image'] = '';
if ($item['categories_image']) {
$menuArr[$tel]['image'] = '<img src="uploads/tx_multishop/images/categories/normal' . mslib_befe::getImagePath($item['categories_image'], 'categories', 'normal') . '" alt="' . htmlspecialchars($item['categories_name']) . '">';
}
// get all cats to generate multilevel fake url
$level = 0;
$cats = mslib_fe::Crumbar($item['categories_id']);
$cats = array_reverse($cats);
$where = '';
if (count($cats) > 0) {
foreach ($cats as $tmp) {
$where .= "categories_id[" . $level . "]=" . $tmp['id'] . "&";
$level++;
}
$where = substr($where, 0, strlen($where) - 1);
}
$link = mslib_fe::typolink($this->conf['shop_pid'], $where . '&tx_multishop_pi1[page_section]=products_listing');
$menuArr[$tel]['_OVERRIDE_HREF'] = $link;
$sub_content = $this->subMenuArray($item);
if ($sub_content) {
$menuArr[$tel]['_SUB_MENU'] = $sub_content;
}
$tel++;
}
}
return $menuArr;
}
示例8: header
$mslib_cart->init($this);
$mslib_cart->updateCart();
$link = mslib_fe::typolink($this->shoppingcart_page_pid, '&tx_multishop_pi1[page_section]=shopping_cart', 1);
if ($link) {
header("Location: " . $this->FULL_HTTP_URL . $link);
exit;
}
}
}
if ($this->get['categories_id']) {
$categories_id = $this->get['categories_id'];
} elseif ($product['categories_id']) {
$categories_id = $product['categories_id'];
}
if ($categories_id) {
$GLOBALS["TYPO3_CONF_VARS"]['tx_multishop_data']['user_crumbar'] = mslib_fe::Crumbar($categories_id);
}
}
// application top things that are only runned the first time when the plugin is initiated eof
$meta_tags = array();
if ($this->ADMIN_USER) {
/*
// bind shortkeys
$meta_tags['1_jquery'].='
<script type="text/javascript">
jQuery(document).ready(function($) {
';
if ($this->get['products_id']) {
$meta_tags['1_jquery'].='msAdminShortcutFunc(\'product\');'."\n";
} elseif ($this->get['categories_id']) {
$meta_tags['1_jquery'].='msAdminShortcutFunc(\'category\');'."\n";
示例9: isItemInFeedsStockExcludeList
function isItemInFeedsStockExcludeList($feed_id, $exclude_id, $exclude_type = 'products')
{
if ($exclude_type == 'categories') {
$cats = mslib_fe::Crumbar($exclude_id);
$cats = array_reverse($cats);
if (count($cats) > 0) {
$negate_value = false;
foreach ($cats as $cat) {
$sql_check = "select id, negate from tx_multishop_catalog_to_feeds_stocks where feed_id='" . addslashes($feed_id) . "' and exclude_id='" . addslashes($cat['id']) . "' and negate=1 and exclude_type='categories'";
$qry_check = $GLOBALS['TYPO3_DB']->sql_query($sql_check);
if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry_check)) {
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry_check);
if ($row['negate']) {
$negate_value = true;
} else {
$negate_value = false;
}
}
}
return $negate_value;
}
} else {
if ($exclude_type == 'products') {
$negate_value = false;
$sql_check = "select id, negate from tx_multishop_catalog_to_feeds_stocks where feed_id='" . addslashes($feed_id) . "' and exclude_id='" . addslashes($exclude_id) . "' and negate=1 and exclude_type='products'";
$qry_check = $GLOBALS['TYPO3_DB']->sql_query($sql_check);
if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry_check)) {
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry_check);
if ($row['negate']) {
$negate_value = true;
} else {
$negate_value = false;
}
}
return $negate_value;
}
}
return false;
}
示例10: implode
$query = $GLOBALS['TYPO3_DB']->SELECTquery('B.categories_id,C.categories_name', 'tx_multishop_products p, tx_multishop_products_description A INNER JOIN tx_multishop_products_to_categories B ON A.products_id = B.products_id INNER JOIN tx_multishop_categories_description C ON B.categories_id = C.categories_id', implode(" AND ", $filter), 'C.categories_id', 'C.categories_name ASC', '');
// error_log($query);
// error_log($query);
$pid_regs = array();
$res = $GLOBALS['TYPO3_DB']->sql_query($query);
if ($GLOBALS['TYPO3_DB']->sql_num_rows($res) > 0) {
while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) != false) {
if ($row['categories_name']) {
$productFilter = $filter;
$productFilter[] = '(B.categories_id = ' . $row['categories_id'] . ' and B.is_deepest=1 and A.products_id <> ' . $this->post['pid'] . ')';
$query2 = $GLOBALS['TYPO3_DB']->SELECTquery('A.products_id, A.products_name, B.categories_id,C.categories_name', 'tx_multishop_products p, tx_multishop_products_description A INNER JOIN tx_multishop_products_to_categories B ON A.products_id = B.products_id INNER JOIN tx_multishop_categories_description C ON B.categories_id = C.categories_id', implode(" AND ", $productFilter), 'p.products_id', 'A.products_name ASC', '');
//error_log($query2);
$res2 = $GLOBALS['TYPO3_DB']->sql_query($query2);
$cheking_check = 0;
if ($GLOBALS['TYPO3_DB']->sql_num_rows($res2) > 0) {
$crum = mslib_fe::Crumbar($row['categories_id']);
$crum = array_reverse($crum);
$cats = array();
foreach ($crum as $item) {
$cats[] = $item['name'];
}
$json_data['related_product'][$row['categories_id']]['categories_name'] = implode(" / ", $cats);
$json_data['related_product'][$row['categories_id']]['products'] = array();
$product_counter = 0;
while (($row2 = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res2)) != false) {
if (!in_array($row2['products_id'], $pid_regs)) {
$json_data['related_product'][$row['categories_id']]['products'][$product_counter]['id'] = $row2['products_id'];
$json_data['related_product'][$row['categories_id']]['products'][$product_counter]['name'] = $row2['products_name'];
if ($row2['products_model']) {
$json_data['related_product'][$row['categories_id']]['products'][$product_counter]['name'] .= ' - ' . $row2['products_model'];
}
示例11: array
$rs_sp = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry_sp);
if ($rs_sp['specials_new_products_price'] == 0 || empty($rs_sp['specials_new_products_price'])) {
$rs_sp['specials_new_products_price'] = 0;
}
$GLOBALS['TYPO3_DB']->sql_free_result($qry_sp);
$catpath_buffer = array();
$sql2 = "select categories_id from tx_multishop_products_to_categories where products_id = " . $rs[0];
$qry2 = $GLOBALS['TYPO3_DB']->sql_query($sql2);
$multicats = array();
while ($row2 = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry2)) {
$multicats[] = $row2['categories_id'];
}
$multicats = array_unique($multicats);
foreach ($multicats as $multicat) {
$tmp_path = '';
$cats = mslib_fe::Crumbar($multicat);
$cats = array_reverse($cats);
$total_cats = count($cats);
$pctr = 1;
foreach ($cats as $path) {
$tmp_path .= $path['name'];
if ($pctr < $total_cats) {
$tmp_path .= '||';
}
$pctr++;
}
$catpath_buffer[] = $tmp_path;
}
if (count($catpath_buffer) > 1) {
$rs[3] = implode(';', $catpath_buffer);
} else {
示例12: array
$qry = $GLOBALS['TYPO3_DB']->sql_query($str);
break;
}
}
}
$products = array();
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry)) {
$products[] = $row;
}
$content .= '<ul id="menu_product_listing_' . $category['categories_id'] . '">';
$counter = 0;
foreach ($products as $item) {
if ($item['categories_id']) {
// get all cats to generate multilevel fake url
$level = 0;
$cats = mslib_fe::Crumbar($item['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
}
$link = mslib_fe::typolink($this->conf['products_detail_page_pid'], '&' . $where . '&products_id=' . $item['products_id'] . '&tx_multishop_pi1[page_section]=products_detail');
$catlink = mslib_fe::typolink($this->conf['products_listing_page_pid'], '&' . $where . '&tx_multishop_pi1[page_section]=products_listing');
$counter++;
示例13: while
$products_options_name = $GLOBALS['TYPO3_DB']->sql_query($opt_sql);
while ($products_options_name_values = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($products_options_name)) {
$selected = 0;
$products_options = $GLOBALS['TYPO3_DB']->sql_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from tx_multishop_products_attributes pa, tx_multishop_products_options_values pov where pa.products_id = '" . $product['products_id'] . "' and pa.page_uid='" . $this->showCatalogFromPage . "' and pa.options_id = '" . $products_options_name_values['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "' order by pa.options_values_price,pov.products_options_values_id, pov.products_options_values_name");
while ($products_options_values = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($products_options)) {
if ($products_options_values['options_values_price'] == 0 && $selected == 0) {
$rel_rs['hidden_fields'] .= '<input type="hidden" name="relation_id[' . $i . '][' . $products_options_name_values['products_options_id'] . ']" value="' . $products_options_values['products_options_values_id'] . '" />';
$selected = 1;
}
}
}
}
if ($rel_rs['categories_id']) {
// get all cats to generate multilevel fake url
$level = 0;
$cats = mslib_fe::Crumbar($rel_rs['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
}
$link = mslib_fe::typolink($this->conf['products_detail_page_pid'], $where . '&products_id=' . $rel_rs['products_id'] . '&tx_multishop_pi1[page_section]=products_detail');
// STOCK INDICATOR
$product_qty = $rel_rs['products_quantity'];
示例14: jQuery
$product_listing_form_content .= '<input type="hidden" name="p" value="' . $p . '">';
}
if ($this->get['tx_multishop_pi1']['page_section'] == 'products_search') {
$product_listing_form_content .= '<input type="hidden" name="page" value="' . $this->get['page'] . '">';
}
}
$product_listing_form_content .= '<script type="text/javascript">
jQuery(document).ready(function($) {
$(".products_listing_filter").change(function(){
$("#sorting_products_listing").submit();
});
});
</script>';
// get all cats to generate multilevel fake url
$level = 0;
$cats = mslib_fe::Crumbar($this->get['categories_id']);
$cats = array_reverse($cats);
$where = '';
if (count($cats) > 0) {
foreach ($cats as $item) {
$where .= "categories_id[" . $level . "]=" . $item['id'] . "&";
$level++;
}
$where = substr($where, 0, strlen($where) - 1);
}
// get all cats to generate multilevel fake url eof
$form_action_url = mslib_fe::typolink($this->conf['products_listing_page_pid'], $where . '&tx_multishop_pi1[page_section]=products_listing');
$subpartArray['###PRODUCTS_LISTING_FILTER_FORM_URL###'] = '';
$subpartArray['###PRODUCTS_LISTING_FORM_CONTENT###'] = $product_listing_form_content;
} else {
$subpartArray['###PRODUCTS_LISTING_FILTER_FORM_URL###'] = '';
示例15: convertCartToOrder
//.........这里部分代码省略.........
}
// hook oef
}
if (!$orders_id) {
$subject = $this->FULL_HTTP_URL . ' - Convert cart to order failed';
$body = 'Warning. Convert cart to order failed.<br/>Website: ' . $this->FULL_HTTP_URL . '<br/>Error: ' . $GLOBALS['TYPO3_DB']->sql_error() . '<br/>Query:<br/>' . $query;
$mailuser = array();
$mailuser['name'] = $this->ms['MODULES']['STORE_NAME'];
$mailuser['email'] = $this->ms['MODULES']['STORE_EMAIL'];
if ($this->ms['MODULES']['DEVELOPER_EMAIL']) {
$mailuser['email'] = $this->ms['MODULES']['DEVELOPER_EMAIL'];
}
if ($mailuser['email']) {
mslib_fe::mailUser($mailuser, $subject, $body, $this->ms['MODULES']['STORE_EMAIL'], $this->ms['MODULES']['STORE_NAME']);
}
} else {
// now add the orders products
if ($cart['user']['payment_method']) {
$this->ms['payment_method'] = $cart['user']['payment_method'];
} elseif ($cart['user']['shipping_method']) {
$this->ms['shipping_method'] = $cart['user']['shipping_method'];
}
if (is_array($cart['products']) && count($cart['products'])) {
foreach ($cart['products'] as $shopping_cart_item => $value) {
if (is_numeric($value['products_id'])) {
if ($this->ms['MODULES']['DISABLE_VAT_RATE']) {
$value['tax_rate'] = 0;
}
$insertArray = array();
$insertArray['orders_id'] = $orders_id;
$insertArray['products_id'] = $value['products_id'];
$insertArray['categories_id'] = $value['categories_id'];
// get all cats
$cats = mslib_fe::Crumbar($value['categories_id']);
$cats = array_reverse($cats);
if (count($cats) > 0) {
$i = 0;
foreach ($cats as $cat) {
$insertArray['categories_id_' . $i] = $cat['id'];
$insertArray['categories_name_' . $i] = $cat['name'];
$i++;
}
}
// get all cats eof
if (isset($value['manufacturers_id']) && !empty($value['manufacturers_id'])) {
$insertArray['manufacturers_id'] = $value['manufacturers_id'];
} else {
$insertArray['manufacturers_id'] = '';
}
if (isset($value['order_unit_id']) && !empty($value['order_unit_id'])) {
$insertArray['order_unit_id'] = $value['order_unit_id'];
} else {
$insertArray['order_unit_id'] = '';
}
if (isset($value['order_unit_name']) && !empty($value['order_unit_name'])) {
$insertArray['order_unit_name'] = $value['order_unit_name'];
} else {
$insertArray['order_unit_name'] = '';
}
if (isset($value['order_unit_code']) && !empty($value['order_unit_code'])) {
$insertArray['order_unit_code'] = $value['order_unit_code'];
} else {
$insertArray['order_unit_code'] = '';
}
$insertArray['qty'] = $value['qty'];
$insertArray['products_tax'] = $value['tax_rate'] * 100;