$formats[] = '100'; $formats[] = '200'; $formats[] = '300'; foreach ($formats as $format) { if ($current_product['products_image']) { $key = 'image_' . $format; if ($this->imageWidth == $format) { $key = 'image'; } $imagePath = mslib_befe::getImagePath($current_product['products_image'], 'products', $format); $output[$key] = '<img src="' . $imagePath . '" alt="' . htmlspecialchars($current_product['products_name']) . '" />'; } else { $output[$key] = '<div class="no_image"></div>'; } } $final_price = mslib_fe::final_products_price($current_product); $final_price_per_each = $current_product['final_price']; if (!$this->ms['MODULES']['DB_PRICES_INCLUDE_VAT'] and ($current_product['tax_rate'] and $this->ms['MODULES']['SHOW_PRICES_INCLUDING_VAT'])) { $old_price = $current_product['products_price'] * (1 + $current_product['tax_rate']); } else { $old_price = $current_product['products_price']; } if ($current_product['tax_rate'] and $this->ms['MODULES']['SHOW_PRICES_WITH_AND_WITHOUT_VAT']) { $output['products_price'] .= '<div class="price_excluding_vat">' . $this->pi_getLL('excluding_vat') . ' ' . mslib_fe::amount2Cents($current_product['final_price']) . '</div>'; } if ($current_product['products_price'] != $current_product['final_price']) { if (!$this->ms['MODULES']['DB_PRICES_INCLUDE_VAT'] and ($current_product['tax_rate'] and $this->ms['MODULES']['SHOW_PRICES_INCLUDING_VAT'])) { $old_price = $current_product['products_price'] * (1 + $current_product['tax_rate']); } else { $old_price = $current_product['products_price']; }
$old_price_label = ''; } // jcarousel $specials_items .= '{url: \'' . $link . '\', image: \'' . $image . '\', title: \'' . htmlspecialchars(addslashes($product['products_name'])) . '\', price: \'' . $old_price_label . '\', specials_price: \'' . mslib_fe::amount2Cents($final_price) . '\'}'; if ($teller < $total) { $specials_items .= ','; } $specials_items .= "\n"; } else { if ($product['products_image']) { $image = '<img src="' . mslib_befe::getImagePath($product['products_image'], 'products', $this->imageWidth) . '" alt="' . htmlspecialchars($product['products_name']) . '" />'; } else { $image = '<div class="no_image"></div>'; } // normal $final_price = mslib_fe::final_products_price($product); $item_products_specials_price = ''; if ($product['tax_rate'] and $this->ms['MODULES']['SHOW_PRICES_WITH_AND_WITHOUT_VAT']) { $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>'; }
} else { $product_qty = '<div class="products_stock"><span class="stock_label">' . $this->pi_getLL('stock') . ':</span><img src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'templates/images/icons/status_red.png" alt="' . htmlspecialchars($this->pi_getLL('not_in_stock')) . '" /></div>'; } break; case 'yes_without_image': if ($product_qty) { $product_qty = '<div class="products_stock"><span class="stock_label">' . $this->pi_getLL('stock') . ':</span><span class="stock_value">' . $this->pi_getLL('admin_yes') . '</span></div>'; } else { $product_qty = '<div class="products_stock"><span class="stock_label">' . $this->pi_getLL('stock') . ':</span><span class="stock_value">' . $this->pi_getLL('admin_no') . '</span></div>'; } break; } } $markerArray['PRODUCTS_STOCK'] = $product_qty; // STOCK INDICATOR EOF $final_price = mslib_fe::final_products_price($rel_rs); $rel_rs['hidden_fields'] .= '<input type="hidden" name="relation_products_id[' . $i . ']" value="' . $rel_rs['products_id'] . '" />'; $markerArray = array(); $markerArray['ITEM_CLASS'] = $tr_type; $markerArray['PRODUCTS_LINK'] = $link; if ($rel_rs['products_image']) { $markerArray['ITEM_PRODUCTS_IMAGE'] = '<img src="' . mslib_befe::getImagePath($rel_rs['products_image'], 'products', '50') . '" alt="' . htmlspecialchars($rel_rs['products_name']) . '" />'; $markerArray['ITEM_PRODUCTS_IMAGE_100'] = '<img src="' . mslib_befe::getImagePath($rel_rs['products_image'], 'products', '100') . '" alt="' . htmlspecialchars($rel_rs['products_name']) . '" />'; $markerArray['ITEM_PRODUCTS_IMAGE_200'] = '<img src="' . mslib_befe::getImagePath($rel_rs['products_image'], 'products', '200') . '" alt="' . htmlspecialchars($rel_rs['products_name']) . '" />'; $markerArray['ITEM_PRODUCTS_IMAGE_300'] = '<img src="' . mslib_befe::getImagePath($rel_rs['products_image'], 'products', '300') . '" alt="' . htmlspecialchars($rel_rs['products_name']) . '" />'; } else { $markerArray['ITEM_PRODUCTS_IMAGE'] = '<div class="no_image_50"></div>'; $markerArray['ITEM_PRODUCTS_IMAGE_100'] = '<div class="no_image_50"></div>'; $markerArray['ITEM_PRODUCTS_IMAGE_200'] = '<div class="no_image_50"></div>'; $markerArray['ITEM_PRODUCTS_IMAGE_300'] = '<div class="no_image_50"></div>'; }
$product = mslib_fe::getProduct($products_id); } // hook if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/get_staffel_price.php']['getProductPostProc'])) { $params = array('products_id' => &$products_id, 'product' => &$product); foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/get_staffel_price.php']['getProductPostProc'] as $funcRef) { \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this); } } // hook eof $disableFeFromCalculatingVatPrices = $this->conf['disableFeFromCalculatingVatPrices']; $this->conf['disableFeFromCalculatingVatPrices'] = 1; $exclude_vat_price = mslib_fe::final_products_price($product, $qty, 0) * $qty; $this->conf['disableFeFromCalculatingVatPrices'] = $disableFeFromCalculatingVatPrices; // count normal price $price = mslib_fe::final_products_price($product, $qty, 0) * $qty; $original_price = $product['products_price'] * $qty; if ($product['tax_rate'] and $this->ms['MODULES']['SHOW_PRICES_INCLUDING_VAT']) { //$price=round($price*(1+$product['tax_rate']), 2); $original_price = round($original_price * (1 + $product['tax_rate']), 2); } $attr = array(); $original_attr = array(); if (is_array($this->get['attributes'])) { foreach ($this->get['attributes'] as $key => $value) { if (!$value) { continue; } if (is_numeric($key)) { $str = "SELECT products_options_name,listtype from tx_multishop_products_options o where o.products_options_id='" . $key . "' and language_id='" . $this->sys_language_uid . "'"; $qry = $GLOBALS['TYPO3_DB']->sql_query($str);
$tmpcontent .= round($old_product_price, 2); } else { $tmpcontent .= ''; } break; case 'products_price_excluding_vat': $tmpcontent .= round($row['final_price'], 14); break; case 'products_price': $tmpcontent .= mslib_fe::final_products_price($row); break; case 'products_price_currency': $tmpcontent .= $this->ms['MODULES']['CURRENCY_ARRAY']['cu_iso_3']; break; case 'products_price_with_currency': $tmpcontent .= mslib_fe::final_products_price($row) . ' ' . $this->ms['MODULES']['CURRENCY_ARRAY']['cu_iso_3']; break; case 'product_capital_price': if ($this->ms['MODULES']['FLAT_DATABASE']) { $row2 = mslib_befe::getRecord($row['products_id'], 'tx_multishop_products', 'products_id'); $tmpcontent .= $row2['product_capital_price']; } else { $tmpcontent .= $row['product_capital_price']; } break; case 'manufacturers_id': $tmpcontent .= $row['manufacturers_id']; break; case 'manufacturers_name': if ($row['manufacturers_name']) { $tmpcontent .= $row['manufacturers_name'];