|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct (\Magento\Framework\App\Helper\Context $context, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Model\Session $catalogSession, \Magento\Framework\Stdlib\StringUtils $string, Category $catalogCategory, Product $catalogProduct, \Magento\Framework\Registry $coreRegistry, \Magento\Catalog\Model\Template\Filter\Factory $templateFilterFactory, $templateFilterModel, \Magento\Tax\Api\Data\TaxClassKeyInterfaceFactory $taxClassKeyFactory, \Magento\Tax\Model\Config $taxConfig, \Magento\Tax\Api\Data\QuoteDetailsInterfaceFactory $quoteDetailsFactory, \Magento\Tax\Api\Data\QuoteDetailsItemInterfaceFactory $quoteDetailsItemFactory, \Magento\Tax\Api\TaxCalculationInterface $taxCalculationService, CustomerSession $customerSession, PriceCurrencyInterface $priceCurrency, ProductRepositoryInterface $productRepository, CategoryRepositoryInterface $categoryRepository, \Magento\Customer\Api\GroupRepositoryInterface $customerGroupRepository, \Magento\Customer\Api\Data\AddressInterfaceFactory $addressFactory, \Magento\Customer\Api\Data\RegionInterfaceFactory $regionFactory) | |
| setStoreId ($store) | |
| getBreadcrumbPath () | |
| getCategory () | |
| getProduct () | |
| getLastViewedUrl () | |
| splitSku ($sku, $length=30) | |
| getAttributeHiddenFields () | |
| getPriceScope () | |
| isPriceGlobal () | |
| isUsingStaticUrlsAllowed () | |
| isUrlDirectivesParsingAllowed () | |
| getPageTemplateProcessor () | |
| shouldDisplayProductCountOnLayer ($storeId=null) | |
| getTaxPrice ( $product, $price, $includingTax=null, $shippingAddress=null, $billingAddress=null, $ctc=null, $store=null, $priceIncludesTax=null, $roundPrice=true) | |
Public Member Functions inherited from AbstractHelper | |
| __construct (Context $context) | |
| isModuleOutputEnabled ($moduleName=null) | |
Data Fields | |
| const | PRICE_SCOPE_GLOBAL = 0 |
| const | PRICE_SCOPE_WEBSITE = 1 |
| const | XML_PATH_PRICE_SCOPE = 'catalog/price/scope' |
| const | CONFIG_USE_STATIC_URLS = 'cms/wysiwyg/use_static_urls_in_catalog' |
| const | CONFIG_PARSE_URL_DIRECTIVES = 'catalog/frontend/parse_url_directives' |
| const | XML_PATH_DISPLAY_PRODUCT_COUNT = 'catalog/layered_navigation/display_product_count' |
| const | CONTEXT_CATALOG_SORT_DIRECTION = 'catalog_sort_direction' |
| const | CONTEXT_CATALOG_SORT_ORDER = 'catalog_sort_order' |
| const | CONTEXT_CATALOG_DISPLAY_MODE = 'catalog_mode' |
| const | CONTEXT_CATALOG_LIMIT = 'catalog_limit' |
Protected Member Functions | |
| _isCategoryLink ($categoryId) | |
Protected Member Functions inherited from AbstractHelper | |
| _getRequest () | |
| _getModuleName () | |
| _getUrl ($route, $params=[]) | |
Catalog data helper
@api
@SuppressWarnings(PHPMD.TooManyFields) @SuppressWarnings(PHPMD.CouplingBetweenObjects)
| __construct | ( | \Magento\Framework\App\Helper\Context | $context, |
| \Magento\Store\Model\StoreManagerInterface | $storeManager, | ||
| \Magento\Catalog\Model\Session | $catalogSession, | ||
| \Magento\Framework\Stdlib\StringUtils | $string, | ||
| Category | $catalogCategory, | ||
| Product | $catalogProduct, | ||
| \Magento\Framework\Registry | $coreRegistry, | ||
| \Magento\Catalog\Model\Template\Filter\Factory | $templateFilterFactory, | ||
| $templateFilterModel, | |||
| \Magento\Tax\Api\Data\TaxClassKeyInterfaceFactory | $taxClassKeyFactory, | ||
| \Magento\Tax\Model\Config | $taxConfig, | ||
| \Magento\Tax\Api\Data\QuoteDetailsInterfaceFactory | $quoteDetailsFactory, | ||
| \Magento\Tax\Api\Data\QuoteDetailsItemInterfaceFactory | $quoteDetailsItemFactory, | ||
| \Magento\Tax\Api\TaxCalculationInterface | $taxCalculationService, | ||
| CustomerSession | $customerSession, | ||
| PriceCurrencyInterface | $priceCurrency, | ||
| ProductRepositoryInterface | $productRepository, | ||
| CategoryRepositoryInterface | $categoryRepository, | ||
| \Magento\Customer\Api\GroupRepositoryInterface | $customerGroupRepository, | ||
| \Magento\Customer\Api\Data\AddressInterfaceFactory | $addressFactory, | ||
| \Magento\Customer\Api\Data\RegionInterfaceFactory | $regionFactory | ||
| ) |
| \Magento\Framework\App\Helper\Context | $context | |
| \Magento\Store\Model\StoreManagerInterface | $storeManager | |
| \Magento\Catalog\Model\Session | $catalogSession | |
| \Magento\Framework\Stdlib\StringUtils | $string | |
| Category | $catalogCategory | |
| Product | $catalogProduct | |
| \Magento\Framework\Registry | $coreRegistry | |
| \Magento\Catalog\Model\Template\Filter\Factory | $templateFilterFactory | |
| string | $templateFilterModel | |
| \Magento\Tax\Api\Data\TaxClassKeyInterfaceFactory | $taxClassKeyFactory | |
| Config | $taxConfig | |
| \Magento\Tax\Api\Data\QuoteDetailsInterfaceFactory | $quoteDetailsFactory | |
| \Magento\Tax\Api\Data\QuoteDetailsItemInterfaceFactory | $quoteDetailsItemFactory | |
| \Magento\Tax\Api\TaxCalculationInterface | $taxCalculationService | |
| CustomerSession | $customerSession | |
| PriceCurrencyInterface | $priceCurrency | |
| ProductRepositoryInterface | $productRepository | |
| CategoryRepositoryInterface | $categoryRepository | |
| \Magento\Customer\Api\GroupRepositoryInterface | $customerGroupRepository | |
| \Magento\Customer\Api\Data\AddressInterfaceFactory | $addressFactory | |
| \Magento\Customer\Api\Data\RegionInterfaceFactory | $regionFactory | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 216 of file Data.php.
|
protected |
| getAttributeHiddenFields | ( | ) |
| getBreadcrumbPath | ( | ) |
| getCategory | ( | ) |
| getLastViewedUrl | ( | ) |
| getPageTemplateProcessor | ( | ) |
| getProduct | ( | ) |
| getTaxPrice | ( | $product, | |
| $price, | |||
$includingTax = null, |
|||
$shippingAddress = null, |
|||
$billingAddress = null, |
|||
$ctc = null, |
|||
$store = null, |
|||
$priceIncludesTax = null, |
|||
$roundPrice = true |
|||
| ) |
Get product price with all tax settings processing
| \Magento\Catalog\Model\Product | $product | |
| float | $price | inputted product price |
| bool | $includingTax | return price include tax flag |
| null | \Magento\Customer\Model\Address\AbstractAddress | $shippingAddress | |
| null | \Magento\Customer\Model\Address\AbstractAddress | $billingAddress | |
| null | int | $ctc | customer tax class |
| null | string | bool | int | \Magento\Store\Model\Store | $store | |
| bool | $priceIncludesTax | flag what price parameter contain tax |
| bool | $roundPrice |
Definition at line 524 of file Data.php.
| isUrlDirectivesParsingAllowed | ( | ) |
| isUsingStaticUrlsAllowed | ( | ) |
| setStoreId | ( | $store | ) |
| shouldDisplayProductCountOnLayer | ( | $storeId = null | ) |
| splitSku | ( | $sku, | |
$length = 30 |
|||
| ) |
| const CONFIG_PARSE_URL_DIRECTIVES = 'catalog/frontend/parse_url_directives' |
| const CONFIG_USE_STATIC_URLS = 'cms/wysiwyg/use_static_urls_in_catalog' |
| const CONTEXT_CATALOG_SORT_DIRECTION = 'catalog_sort_direction' |
| const XML_PATH_DISPLAY_PRODUCT_COUNT = 'catalog/layered_navigation/display_product_count' |