(1.3.7) Zobrazení cen s DPH a bez DPH pro ZC 1.3.x
Kategorie : Přizpůsobení obchodu
Published by JardaR on 10. 1. 2007
--------------------------------------
- includes/classes/currencies.php
--------------------------------------

za tento kód

function display_price($products_price, $products_tax, $quantity = 1) {
return $this->format(zen_add_tax($products_price, $products_tax) * $quantity);
}


vložit kód

function display_price_notax($products_price, $quantity = 1) {
return $this->format($products_price * $quantity);
}


-----------------------------------------------
- includes/functions/functions_prices.php
-----------------------------------------------

tento kód

         $show_sale_price = '<br />' . '<span class="productSalePrice">' . PRODUCT_PRICE_SALE . $currencies->display_price($display_sale_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</span>';


přepsat kódem

         $show_sale_price = '<br />' . '<span class="productSalePrice">' . PRODUCT_PRICE_SALE . $currencies->display_price($display_sale_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) .

(DISPLAY_PRICE_WITHOUT_TAX == 'true'?
TEXT_PRICE_INC_TAX.'</span><br /><span class="productTaxPrice">'.
$starting_at.$currencies->display_price_notax($display_sale_price).TEXT_PRICE_EX_TAX:'').

 '</span>';



tento kód

          $show_special_price = '&nbsp;' . '<span class="productSpecialPrice">' . $currencies->display_price($display_special_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</span>';


přepsat kódem

          $show_special_price = '&nbsp;' . '<span class="productSpecialPrice">' . $currencies->display_price($display_special_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) .

(DISPLAY_PRICE_WITHOUT_TAX == 'true'?
TEXT_PRICE_INC_TAX.'</span><br /><span class="productTaxPrice">'.
$starting_at.$currencies->display_price_notax($display_special_price).TEXT_PRICE_EX_TAX:'').

'</span>';


tento kód

        $show_sale_price = '<br />' . '<span class="productSalePrice">' . PRODUCT_PRICE_SALE . $currencies->display_price($display_sale_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</span>';


přepsat kódem

        $show_sale_price = '<br />' . '<span class="productSalePrice">' . PRODUCT_PRICE_SALE . $currencies->display_price($display_sale_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) .

(DISPLAY_PRICE_WITHOUT_TAX == 'true'?
TEXT_PRICE_INC_TAX.'</span><br /><span class="productTaxPrice">'.
$starting_at.$currencies->display_price_notax($display_sale_price).TEXT_PRICE_EX_TAX:'').

'</span>';


a tento kód

          $show_normal_price = $currencies->display_price($display_normal_price, zen_get_tax_rate($product_check->fields['products_tax_class_id']));


přepsat kódem

          $show_normal_price = '<span class="productNormalPrice">'.$currencies->display_price($display_normal_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])).

(DISPLAY_PRICE_WITHOUT_TAX == 'true'?
TEXT_PRICE_INC_TAX.'</span><br /><span class="productTaxPrice">'.
$starting_at.$currencies->display_price_notax($display_normal_price).TEXT_PRICE_EX_TAX:'').

'</span>';


------------------------------------
- includes/languages/czech.php
------------------------------------

na konec před ?> přidat kód

// zpusob zobrazeni cen  
  define('TEXT_PRICE_EX_TAX',' bez DPH');
  define('TEXT_PRICE_INC_TAX',' s DPH');

--------------------------------------
- includes/languages/english.php
--------------------------------------

na konec před ?> přidat kód

// displaying with tax and without tax
  define('TEXT_PRICE_EX_TAX',' exl. TAX');
  define('TEXT_PRICE_INC_TAX',' inc. TAX');


-----------------------------------------------------------------
- includes/templates/template_default/css/stylesheet.css
-----------------------------------------------------------------

na konec vložit kód

/*uprava pro zobrazeni cen bez dane a s dani*/
span.normalprice {
	text-decoration: line-through;
}

TD.productPrice {
	font-size: 14px;
	font-weight: bold;
}

SPAN.productSpecialPrice, SPAN.productSalePrice, .stockWarning, span.coming {
  color: #ee0a00;
  font-weight: bold;
}

SPAN.productNormalPrice {
  color: #000000;
  font-weight: bold;
}

SPAN.productTaxPrice {
  color: #666666;
  font-size: 10px;
}

span.productSpecialPriceSale {
  color: #ee0a00;
	text-decoration: line-through;
}

SPAN.productPriceDiscount, .inputRequirement {
  color: #ee0a00;
  font-size: 11px;
}


-------------
import SQL
-------------
admin-nástroje-instalace sql patchů - vložit kód z okna a kliknout na poslat
################################################################
# SQL pro contribution ZOBRAZENI CEN BEZ A S DPH
################################################################

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES
('', 'Zobrazit ceny s daní i bez', 'DISPLAY_PRICE_WITHOUT_TAX', 'true', 'Zobrazit obě ceny, bez daně i včetně daně (true) nebo zobrazit jen cenu s daní nebo bez daně podle nastavení "Zobrazit cenu s daní" (false)', '1', '21', '2006-08-03 10:00:00', '2006-08-03 10:10:10', NULL , 'zen_cfg_select_option(array(''true'', ''false''), ');