SlideShare a Scribd company logo
1 of 27
Цены в Magento 2 
Magento 2 Pricing 
Magento is an eBay Inc. company. © 2014 Magento, Inc. All rights reserved.
О себе 
 Backend разработчик Magento 
 В Magento 2.5 года 
 Проэкты 
 Magento Testing Framework 
 Filesystem 
 Full Page Cache 
 Pricing 
 Service Layer 
 Сейчас занимаюсь 
 MTF Parallel Run и Magento 2 Sales 
© 2014 Magento, Inc. Page | 2
Содержание 
 Стоимость широких возможностей 
 Реализация 
 Организация сущностей 
 Расширяемость 
 Итоги 
© 2014 Magento, Inc. Page | 3
1 Широкие возможности 
© 2014 Magento, Inc. Page | 4
Разнообразие цен 
 Тип цены 
 Тип продукта 
 Скидки 
 Налоги 
 Настройки расчета 
 Настройки отображения 
© 2014 Magento, Inc. Page | 5 
~500 000
<?php 
$_coreHelper = $this->helper('MagentoCoreHelperData'); 
$weeeHelper = $this->helper('MagentoWeeeHelperData'); 
$priceHelper = $this->helper('MagentoCatalogHelperProductPrice'); 
/* @var $_coreHelper MagentoCoreHelperData */ 
/* @var $weeeHelper MagentoWeeeHelperData */ 
/* @var $priceHelperMagentoCatalogHelperProductPrice */ 
$_product = $this->getProduct(); 
$_storeId = $_product->getStoreId(); 
$_id = $_product->getId(); 
$_weeeSeparator = ''; 
$_simplePricesTax = ($priceHelper->displayPriceIncludingTax() || $priceHelper->displayBothPrices()); 
$_minimalPriceValue = $_product->getMinimalPrice(); 
$_minimalPrice = $priceHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax); 
?> 
<?php $_weeeTaxAmount = $weeeHelper->getAmountForDisplay($_product); ?> 
<?php if ($weeeHelper->typeOfDisplay($_product, array(MagentoWeeeModelTax::DISPLAY_INCL_DESCR, 
MagentoWeeeModelTax::DISPLAY_EXCL_DESCR_INCL, 4))): ?> 
<?php $_weeeTaxAmount = $weeeHelper->getAmount($_product); ?> 
<?php $_weeeTaxAttributes = $weeeHelper->getProductWeeeAttributesForDisplay($_product); ?> 
<?php endif; ?> 
<?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?> 
<?php if ($weeeHelper->isTaxable() && !$priceHelper->priceIncludesTax($_storeId)): ?> 
<?php $_attributes = $weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?> 
<?php $_weeeTaxAmountInclTaxes = $weeeHelper->getAmountInclTaxes($_attributes); ?> 
<?php endif; ?> 
<div class="price-box"> 
<?php $_price = $priceHelper->getPrice($_product, $_product->getPrice()) ?> 
<?php $_regularPrice = $priceHelper->getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?> 
<?php $_finalPrice= $priceHelper->getPrice($_product, $_product->getFinalPrice()) ?> 
<?php $_finalPriceInclTax = $priceHelper->getPrice($_product, $_product->getFinalPrice(), true) ?> 
<?php $_weeeDisplayType = $weeeHelper->getPriceDisplayType(); ?> 
<?php if ($_finalPrice >= $_price): ?> 
<?php if ($priceHelper->displayBothPrices()): ?> 
<?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?> 
</span> 
</span> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
</span> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?> 
</span> 
</span> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
<span class="weee">( 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<?php echo $_weeeSeparator; ?> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> 
<?php $_weeeSeparator = ' + '; ?> 
<?php endforeach; ?> 
)</span> 
</span> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?> 
</span> 
</span> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
<span class="weee">( 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<?php echo $_weeeSeparator; ?> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + 
$_weeeTaxAttribute->getTaxAmount(), true, true); ?> 
<?php $_weeeSeparator = ' + '; ?> 
<?php endforeach; ?> 
)</span> 
</span> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price, true, false) ?> 
</span> 
</span> 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<span class="weee"> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> 
</span> 
<?php endforeach; ?> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
</span> 
<?php else: ?> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php if ($_finalPrice == $_price): ?> 
<?php echo $_coreHelper->currency($_price, true, false) ?> 
<?php else: ?> 
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?> 
<?php endif; ?> 
</span> 
© 2014 Magento, </span> 
Inc. Page | 6 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?> 
</span> 
</span> 
<?php endif; ?> 
<?php else: ?> 
<?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?> 
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> 
</span> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?> 
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> 
</span> 
<span class="weee">( 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<?php echo $_weeeSeparator; ?> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> 
<?php $_weeeSeparator = ' + '; ?> 
<?php endforeach; ?> 
)</span> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?> 
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> 
</span> 
<span class="weee">( 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<?php echo $_weeeSeparator; ?> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute- 
>getTaxAmount(), true, true); ?> 
<?php $_weeeSeparator = ' + '; ?> 
<?php endforeach; ?> 
)</span> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?> 
<span class="regular-price"><?php echo $_coreHelper->currency($_price,true,true) ?></span><br /> 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<span class="weee"> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> 
</span> 
<?php endforeach; ?> 
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> 
</span> 
<?php else: ?> 
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php if ($_finalPrice== $_price): ?> 
<?php echo $_coreHelper->currency($_price, true, true) ?> 
<?php else: ?> 
<?php echo $_coreHelper->currency($_finalPrice, true, true) ?> 
<?php endif; ?> 
</span> 
<?php endif; ?> 
<?php endif; ?> 
<?php else: /* if ($_finalPrice == $_price): */ ?> 
<?php $_originalWeeeTaxAmount = $weeeHelper->getOriginalAmount($_product); ?> 
<?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?> 
<p class="old-price"> 
<span class="price-label"><?php echo __('Regular Price:') ?></span> 
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?> 
</span> 
</p> 
<?php if ($priceHelper->displayBothPrices()): ?> 
<p class="special-price"> 
<span class="price-label"><?php echo __('Special Price:') ?></span> 
<span class="price-excluding-tax"> 
<span class="label"><?phpecho __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?> 
</span> 
</span> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
</span> 
</p> 
<?php else: ?> 
<p class="special-price"> 
<span class="price-label"><?php echo __('Special Price:') ?></span> 
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
</p> 
<?php endif; ?> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?> 
<p class="old-price"> 
<span class="price-label"><?php echo __('Regular Price:') ?></span> 
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?> 
</span> 
</p> 
<p class="special-price"> 
<span class="price-label"><?php echo __('Special Price:') ?></span> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?> 
</span> 
</span> 
<span class="weee">( 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<?php echo $_weeeSeparator; ?> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> 
<?php $_weeeSeparator = ' + '; ?> 
<?php endforeach; ?> 
)</span> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
</span> 
</p> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?> 
<p class="old-price"> 
<span class="price-label"><?php echo __('Regular Price:') ?></span> 
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?> 
</span> 
</p> 
<p class="special-price"> 
<span class="price-label"><?php echo __('Special Price:') ?></span> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?> 
</span> 
</span> 
<span class="weee">( 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<?php echo $_weeeSeparator; ?> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute- 
>getTaxAmount(), true, true); ?> 
<?php $_weeeSeparator = ' + '; ?> 
<?php endforeach; ?> 
)</span> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
</span> 
</p> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?> 
<p class="old-price"> 
<span class="price-label"><?php echo __('Regular Price:') ?></span> 
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_regularPrice, true, false) ?> 
</span> 
</p> 
<p class="special-price"> 
<span class="price-label"><?php echo __('Special Price:') ?></span> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?> 
</span> 
</span> 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<span class="weee"> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> 
</span> 
<?php endforeach; ?> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
</span> 
</p> 
<?php else: // excl. ?> 
<p class="old-price"> 
<span class="price-label"><?php echo __('Regular Price:') ?></span> 
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_regularPrice, true, false) ?> 
</span> 
</p> 
<?php if ($priceHelper->displayBothPrices()): ?> 
<p class="special-price"> 
<span class="price-label"><?php echo __('Special Price:') ?></span> 
<span class="price-excluding-tax"> 
<span class="label"><?phpecho __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?> 
</span> 
</span> 
<span class="price-including-tax"> 
<span class="label"><?phpecho __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?> 
</span> 
</span> 
</p> 
<?php else: ?> 
<p class="special-price"> 
<span class="price-label"><?php echo __('Special Price:') ?></span> 
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?> 
</span> 
</p> 
<?php endif; ?> 
<?php endif; ?> 
<?php endif; /* if ($_finalPrice == $_price): */ ?> 
<?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?> 
<?php $_minimalPriceDisplayValue = $_minimalPrice; ?> 
<?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?> 
<?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?> 
<?php endif; ?> 
<?php if ($this->getUseLinkForAsLowAs()):?> 
<a href="<?phpecho $_product->getProductUrl(); ?>" class="minimal-price-link"> 
<?php else:?> 
<span class="minimal-price-link"> 
<?php endif?> 
<span class="label"><?php echo __('As low as:') ?></span> 
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_minimalPriceDisplayValue, true, false) ?> 
</span> 
<?php if ($this->getUseLinkForAsLowAs()):?> 
</a> 
<?php else:?> 
</span> 
<?php endif?> 
<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?> 
</div>
Проблемы 
 Сложность 
 Темплейты 
 Javascript 
 Модулярность 
 Tax 
 Weee 
 И т. д. 
 Дубликаты 
© 2014 Magento, Inc. Page | 7
Решения 
 Сложность 
 Концентрация работы с ценами в одном компоненте 
 Организация сущностей 
 Четкая граница между расчетом и отрисовкой 
 Модулярность 
 DI 
 Layout 
 “Adjustment” 
 Дубликаты 
© 2014 Magento, Inc. Page | 8
2 Реализация 
© 2014 Magento, Inc. Page | 9
Общая схема 
© 2014 Magento, Inc. Page | 10
Вычисление цены 
© 2014 Magento, Inc. Page | 11 
getPriceInfo() 
getPrice($priceCode) 
getAmount () 
apply() 
9.00 
0.99 
9.99
Отображение цены 
render() 
render() 
apply() 
© 2014 Magento, Inc. Page | 12 
toHtml() 
toHtml() 
toHtml()
Фронт 
© 2014 Magento, Inc. Page | 13 
Amounts 
Price 
Adjustments
3 Расширяемость 
© 2014 Magento, Inc. Page | 14
Точки расширения 
 Layout (~ Template and Block Pool) 
 DI (~ Price and Adjustment Models Pool) 
 Параметры отображения 
© 2014 Magento, Inc. Page | 15
Pricing layout 
Page layout 
© 2014 Magento, Inc. Page | 16 
Pricing 
Render 
Block 
Pricing layout 
Bundle 
Special Price 
Configurable 
Price 
Tier Price 
PriceRenderPool & AdjustmentRenderPool
Pricing layout fallback 
1. Конкретный тип продукта и цены 
2. Конкретный тип продукта 
3. Конкретный тип цены 
4. Стандартный class/template 
© 2014 Magento, Inc. Page | 17
DI 
© 2014 Magento, Inc. Page | 18 
Adjustments 
Pool 
Tax 
Price Pool 
Weee 
Special Price 
Custom Price
Расширяемость 4х4 
Pricing layout DI 
© 2014 Magento, Inc. Page | 19 
Price Pool 
Adjustment 
Pool 
Price Render 
Pool 
Adjustment 
Render Pool
+1. Параметры отображения 
 Указываются: 
 при обьявление сущностей так 
 при отрисовке конкретного блока цены 
 Доступны каждому блоку/темплейту 
 Примеры: 
 Zone (category, product) 
 Skip Adjustments 
 Include Container 
 Display Label 
© 2014 Magento, Inc. Page | 20
4 Итоги 
© 2014 Magento, Inc. Page | 21
Итоги 
 Модулярность 
 Простота в применении 
 Широкие возможности конфигурации 
 Отсутствие дубликатов кода 
 Отсутствие вычислений в темплейтах 
© 2014 Magento, Inc. Page | 22
<?php 
$_coreHelper = $this->helper('MagentoCoreHelperData'); 
$weeeHelper = $this->helper('MagentoWeeeHelperData'); 
$priceHelper = $this->helper('MagentoCatalogHelperProductPrice'); 
/* @var $_coreHelper MagentoCoreHelperData */ 
/* @var $weeeHelper MagentoWeeeHelperData */ 
/* @var $priceHelperMagentoCatalogHelperProductPrice */ 
$_product = $this->getProduct(); 
$_storeId = $_product->getStoreId(); 
$_id = $_product->getId(); 
$_weeeSeparator = ''; 
$_simplePricesTax = ($priceHelper->displayPriceIncludingTax() || $priceHelper->displayBothPrices()); 
$_minimalPriceValue = $_product->getMinimalPrice(); 
$_minimalPrice = $priceHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax); 
?> 
<?php $_weeeTaxAmount = $weeeHelper->getAmountForDisplay($_product); ?> 
<?php if ($weeeHelper->typeOfDisplay($_product, array(MagentoWeeeModelTax::DISPLAY_INCL_DESCR, 
MagentoWeeeModelTax::DISPLAY_EXCL_DESCR_INCL, 4))): ?> 
<?php $_weeeTaxAmount = $weeeHelper->getAmount($_product); ?> 
<?php $_weeeTaxAttributes = $weeeHelper->getProductWeeeAttributesForDisplay($_product); ?> 
<?php endif; ?> 
<?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?> 
<?php if ($weeeHelper->isTaxable() && !$priceHelper->priceIncludesTax($_storeId)): ?> 
<?php $_attributes = $weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?> 
<?php $_weeeTaxAmountInclTaxes = $weeeHelper->getAmountInclTaxes($_attributes); ?> 
<?php endif; ?> 
<div class="price-box"> 
<?php $_price = $priceHelper->getPrice($_product, $_product->getPrice()) ?> 
<?php $_regularPrice = $priceHelper->getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?> 
<?php $_finalPrice= $priceHelper->getPrice($_product, $_product->getFinalPrice()) ?> 
<?php $_finalPriceInclTax = $priceHelper->getPrice($_product, $_product->getFinalPrice(), true) ?> 
<?php $_weeeDisplayType = $weeeHelper->getPriceDisplayType(); ?> 
<?php if ($_finalPrice >= $_price): ?> 
<?php if ($priceHelper->displayBothPrices()): ?> 
<?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?> 
</span> 
</span> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
</span> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?> 
</span> 
</span> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
<span class="weee">( 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<?php echo $_weeeSeparator; ?> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> 
<?php $_weeeSeparator = ' + '; ?> 
<?php endforeach; ?> 
)</span> 
</span> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?> 
</span> 
</span> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
<span class="weee">( 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<?php echo $_weeeSeparator; ?> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + 
$_weeeTaxAttribute->getTaxAmount(), true, true); ?> 
<?php $_weeeSeparator = ' + '; ?> 
<?php endforeach; ?> 
)</span> 
</span> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price, true, false) ?> 
</span> 
</span> 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<span class="weee"> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> 
</span> 
<?php endforeach; ?> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
</span> 
<?php else: ?> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php if ($_finalPrice == $_price): ?> 
<?php echo $_coreHelper->currency($_price, true, false) ?> 
<?php else: ?> 
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?> 
<?php endif; ?> 
</span> 
© 2014 Magento, </span> 
Inc. Page | 23 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?> 
</span> 
</span> 
<?php endif; ?> 
<?php else: ?> 
<?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?> 
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> 
</span> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?> 
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> 
</span> 
<span class="weee">( 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<?php echo $_weeeSeparator; ?> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> 
<?php $_weeeSeparator = ' + '; ?> 
<?php endforeach; ?> 
)</span> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?> 
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> 
</span> 
<span class="weee">( 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<?php echo $_weeeSeparator; ?> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute- 
>getTaxAmount(), true, true); ?> 
<?php $_weeeSeparator = ' + '; ?> 
<?php endforeach; ?> 
)</span> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?> 
<span class="regular-price"><?php echo $_coreHelper->currency($_price,true,true) ?></span><br /> 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<span class="weee"> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> 
</span> 
<?php endforeach; ?> 
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> 
</span> 
<?php else: ?> 
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php if ($_finalPrice== $_price): ?> 
<?php echo $_coreHelper->currency($_price, true, true) ?> 
<?php else: ?> 
<?php echo $_coreHelper->currency($_finalPrice, true, true) ?> 
<?php endif; ?> 
</span> 
<?php endif; ?> 
<?php endif; ?> 
<?php else: /* if ($_finalPrice == $_price): */ ?> 
<?php $_originalWeeeTaxAmount = $weeeHelper->getOriginalAmount($_product); ?> 
<?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?> 
<p class="old-price"> 
<span class="price-label"><?php echo __('Regular Price:') ?></span> 
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?> 
</span> 
</p> 
<?php if ($priceHelper->displayBothPrices()): ?> 
<p class="special-price"> 
<span class="price-label"><?php echo __('Special Price:') ?></span> 
<span class="price-excluding-tax"> 
<span class="label"><?phpecho __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?> 
</span> 
</span> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
</span> 
</p> 
<?php else: ?> 
<p class="special-price"> 
<span class="price-label"><?php echo __('Special Price:') ?></span> 
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
</p> 
<?php endif; ?> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?> 
<p class="old-price"> 
<span class="price-label"><?php echo __('Regular Price:') ?></span> 
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?> 
</span> 
</p> 
<p class="special-price"> 
<span class="price-label"><?php echo __('Special Price:') ?></span> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?> 
</span> 
</span> 
<span class="weee">( 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<?php echo $_weeeSeparator; ?> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> 
<?php $_weeeSeparator = ' + '; ?> 
<?php endforeach; ?> 
)</span> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
</span> 
</p> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?> 
<p class="old-price"> 
<span class="price-label"><?php echo __('Regular Price:') ?></span> 
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?> 
</span> 
</p> 
<p class="special-price"> 
<span class="price-label"><?php echo __('Special Price:') ?></span> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?> 
</span> 
</span> 
<span class="weee">( 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<?php echo $_weeeSeparator; ?> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute- 
>getTaxAmount(), true, true); ?> 
<?php $_weeeSeparator = ' + '; ?> 
<?php endforeach; ?> 
)</span> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
</span> 
</p> 
<?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?> 
<p class="old-price"> 
<span class="price-label"><?php echo __('Regular Price:') ?></span> 
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_regularPrice, true, false) ?> 
</span> 
</p> 
<p class="special-price"> 
<span class="price-label"><?php echo __('Special Price:') ?></span> 
<span class="price-excluding-tax"> 
<span class="label"><?php echo __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?> 
</span> 
</span> 
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> 
<span class="weee"> 
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> 
</span> 
<?php endforeach; ?> 
<span class="price-including-tax"> 
<span class="label"><?php echo __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> 
</span> 
</span> 
</p> 
<?php else: // excl. ?> 
<p class="old-price"> 
<span class="price-label"><?php echo __('Regular Price:') ?></span> 
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_regularPrice, true, false) ?> 
</span> 
</p> 
<?php if ($priceHelper->displayBothPrices()): ?> 
<p class="special-price"> 
<span class="price-label"><?php echo __('Special Price:') ?></span> 
<span class="price-excluding-tax"> 
<span class="label"><?phpecho __('Excl. Tax:') ?></span> 
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?> 
</span> 
</span> 
<span class="price-including-tax"> 
<span class="label"><?phpecho __('Incl. Tax:') ?></span> 
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?> 
</span> 
</span> 
</p> 
<?php else: ?> 
<p class="special-price"> 
<span class="price-label"><?php echo __('Special Price:') ?></span> 
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?> 
</span> 
</p> 
<?php endif; ?> 
<?php endif; ?> 
<?php endif; /* if ($_finalPrice == $_price): */ ?> 
<?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?> 
<?php $_minimalPriceDisplayValue = $_minimalPrice; ?> 
<?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?> 
<?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?> 
<?php endif; ?> 
<?php if ($this->getUseLinkForAsLowAs()):?> 
<a href="<?phpecho $_product->getProductUrl(); ?>" class="minimal-price-link"> 
<?php else:?> 
<span class="minimal-price-link"> 
<?php endif?> 
<span class="label"><?php echo __('As low as:') ?></span> 
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> 
<?php echo $_coreHelper->currency($_minimalPriceDisplayValue, true, false) ?> 
</span> 
<?php if ($this->getUseLinkForAsLowAs()):?> 
</a> 
<?php else:?> 
</span> 
<?php endif?> 
<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?> 
</div>
Код 
echo $this->getLayout() 
© 2014 Magento, Inc. Page | 24 
->getBlock('product.price.render') 
->render('final_price', $product, $arguments);
Фронт 
© 2014 Magento, Inc. Page | 25
5 
© 2014 Magento, Inc. Page | 26 
Q&A
Спасибо! 
© 2014 Magento, Inc. Page | 27 
Контакты: 
email: sivashchenko@ebay.com 
skype: serg.ivashchenko

More Related Content

What's hot

Curso Symfony - Clase 2
Curso Symfony - Clase 2Curso Symfony - Clase 2
Curso Symfony - Clase 2Javier Eguiluz
 
Curso Symfony - Clase 4
Curso Symfony - Clase 4Curso Symfony - Clase 4
Curso Symfony - Clase 4Javier Eguiluz
 
Fixing Magento Core for Better Performance - Ivan Chepurnyi
Fixing Magento Core for Better Performance - Ivan ChepurnyiFixing Magento Core for Better Performance - Ivan Chepurnyi
Fixing Magento Core for Better Performance - Ivan ChepurnyiMeet Magento Spain
 
PHPunit and you
PHPunit and youPHPunit and you
PHPunit and youmarkstory
 
Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)tompunk
 
Top 5 Magento Secure Coding Best Practices
Top 5 Magento Secure Coding Best PracticesTop 5 Magento Secure Coding Best Practices
Top 5 Magento Secure Coding Best PracticesOleksandr Zarichnyi
 
Building secured wordpress themes and plugins
Building secured wordpress themes and pluginsBuilding secured wordpress themes and plugins
Building secured wordpress themes and pluginsTikaram Bhandari
 
Moving a high traffic ZF1 Enterprise Application to SF2 - Lessons learned
Moving a high traffic ZF1 Enterprise Application to SF2 - Lessons learnedMoving a high traffic ZF1 Enterprise Application to SF2 - Lessons learned
Moving a high traffic ZF1 Enterprise Application to SF2 - Lessons learnedBaldur Rensch
 
WordPress Theme Design and Development Workshop - Day 3
WordPress Theme Design and Development Workshop - Day 3WordPress Theme Design and Development Workshop - Day 3
WordPress Theme Design and Development Workshop - Day 3Mizanur Rahaman Mizan
 
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)Michael Wales
 
Using Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkUsing Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkDirk Haun
 
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for PerformanceMeet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for PerformanceIvan Chepurnyi
 
Introduction to Zend Framework web services
Introduction to Zend Framework web servicesIntroduction to Zend Framework web services
Introduction to Zend Framework web servicesMichelangelo van Dam
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress WebsitesKyle Cearley
 
November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2Kacper Gunia
 
WordPress overloading Gravityforms using hooks, filters and extending classes
WordPress overloading Gravityforms using hooks, filters and extending classes WordPress overloading Gravityforms using hooks, filters and extending classes
WordPress overloading Gravityforms using hooks, filters and extending classes Paul Bearne
 

What's hot (20)

Curso Symfony - Clase 2
Curso Symfony - Clase 2Curso Symfony - Clase 2
Curso Symfony - Clase 2
 
Daily notes
Daily notesDaily notes
Daily notes
 
Curso Symfony - Clase 4
Curso Symfony - Clase 4Curso Symfony - Clase 4
Curso Symfony - Clase 4
 
Fixing Magento Core for Better Performance - Ivan Chepurnyi
Fixing Magento Core for Better Performance - Ivan ChepurnyiFixing Magento Core for Better Performance - Ivan Chepurnyi
Fixing Magento Core for Better Performance - Ivan Chepurnyi
 
PHPunit and you
PHPunit and youPHPunit and you
PHPunit and you
 
Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)Apostrophe (improved Paris edition)
Apostrophe (improved Paris edition)
 
Top 5 Magento Secure Coding Best Practices
Top 5 Magento Secure Coding Best PracticesTop 5 Magento Secure Coding Best Practices
Top 5 Magento Secure Coding Best Practices
 
Building secured wordpress themes and plugins
Building secured wordpress themes and pluginsBuilding secured wordpress themes and plugins
Building secured wordpress themes and plugins
 
Zend framework 04 - forms
Zend framework 04 - formsZend framework 04 - forms
Zend framework 04 - forms
 
Moving a high traffic ZF1 Enterprise Application to SF2 - Lessons learned
Moving a high traffic ZF1 Enterprise Application to SF2 - Lessons learnedMoving a high traffic ZF1 Enterprise Application to SF2 - Lessons learned
Moving a high traffic ZF1 Enterprise Application to SF2 - Lessons learned
 
Keeping It Simple
Keeping It SimpleKeeping It Simple
Keeping It Simple
 
WordPress Theme Design and Development Workshop - Day 3
WordPress Theme Design and Development Workshop - Day 3WordPress Theme Design and Development Workshop - Day 3
WordPress Theme Design and Development Workshop - Day 3
 
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
Introduction to CodeIgniter (RefreshAugusta, 20 May 2009)
 
Using Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkUsing Geeklog as a Web Application Framework
Using Geeklog as a Web Application Framework
 
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for PerformanceMeet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
 
Introduction to Zend Framework web services
Introduction to Zend Framework web servicesIntroduction to Zend Framework web services
Introduction to Zend Framework web services
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
 
Wp query
Wp queryWp query
Wp query
 
November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2
 
WordPress overloading Gravityforms using hooks, filters and extending classes
WordPress overloading Gravityforms using hooks, filters and extending classes WordPress overloading Gravityforms using hooks, filters and extending classes
WordPress overloading Gravityforms using hooks, filters and extending classes
 

Similar to Сергей Иващенко - Meet Magento Ukraine - Цены в Magento 2

Who Needs Ruby When You've Got CodeIgniter
Who Needs Ruby When You've Got CodeIgniterWho Needs Ruby When You've Got CodeIgniter
Who Needs Ruby When You've Got CodeIgniterciconf
 
Dealing with Legacy PHP Applications
Dealing with Legacy PHP ApplicationsDealing with Legacy PHP Applications
Dealing with Legacy PHP ApplicationsClinton Dreisbach
 
Tadhg Bowe - i18n: how can I rephrase that?
Tadhg Bowe - i18n: how can I rephrase that?Tadhg Bowe - i18n: how can I rephrase that?
Tadhg Bowe - i18n: how can I rephrase that?Mage Titans ES
 
Workshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfastWorkshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfastMichelangelo van Dam
 
Workshop quality assurance for php projects - ZendCon 2013
Workshop quality assurance for php projects - ZendCon 2013Workshop quality assurance for php projects - ZendCon 2013
Workshop quality assurance for php projects - ZendCon 2013Michelangelo van Dam
 
Using of TDD practices for Magento
Using of TDD practices for MagentoUsing of TDD practices for Magento
Using of TDD practices for MagentoIvan Chepurnyi
 
PHPSpec - the only Design Tool you need - 4Developers
PHPSpec - the only Design Tool you need - 4DevelopersPHPSpec - the only Design Tool you need - 4Developers
PHPSpec - the only Design Tool you need - 4DevelopersKacper Gunia
 
Meet Magento Belarus debug Pavel Novitsky (eng)
Meet Magento Belarus debug Pavel Novitsky (eng)Meet Magento Belarus debug Pavel Novitsky (eng)
Meet Magento Belarus debug Pavel Novitsky (eng)Pavel Novitsky
 
Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8Michelangelo van Dam
 
Custom Post Types and Meta Fields
Custom Post Types and Meta FieldsCustom Post Types and Meta Fields
Custom Post Types and Meta FieldsLiton Arefin
 

Similar to Сергей Иващенко - Meet Magento Ukraine - Цены в Magento 2 (20)

20110820 header new style
20110820 header new style20110820 header new style
20110820 header new style
 
Who Needs Ruby When You've Got CodeIgniter
Who Needs Ruby When You've Got CodeIgniterWho Needs Ruby When You've Got CodeIgniter
Who Needs Ruby When You've Got CodeIgniter
 
Dealing with Legacy PHP Applications
Dealing with Legacy PHP ApplicationsDealing with Legacy PHP Applications
Dealing with Legacy PHP Applications
 
Tadhg Bowe - i18n: how can I rephrase that?
Tadhg Bowe - i18n: how can I rephrase that?Tadhg Bowe - i18n: how can I rephrase that?
Tadhg Bowe - i18n: how can I rephrase that?
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
 
Hacking Movable Type
Hacking Movable TypeHacking Movable Type
Hacking Movable Type
 
Symfony 1, mi viejo amigo
Symfony 1, mi viejo amigoSymfony 1, mi viejo amigo
Symfony 1, mi viejo amigo
 
Os Nixon
Os NixonOs Nixon
Os Nixon
 
Unit testing zend framework apps
Unit testing zend framework appsUnit testing zend framework apps
Unit testing zend framework apps
 
Magento Indexes
Magento IndexesMagento Indexes
Magento Indexes
 
Workshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfastWorkshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfast
 
Workshop quality assurance for php projects - ZendCon 2013
Workshop quality assurance for php projects - ZendCon 2013Workshop quality assurance for php projects - ZendCon 2013
Workshop quality assurance for php projects - ZendCon 2013
 
Using of TDD practices for Magento
Using of TDD practices for MagentoUsing of TDD practices for Magento
Using of TDD practices for Magento
 
Hooks WCSD12
Hooks WCSD12Hooks WCSD12
Hooks WCSD12
 
PHPSpec - the only Design Tool you need - 4Developers
PHPSpec - the only Design Tool you need - 4DevelopersPHPSpec - the only Design Tool you need - 4Developers
PHPSpec - the only Design Tool you need - 4Developers
 
Meet Magento Belarus debug Pavel Novitsky (eng)
Meet Magento Belarus debug Pavel Novitsky (eng)Meet Magento Belarus debug Pavel Novitsky (eng)
Meet Magento Belarus debug Pavel Novitsky (eng)
 
WordCamp Praga 2015
WordCamp Praga 2015WordCamp Praga 2015
WordCamp Praga 2015
 
Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8
 
Custom Post Types and Meta Fields
Custom Post Types and Meta FieldsCustom Post Types and Meta Fields
Custom Post Types and Meta Fields
 
Zero to SOLID
Zero to SOLIDZero to SOLID
Zero to SOLID
 

More from Atwix

Igor Miniailo - Magento 2 API Design Best Practices
Igor Miniailo - Magento 2 API Design Best PracticesIgor Miniailo - Magento 2 API Design Best Practices
Igor Miniailo - Magento 2 API Design Best PracticesAtwix
 
Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...
Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...
Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...Atwix
 
Yaroslav Rogoza - Development Environment: Local or Remote?
Yaroslav Rogoza - Development Environment: Local or Remote?Yaroslav Rogoza - Development Environment: Local or Remote?
Yaroslav Rogoza - Development Environment: Local or Remote?Atwix
 
Magento 2 performance comparison in different environments by Yaroslav Rogoza...
Magento 2 performance comparison in different environments by Yaroslav Rogoza...Magento 2 performance comparison in different environments by Yaroslav Rogoza...
Magento 2 performance comparison in different environments by Yaroslav Rogoza...Atwix
 
Viacheslav Kravchuk. Working as a distributed company. Our journey. Meet Mage...
Viacheslav Kravchuk. Working as a distributed company. Our journey. Meet Mage...Viacheslav Kravchuk. Working as a distributed company. Our journey. Meet Mage...
Viacheslav Kravchuk. Working as a distributed company. Our journey. Meet Mage...Atwix
 
Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM
Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM
Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM Atwix
 
Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...
Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...
Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...Atwix
 
Владимир Дубина - Meet Magento Ukraine - Data consistency
Владимир Дубина - Meet Magento Ukraine - Data consistencyВладимир Дубина - Meet Magento Ukraine - Data consistency
Владимир Дубина - Meet Magento Ukraine - Data consistencyAtwix
 
Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...
Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...
Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...Atwix
 
Сергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в Magento
Сергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в MagentoСергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в Magento
Сергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в MagentoAtwix
 
Макс Екатериненко - Meet Magento Ukraine - Magento 2 Overview
Макс Екатериненко - Meet Magento Ukraine - Magento 2 OverviewМакс Екатериненко - Meet Magento Ukraine - Magento 2 Overview
Макс Екатериненко - Meet Magento Ukraine - Magento 2 OverviewAtwix
 
Александр Каранда - Meet Magento Ukraine - Реальность нереальных вещей
Александр Каранда - Meet Magento Ukraine - Реальность нереальных вещейАлександр Каранда - Meet Magento Ukraine - Реальность нереальных вещей
Александр Каранда - Meet Magento Ukraine - Реальность нереальных вещейAtwix
 
Антон Капля - Meet Magento Ukraine - Кодогенератор в Magento
Антон Капля - Meet Magento Ukraine - Кодогенератор в MagentoАнтон Капля - Meet Magento Ukraine - Кодогенератор в Magento
Антон Капля - Meet Magento Ukraine - Кодогенератор в MagentoAtwix
 
Анатолій Денис - Meet Magento Ukraine - Migration to Magento - mission possible
Анатолій Денис - Meet Magento Ukraine - Migration to Magento - mission possibleАнатолій Денис - Meet Magento Ukraine - Migration to Magento - mission possible
Анатолій Денис - Meet Magento Ukraine - Migration to Magento - mission possibleAtwix
 
Артем Кузнецов - Meet Magento Ukraine - инструменты для отдела поддержки, опы...
Артем Кузнецов - Meet Magento Ukraine - инструменты для отдела поддержки, опы...Артем Кузнецов - Meet Magento Ukraine - инструменты для отдела поддержки, опы...
Артем Кузнецов - Meet Magento Ukraine - инструменты для отдела поддержки, опы...Atwix
 
Александр Стельмах - Meet Magento Ukraine - Прибыльная e-mail рассылка за 5 ш...
Александр Стельмах - Meet Magento Ukraine - Прибыльная e-mail рассылка за 5 ш...Александр Стельмах - Meet Magento Ukraine - Прибыльная e-mail рассылка за 5 ш...
Александр Стельмах - Meet Magento Ukraine - Прибыльная e-mail рассылка за 5 ш...Atwix
 
Владимир Галика - Meet Magento Ukraine - Чудесный Новый Мир – почему продвиже...
Владимир Галика - Meet Magento Ukraine - Чудесный Новый Мир – почему продвиже...Владимир Галика - Meet Magento Ukraine - Чудесный Новый Мир – почему продвиже...
Владимир Галика - Meet Magento Ukraine - Чудесный Новый Мир – почему продвиже...Atwix
 
Александр Колб - Meet Magento Ukraine - психология потребления онлайн
Александр Колб - Meet Magento Ukraine - психология потребления онлайнАлександр Колб - Meet Magento Ukraine - психология потребления онлайн
Александр Колб - Meet Magento Ukraine - психология потребления онлайнAtwix
 
Елена Леонова - Meet Magento Ukraine - Трасформация в e-commerce с Magento
Елена Леонова - Meet Magento Ukraine - Трасформация в e-commerce с MagentoЕлена Леонова - Meet Magento Ukraine - Трасформация в e-commerce с Magento
Елена Леонова - Meet Magento Ukraine - Трасформация в e-commerce с MagentoAtwix
 
Thomas Fleck - Meet Magento Ukraine - How Magento and open source change the ...
Thomas Fleck - Meet Magento Ukraine - How Magento and open source change the ...Thomas Fleck - Meet Magento Ukraine - How Magento and open source change the ...
Thomas Fleck - Meet Magento Ukraine - How Magento and open source change the ...Atwix
 

More from Atwix (20)

Igor Miniailo - Magento 2 API Design Best Practices
Igor Miniailo - Magento 2 API Design Best PracticesIgor Miniailo - Magento 2 API Design Best Practices
Igor Miniailo - Magento 2 API Design Best Practices
 
Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...
Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...
Valeriy Nayda - Best Practices in Magento 2. Based on Multi Source Inventory ...
 
Yaroslav Rogoza - Development Environment: Local or Remote?
Yaroslav Rogoza - Development Environment: Local or Remote?Yaroslav Rogoza - Development Environment: Local or Remote?
Yaroslav Rogoza - Development Environment: Local or Remote?
 
Magento 2 performance comparison in different environments by Yaroslav Rogoza...
Magento 2 performance comparison in different environments by Yaroslav Rogoza...Magento 2 performance comparison in different environments by Yaroslav Rogoza...
Magento 2 performance comparison in different environments by Yaroslav Rogoza...
 
Viacheslav Kravchuk. Working as a distributed company. Our journey. Meet Mage...
Viacheslav Kravchuk. Working as a distributed company. Our journey. Meet Mage...Viacheslav Kravchuk. Working as a distributed company. Our journey. Meet Mage...
Viacheslav Kravchuk. Working as a distributed company. Our journey. Meet Mage...
 
Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM
Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM
Александр Смага, Юрий Муратов - Meet Magento Ukraine - Технический обзор OroCRM
 
Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...
Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...
Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...
 
Владимир Дубина - Meet Magento Ukraine - Data consistency
Владимир Дубина - Meet Magento Ukraine - Data consistencyВладимир Дубина - Meet Magento Ukraine - Data consistency
Владимир Дубина - Meet Magento Ukraine - Data consistency
 
Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...
Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...
Андрей Самиляк - Meet Magento Ukraine - Как мы играли в DevOps и как получилс...
 
Сергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в Magento
Сергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в MagentoСергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в Magento
Сергей Кибиткин - Meet Magento Ukraine - Что вы никогда не сделаете в Magento
 
Макс Екатериненко - Meet Magento Ukraine - Magento 2 Overview
Макс Екатериненко - Meet Magento Ukraine - Magento 2 OverviewМакс Екатериненко - Meet Magento Ukraine - Magento 2 Overview
Макс Екатериненко - Meet Magento Ukraine - Magento 2 Overview
 
Александр Каранда - Meet Magento Ukraine - Реальность нереальных вещей
Александр Каранда - Meet Magento Ukraine - Реальность нереальных вещейАлександр Каранда - Meet Magento Ukraine - Реальность нереальных вещей
Александр Каранда - Meet Magento Ukraine - Реальность нереальных вещей
 
Антон Капля - Meet Magento Ukraine - Кодогенератор в Magento
Антон Капля - Meet Magento Ukraine - Кодогенератор в MagentoАнтон Капля - Meet Magento Ukraine - Кодогенератор в Magento
Антон Капля - Meet Magento Ukraine - Кодогенератор в Magento
 
Анатолій Денис - Meet Magento Ukraine - Migration to Magento - mission possible
Анатолій Денис - Meet Magento Ukraine - Migration to Magento - mission possibleАнатолій Денис - Meet Magento Ukraine - Migration to Magento - mission possible
Анатолій Денис - Meet Magento Ukraine - Migration to Magento - mission possible
 
Артем Кузнецов - Meet Magento Ukraine - инструменты для отдела поддержки, опы...
Артем Кузнецов - Meet Magento Ukraine - инструменты для отдела поддержки, опы...Артем Кузнецов - Meet Magento Ukraine - инструменты для отдела поддержки, опы...
Артем Кузнецов - Meet Magento Ukraine - инструменты для отдела поддержки, опы...
 
Александр Стельмах - Meet Magento Ukraine - Прибыльная e-mail рассылка за 5 ш...
Александр Стельмах - Meet Magento Ukraine - Прибыльная e-mail рассылка за 5 ш...Александр Стельмах - Meet Magento Ukraine - Прибыльная e-mail рассылка за 5 ш...
Александр Стельмах - Meet Magento Ukraine - Прибыльная e-mail рассылка за 5 ш...
 
Владимир Галика - Meet Magento Ukraine - Чудесный Новый Мир – почему продвиже...
Владимир Галика - Meet Magento Ukraine - Чудесный Новый Мир – почему продвиже...Владимир Галика - Meet Magento Ukraine - Чудесный Новый Мир – почему продвиже...
Владимир Галика - Meet Magento Ukraine - Чудесный Новый Мир – почему продвиже...
 
Александр Колб - Meet Magento Ukraine - психология потребления онлайн
Александр Колб - Meet Magento Ukraine - психология потребления онлайнАлександр Колб - Meet Magento Ukraine - психология потребления онлайн
Александр Колб - Meet Magento Ukraine - психология потребления онлайн
 
Елена Леонова - Meet Magento Ukraine - Трасформация в e-commerce с Magento
Елена Леонова - Meet Magento Ukraine - Трасформация в e-commerce с MagentoЕлена Леонова - Meet Magento Ukraine - Трасформация в e-commerce с Magento
Елена Леонова - Meet Magento Ukraine - Трасформация в e-commerce с Magento
 
Thomas Fleck - Meet Magento Ukraine - How Magento and open source change the ...
Thomas Fleck - Meet Magento Ukraine - How Magento and open source change the ...Thomas Fleck - Meet Magento Ukraine - How Magento and open source change the ...
Thomas Fleck - Meet Magento Ukraine - How Magento and open source change the ...
 

Recently uploaded

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Recently uploaded (20)

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

Сергей Иващенко - Meet Magento Ukraine - Цены в Magento 2

  • 1. Цены в Magento 2 Magento 2 Pricing Magento is an eBay Inc. company. © 2014 Magento, Inc. All rights reserved.
  • 2. О себе  Backend разработчик Magento  В Magento 2.5 года  Проэкты  Magento Testing Framework  Filesystem  Full Page Cache  Pricing  Service Layer  Сейчас занимаюсь  MTF Parallel Run и Magento 2 Sales © 2014 Magento, Inc. Page | 2
  • 3. Содержание  Стоимость широких возможностей  Реализация  Организация сущностей  Расширяемость  Итоги © 2014 Magento, Inc. Page | 3
  • 4. 1 Широкие возможности © 2014 Magento, Inc. Page | 4
  • 5. Разнообразие цен  Тип цены  Тип продукта  Скидки  Налоги  Настройки расчета  Настройки отображения © 2014 Magento, Inc. Page | 5 ~500 000
  • 6. <?php $_coreHelper = $this->helper('MagentoCoreHelperData'); $weeeHelper = $this->helper('MagentoWeeeHelperData'); $priceHelper = $this->helper('MagentoCatalogHelperProductPrice'); /* @var $_coreHelper MagentoCoreHelperData */ /* @var $weeeHelper MagentoWeeeHelperData */ /* @var $priceHelperMagentoCatalogHelperProductPrice */ $_product = $this->getProduct(); $_storeId = $_product->getStoreId(); $_id = $_product->getId(); $_weeeSeparator = ''; $_simplePricesTax = ($priceHelper->displayPriceIncludingTax() || $priceHelper->displayBothPrices()); $_minimalPriceValue = $_product->getMinimalPrice(); $_minimalPrice = $priceHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax); ?> <?php $_weeeTaxAmount = $weeeHelper->getAmountForDisplay($_product); ?> <?php if ($weeeHelper->typeOfDisplay($_product, array(MagentoWeeeModelTax::DISPLAY_INCL_DESCR, MagentoWeeeModelTax::DISPLAY_EXCL_DESCR_INCL, 4))): ?> <?php $_weeeTaxAmount = $weeeHelper->getAmount($_product); ?> <?php $_weeeTaxAttributes = $weeeHelper->getProductWeeeAttributesForDisplay($_product); ?> <?php endif; ?> <?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?> <?php if ($weeeHelper->isTaxable() && !$priceHelper->priceIncludesTax($_storeId)): ?> <?php $_attributes = $weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?> <?php $_weeeTaxAmountInclTaxes = $weeeHelper->getAmountInclTaxes($_attributes); ?> <?php endif; ?> <div class="price-box"> <?php $_price = $priceHelper->getPrice($_product, $_product->getPrice()) ?> <?php $_regularPrice = $priceHelper->getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?> <?php $_finalPrice= $priceHelper->getPrice($_product, $_product->getFinalPrice()) ?> <?php $_finalPriceInclTax = $priceHelper->getPrice($_product, $_product->getFinalPrice(), true) ?> <?php $_weeeDisplayType = $weeeHelper->getPriceDisplayType(); ?> <?php if ($_finalPrice >= $_price): ?> <?php if ($priceHelper->displayBothPrices()): ?> <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?> </span> </span> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> </span> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?> </span> </span> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> <span class="weee">( <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <?php echo $_weeeSeparator; ?> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> <?php $_weeeSeparator = ' + '; ?> <?php endforeach; ?> )</span> </span> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?> </span> </span> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> <span class="weee">( <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <?php echo $_weeeSeparator; ?> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?> <?php $_weeeSeparator = ' + '; ?> <?php endforeach; ?> )</span> </span> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price, true, false) ?> </span> </span> <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <span class="weee"> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> </span> <?php endforeach; ?> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> </span> <?php else: ?> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php if ($_finalPrice == $_price): ?> <?php echo $_coreHelper->currency($_price, true, false) ?> <?php else: ?> <?php echo $_coreHelper->currency($_finalPrice, true, false) ?> <?php endif; ?> </span> © 2014 Magento, </span> Inc. Page | 6 <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?> </span> </span> <?php endif; ?> <?php else: ?> <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?> <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> </span> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?> <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> </span> <span class="weee">( <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <?php echo $_weeeSeparator; ?> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> <?php $_weeeSeparator = ' + '; ?> <?php endforeach; ?> )</span> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?> <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> </span> <span class="weee">( <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <?php echo $_weeeSeparator; ?> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute- >getTaxAmount(), true, true); ?> <?php $_weeeSeparator = ' + '; ?> <?php endforeach; ?> )</span> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?> <span class="regular-price"><?php echo $_coreHelper->currency($_price,true,true) ?></span><br /> <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <span class="weee"> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> </span> <?php endforeach; ?> <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> </span> <?php else: ?> <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php if ($_finalPrice== $_price): ?> <?php echo $_coreHelper->currency($_price, true, true) ?> <?php else: ?> <?php echo $_coreHelper->currency($_finalPrice, true, true) ?> <?php endif; ?> </span> <?php endif; ?> <?php endif; ?> <?php else: /* if ($_finalPrice == $_price): */ ?> <?php $_originalWeeeTaxAmount = $weeeHelper->getOriginalAmount($_product); ?> <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?> <p class="old-price"> <span class="price-label"><?php echo __('Regular Price:') ?></span> <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?> </span> </p> <?php if ($priceHelper->displayBothPrices()): ?> <p class="special-price"> <span class="price-label"><?php echo __('Special Price:') ?></span> <span class="price-excluding-tax"> <span class="label"><?phpecho __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?> </span> </span> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> </span> </p> <?php else: ?> <p class="special-price"> <span class="price-label"><?php echo __('Special Price:') ?></span> <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmountInclTaxes, true, false) ?> </span> </p> <?php endif; ?> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?> <p class="old-price"> <span class="price-label"><?php echo __('Regular Price:') ?></span> <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?> </span> </p> <p class="special-price"> <span class="price-label"><?php echo __('Special Price:') ?></span> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?> </span> </span> <span class="weee">( <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <?php echo $_weeeSeparator; ?> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> <?php $_weeeSeparator = ' + '; ?> <?php endforeach; ?> )</span> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> </span> </p> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?> <p class="old-price"> <span class="price-label"><?php echo __('Regular Price:') ?></span> <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?> </span> </p> <p class="special-price"> <span class="price-label"><?php echo __('Special Price:') ?></span> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?> </span> </span> <span class="weee">( <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <?php echo $_weeeSeparator; ?> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute- >getTaxAmount(), true, true); ?> <?php $_weeeSeparator = ' + '; ?> <?php endforeach; ?> )</span> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> </span> </p> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?> <p class="old-price"> <span class="price-label"><?php echo __('Regular Price:') ?></span> <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_regularPrice, true, false) ?> </span> </p> <p class="special-price"> <span class="price-label"><?php echo __('Special Price:') ?></span> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPrice, true, false) ?> </span> </span> <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <span class="weee"> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> </span> <?php endforeach; ?> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> </span> </p> <?php else: // excl. ?> <p class="old-price"> <span class="price-label"><?php echo __('Regular Price:') ?></span> <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_regularPrice, true, false) ?> </span> </p> <?php if ($priceHelper->displayBothPrices()): ?> <p class="special-price"> <span class="price-label"><?php echo __('Special Price:') ?></span> <span class="price-excluding-tax"> <span class="label"><?phpecho __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPrice, true, false) ?> </span> </span> <span class="price-including-tax"> <span class="label"><?phpecho __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?> </span> </span> </p> <?php else: ?> <p class="special-price"> <span class="price-label"><?php echo __('Special Price:') ?></span> <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPrice, true, false) ?> </span> </p> <?php endif; ?> <?php endif; ?> <?php endif; /* if ($_finalPrice == $_price): */ ?> <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?> <?php $_minimalPriceDisplayValue = $_minimalPrice; ?> <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?> <?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?> <?php endif; ?> <?php if ($this->getUseLinkForAsLowAs()):?> <a href="<?phpecho $_product->getProductUrl(); ?>" class="minimal-price-link"> <?php else:?> <span class="minimal-price-link"> <?php endif?> <span class="label"><?php echo __('As low as:') ?></span> <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_minimalPriceDisplayValue, true, false) ?> </span> <?php if ($this->getUseLinkForAsLowAs()):?> </a> <?php else:?> </span> <?php endif?> <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?> </div>
  • 7. Проблемы  Сложность  Темплейты  Javascript  Модулярность  Tax  Weee  И т. д.  Дубликаты © 2014 Magento, Inc. Page | 7
  • 8. Решения  Сложность  Концентрация работы с ценами в одном компоненте  Организация сущностей  Четкая граница между расчетом и отрисовкой  Модулярность  DI  Layout  “Adjustment”  Дубликаты © 2014 Magento, Inc. Page | 8
  • 9. 2 Реализация © 2014 Magento, Inc. Page | 9
  • 10. Общая схема © 2014 Magento, Inc. Page | 10
  • 11. Вычисление цены © 2014 Magento, Inc. Page | 11 getPriceInfo() getPrice($priceCode) getAmount () apply() 9.00 0.99 9.99
  • 12. Отображение цены render() render() apply() © 2014 Magento, Inc. Page | 12 toHtml() toHtml() toHtml()
  • 13. Фронт © 2014 Magento, Inc. Page | 13 Amounts Price Adjustments
  • 14. 3 Расширяемость © 2014 Magento, Inc. Page | 14
  • 15. Точки расширения  Layout (~ Template and Block Pool)  DI (~ Price and Adjustment Models Pool)  Параметры отображения © 2014 Magento, Inc. Page | 15
  • 16. Pricing layout Page layout © 2014 Magento, Inc. Page | 16 Pricing Render Block Pricing layout Bundle Special Price Configurable Price Tier Price PriceRenderPool & AdjustmentRenderPool
  • 17. Pricing layout fallback 1. Конкретный тип продукта и цены 2. Конкретный тип продукта 3. Конкретный тип цены 4. Стандартный class/template © 2014 Magento, Inc. Page | 17
  • 18. DI © 2014 Magento, Inc. Page | 18 Adjustments Pool Tax Price Pool Weee Special Price Custom Price
  • 19. Расширяемость 4х4 Pricing layout DI © 2014 Magento, Inc. Page | 19 Price Pool Adjustment Pool Price Render Pool Adjustment Render Pool
  • 20. +1. Параметры отображения  Указываются:  при обьявление сущностей так  при отрисовке конкретного блока цены  Доступны каждому блоку/темплейту  Примеры:  Zone (category, product)  Skip Adjustments  Include Container  Display Label © 2014 Magento, Inc. Page | 20
  • 21. 4 Итоги © 2014 Magento, Inc. Page | 21
  • 22. Итоги  Модулярность  Простота в применении  Широкие возможности конфигурации  Отсутствие дубликатов кода  Отсутствие вычислений в темплейтах © 2014 Magento, Inc. Page | 22
  • 23. <?php $_coreHelper = $this->helper('MagentoCoreHelperData'); $weeeHelper = $this->helper('MagentoWeeeHelperData'); $priceHelper = $this->helper('MagentoCatalogHelperProductPrice'); /* @var $_coreHelper MagentoCoreHelperData */ /* @var $weeeHelper MagentoWeeeHelperData */ /* @var $priceHelperMagentoCatalogHelperProductPrice */ $_product = $this->getProduct(); $_storeId = $_product->getStoreId(); $_id = $_product->getId(); $_weeeSeparator = ''; $_simplePricesTax = ($priceHelper->displayPriceIncludingTax() || $priceHelper->displayBothPrices()); $_minimalPriceValue = $_product->getMinimalPrice(); $_minimalPrice = $priceHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax); ?> <?php $_weeeTaxAmount = $weeeHelper->getAmountForDisplay($_product); ?> <?php if ($weeeHelper->typeOfDisplay($_product, array(MagentoWeeeModelTax::DISPLAY_INCL_DESCR, MagentoWeeeModelTax::DISPLAY_EXCL_DESCR_INCL, 4))): ?> <?php $_weeeTaxAmount = $weeeHelper->getAmount($_product); ?> <?php $_weeeTaxAttributes = $weeeHelper->getProductWeeeAttributesForDisplay($_product); ?> <?php endif; ?> <?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?> <?php if ($weeeHelper->isTaxable() && !$priceHelper->priceIncludesTax($_storeId)): ?> <?php $_attributes = $weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?> <?php $_weeeTaxAmountInclTaxes = $weeeHelper->getAmountInclTaxes($_attributes); ?> <?php endif; ?> <div class="price-box"> <?php $_price = $priceHelper->getPrice($_product, $_product->getPrice()) ?> <?php $_regularPrice = $priceHelper->getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?> <?php $_finalPrice= $priceHelper->getPrice($_product, $_product->getFinalPrice()) ?> <?php $_finalPriceInclTax = $priceHelper->getPrice($_product, $_product->getFinalPrice(), true) ?> <?php $_weeeDisplayType = $weeeHelper->getPriceDisplayType(); ?> <?php if ($_finalPrice >= $_price): ?> <?php if ($priceHelper->displayBothPrices()): ?> <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?> </span> </span> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> </span> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?> </span> </span> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> <span class="weee">( <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <?php echo $_weeeSeparator; ?> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> <?php $_weeeSeparator = ' + '; ?> <?php endforeach; ?> )</span> </span> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?> </span> </span> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> <span class="weee">( <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <?php echo $_weeeSeparator; ?> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?> <?php $_weeeSeparator = ' + '; ?> <?php endforeach; ?> )</span> </span> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price, true, false) ?> </span> </span> <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <span class="weee"> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> </span> <?php endforeach; ?> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> </span> <?php else: ?> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php if ($_finalPrice == $_price): ?> <?php echo $_coreHelper->currency($_price, true, false) ?> <?php else: ?> <?php echo $_coreHelper->currency($_finalPrice, true, false) ?> <?php endif; ?> </span> © 2014 Magento, </span> Inc. Page | 23 <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?> </span> </span> <?php endif; ?> <?php else: ?> <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?> <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> </span> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?> <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> </span> <span class="weee">( <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <?php echo $_weeeSeparator; ?> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> <?php $_weeeSeparator = ' + '; ?> <?php endforeach; ?> )</span> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?> <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> </span> <span class="weee">( <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <?php echo $_weeeSeparator; ?> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute- >getTaxAmount(), true, true); ?> <?php $_weeeSeparator = ' + '; ?> <?php endforeach; ?> )</span> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?> <span class="regular-price"><?php echo $_coreHelper->currency($_price,true,true) ?></span><br /> <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <span class="weee"> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> </span> <?php endforeach; ?> <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?> </span> <?php else: ?> <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php if ($_finalPrice== $_price): ?> <?php echo $_coreHelper->currency($_price, true, true) ?> <?php else: ?> <?php echo $_coreHelper->currency($_finalPrice, true, true) ?> <?php endif; ?> </span> <?php endif; ?> <?php endif; ?> <?php else: /* if ($_finalPrice == $_price): */ ?> <?php $_originalWeeeTaxAmount = $weeeHelper->getOriginalAmount($_product); ?> <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?> <p class="old-price"> <span class="price-label"><?php echo __('Regular Price:') ?></span> <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?> </span> </p> <?php if ($priceHelper->displayBothPrices()): ?> <p class="special-price"> <span class="price-label"><?php echo __('Special Price:') ?></span> <span class="price-excluding-tax"> <span class="label"><?phpecho __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?> </span> </span> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> </span> </p> <?php else: ?> <p class="special-price"> <span class="price-label"><?php echo __('Special Price:') ?></span> <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmountInclTaxes, true, false) ?> </span> </p> <?php endif; ?> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?> <p class="old-price"> <span class="price-label"><?php echo __('Regular Price:') ?></span> <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?> </span> </p> <p class="special-price"> <span class="price-label"><?php echo __('Special Price:') ?></span> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?> </span> </span> <span class="weee">( <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <?php echo $_weeeSeparator; ?> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> <?php $_weeeSeparator = ' + '; ?> <?php endforeach; ?> )</span> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> </span> </p> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?> <p class="old-price"> <span class="price-label"><?php echo __('Regular Price:') ?></span> <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?> </span> </p> <p class="special-price"> <span class="price-label"><?php echo __('Special Price:') ?></span> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?> </span> </span> <span class="weee">( <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <?php echo $_weeeSeparator; ?> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute- >getTaxAmount(), true, true); ?> <?php $_weeeSeparator = ' + '; ?> <?php endforeach; ?> )</span> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> </span> </p> <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?> <p class="old-price"> <span class="price-label"><?php echo __('Regular Price:') ?></span> <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_regularPrice, true, false) ?> </span> </p> <p class="special-price"> <span class="price-label"><?php echo __('Special Price:') ?></span> <span class="price-excluding-tax"> <span class="label"><?php echo __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPrice, true, false) ?> </span> </span> <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?> <span class="weee"> <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?> </span> <?php endforeach; ?> <span class="price-including-tax"> <span class="label"><?php echo __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?> </span> </span> </p> <?php else: // excl. ?> <p class="old-price"> <span class="price-label"><?php echo __('Regular Price:') ?></span> <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_regularPrice, true, false) ?> </span> </p> <?php if ($priceHelper->displayBothPrices()): ?> <p class="special-price"> <span class="price-label"><?php echo __('Special Price:') ?></span> <span class="price-excluding-tax"> <span class="label"><?phpecho __('Excl. Tax:') ?></span> <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPrice, true, false) ?> </span> </span> <span class="price-including-tax"> <span class="label"><?phpecho __('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?> </span> </span> </p> <?php else: ?> <p class="special-price"> <span class="price-label"><?php echo __('Special Price:') ?></span> <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_finalPrice, true, false) ?> </span> </p> <?php endif; ?> <?php endif; ?> <?php endif; /* if ($_finalPrice == $_price): */ ?> <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?> <?php $_minimalPriceDisplayValue = $_minimalPrice; ?> <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?> <?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?> <?php endif; ?> <?php if ($this->getUseLinkForAsLowAs()):?> <a href="<?phpecho $_product->getProductUrl(); ?>" class="minimal-price-link"> <?php else:?> <span class="minimal-price-link"> <?php endif?> <span class="label"><?php echo __('As low as:') ?></span> <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->currency($_minimalPriceDisplayValue, true, false) ?> </span> <?php if ($this->getUseLinkForAsLowAs()):?> </a> <?php else:?> </span> <?php endif?> <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?> </div>
  • 24. Код echo $this->getLayout() © 2014 Magento, Inc. Page | 24 ->getBlock('product.price.render') ->render('final_price', $product, $arguments);
  • 25. Фронт © 2014 Magento, Inc. Page | 25
  • 26. 5 © 2014 Magento, Inc. Page | 26 Q&A
  • 27. Спасибо! © 2014 Magento, Inc. Page | 27 Контакты: email: sivashchenko@ebay.com skype: serg.ivashchenko