public function calculate($price, $tax_rate) { global $lC_Currencies; // added for localization if (isset($_SESSION['localization']['show_tax']) && $_SESSION['localization']['show_tax'] == 0) { $tax_rate = 1; } return lc_round($price * $tax_rate / 100, $lC_Currencies->currencies[DEFAULT_CURRENCY]['decimal_places']); }
</span><?php echo lc_show_info_bubble($lC_Language->get('info_bubble_data_price_with_tax')); ?> </div> <div class="twelve-columns no-margin-bottom small-margin-top"> <div class="inputs blue-gradient" style="display:inline; padding:8px 0;"> <span class="mid-margin-left no-margin-right strong"><?php echo $lC_Currencies->getSymbolLeft(); ?> </span> <?php if (isset($pInfo)) { if (DISPLAY_PRICE_WITH_TAX == 1 || $_SESSION['localization']['show_tax'] == 1) { $products_price_gross = lc_round($pInfo->get('products_price_with_tax'), DECIMAL_PLACES); } else { $products_price_gross = lc_round($pInfo->get('products_price'), DECIMAL_PLACES); } } else { $products_price_gross = null; } echo lc_draw_input_field('products_price_gross', $products_price_gross, 'style="width:94%;" class="input-unstyled strong products-price-gross" id="products_price0_gross" READONLY'); ?> </div> </div> </div> </div> </fieldset> <fieldset class="fieldset"> <legend class="legend"><?php echo $lC_Language->get('text_management_settings'); ?>
public function displayPriceWithTaxRate($price, $tax_rate, $quantity = 1, $force = false, $currency_code = '', $currency_value = '') { global $lC_Tax; $price = $this->santizePrice($price); $price = lc_round($price, $this->currencies[DEFAULT_CURRENCY]['decimal_places']); if (($force === true || (DISPLAY_PRICE_WITH_TAX == '1' || $_SESSION['localization']['show_tax'] == 1)) && $tax_rate > 0) { $price += lc_round($price * ($tax_rate / 100), $this->currencies[DEFAULT_CURRENCY]['decimal_places']); } return $this->format($price * $quantity, $currency_code, $currency_value); }
echo $lC_Language->get('text_pricing_overrides'); ?> </legend> <div class="field-block button-height"> <label for="products_base_price" class="label"><b><?php echo $lC_Language->get('text_base_price'); ?> </b></label> <div class="inputs" style="display:inline; padding:8px 0;"> <span class="mid-margin-left no-margin-right"><?php echo $lC_Currencies->getSymbolLeft(); ?> </span> <input type="text" onfocus="this.select();" onchange="updatePricingDiscountDisplay();" class="input-unstyled" name="products_base_price" id="products_base_price" value="<?php echo isset($pInfo) ? number_format(lc_round($pInfo->get('products_price'), DECIMAL_PLACES), DECIMAL_PLACES) : null; ?> " class="input strong" onblur="$('#products_price0').val(this.value);" /> </div> <?php echo lc_show_info_bubble($lC_Language->get('info_bubble_pricing_base_price'), null, 'info-spot on-left grey margin-left'); ?> </div> <div class="upsellwrapper field-block field-block-product button-height"> <?php if (utility::isPro() === false || utility::isB2B() === false) { ?> <label upselltitle="<?php echo $lC_Language->get('text_group_pricing'); ?>
public function parseSubProducts($data) { global $lC_Image, $lC_Currencies, $lC_Language, $lC_Tax, $lC_ShoppingCart; $output = ''; foreach ($data as $key => $value) { $extra = ''; // $extra = (isset($value['products_model']) && empty($value['products_model']) === false) ? '<em>' . $lC_Language->get('listing_model_heading') . ': ' . $value['products_model'] . '</em>' : null; // if ($extra == null && isset($value['products_sku']) && empty($value['products_sku']) === false) $extra = '<em>' . $lC_Language->get('listing_sku_heading') . ': ' . $value['products_sku'] . '</em>'; $img = isset($value['image']) && empty($value['image']) === false ? $lC_Image->getAddress($value['image'], 'small') : 'images/pixel_trans.gif'; $height = isset($value['image']) && empty($value['image']) === false ? $lC_Image->getHeight('small') : 1; $hcss = isset($value['image']) && empty($value['image']) === false ? null : ' style="height:1px;" '; $price = $value['products_price']; $purchase_type = defined('MULTISKU_SUBPRODUCTS_PURCHASE_PRESENTATION') && MULTISKU_SUBPRODUCTS_PURCHASE_PRESENTATION == 'Multi' ? 'multi' : 'single'; if (DISPLAY_PRICE_WITH_TAX == 1 || $_SESSION['localization']['show_tax'] == 1) { $taxClassID = $lC_ShoppingCart->getShippingMethod('tax_class_id') != NULL ? $lC_ShoppingCart->getShippingMethod('tax_class_id') : $this->_data['tax_class_id']; $countryID = $lC_ShoppingCart->getShippingAddress('country_id') != NULL ? $lC_ShoppingCart->getShippingAddress('country_id') : STORE_COUNTRY; $zoneID = $lC_ShoppingCart->getShippingAddress('zone_id') != NULL ? $lC_ShoppingCart->getShippingAddress('zone_id') : STORE_ZONE; $taxRate = $lC_Tax->getTaxRate($taxClassID, $countryID, $zoneID); $tax = $lC_Tax->calculate($value['products_price'], $taxRate); $price = lc_round($value['products_price'] + $tax, DECIMAL_PLACES); } $output .= '<div class="row clear-both margin-bottom margin-top">' . ' <div class="col-sm-7 col-lg-7">' . ' <span class="subproduct-image pull-left margin-right">' . ' <img class="img-responsive" ' . $hcss . 'src="' . $img . '" title="' . $value['products_name'] . '" height="' . $height . '" width="' . $lC_Image->getWidth('small') . '" alt="' . $value['products_name'] . '" />' . ' </span>' . ' <span class="subproduct-name lead lt-blue no-margin-bottom">' . $value['products_name'] . '</span><br />' . (isset($extra) && $extra != null ? '<span class="subproduct-model small-margin-left no-margin-top"><small>' . $extra . '</small></span>' : null) . ' </div>' . ' <div class="col-sm-5 col-lg-5">' . ' <span class="subproduct-price lead">' . $lC_Currencies->format($price) . '</span>'; $disabled = ''; if (DISABLE_ADD_TO_CART == 1 && $value['products_quantity'] < 1) { $disabled = ' disabled'; } if ($purchase_type == 'single') { $output .= ' <span class="subproduct-buy-now pull-right">' . ' <form method="post" action="' . lc_href_link(FILENAME_DEFAULT, $value['products_id'] . '&action=cart_add') . '"><button class="subproduct-buy-now-button btn btn-success' . $disabled . '" type="submit" onclick="$(this).closest(\'form\').submit();"' . $disabled . '>' . $lC_Language->get('button_buy_now') . '</button></form>' . ' </span>'; } else { $output .= ' <span class="subproduct-qty-input pull-right half-width">' . ' <label class="display-inline">' . $lC_Language->get('text_add_to_cart_quantity') . '</label><input type="text" id="quantity_' . $value['products_id'] . '" name="quantity[' . $value['products_id'] . ']" onfocus="this.select();" class="small-margin-left display-inline form-control form-control content-products-info-subproduct-qty-input half-width no-margin-right text-center' . $disabled . '" value="0"' . $disabled . '>' . ' </span>'; } $output .= ' </div>' . '</div>'; } return $output; }
<div class="new-row-mobile new-row-tablet twelve-columns-mobile twelve-columns-tablet six-columns margin-bottom"> <span> <span class="strong"><?php echo $lC_Language->get('field_base_price'); ?> </span><?php echo lc_show_info_bubble($lC_Language->get('info_bubble_content_base_price'), 'margin:8px 6px 0 0;'); ?> </span> <div class="inputs large" style="font-size:1.8em; padding:8px 0;"> <span class="mid-margin-left no-margin-right"><?php echo $lC_Currencies->getSymbolLeft(); ?> </span> <?php echo lc_draw_input_field('products_price', isset($pInfo) ? lc_round($pInfo->get('products_price'), DECIMAL_PLACES) : null, 'style="font-size:1em; padding:4px; height:20px; width:80%;" class="required input-unstyled" onfocus="this.select();" id="products_price0" onchange="$(\'#products_base_price\').val(this.value); updatePricingDiscountDisplay();"'); ?> </div> </div> <div class="new-row-mobile new-row-tablet twelve-columns-mobile twelve-columns-tablet six-columns"> <div class="columns"> <div class="six-columns-mobile six-columns-tablet seven-columns margin-bottom"> <span> <span class="strong"><?php echo $lC_Language->get('field_status'); ?> </span><?php echo lc_show_info_bubble($lC_Language->get('info_bubble_content_status'), null, 'info-spot on-left grey margin-left'); ?> </span><br /> <span class="button-group">