Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace FooTireSearchBlock;
- class Main extends MagentoFrameworkViewElementTemplate
- {
- protected $productCollectionFactory;
- public function __construct(
- MagentoFrameworkViewElementTemplateContext $context,
- MagentoCatalogModelResourceModelProductCollectionFactory $productCollectionFactory
- )
- {
- $this->productCollectionFactory = $productCollectionFactory;
- parent::__construct($context);
- }
- function _prepareLayout(){
- $collection = $this->productCollectionFactory->create();
- $product = $collection->load(21704);
- var_dump($product->getData());
- exit;
- }
- SELECT `e`.* FROM `catalog_product_entity` AS `e`array(11821) { [0]=> array(15) { ["entity_id"]=> string(5) "18710" ["attribute_set_id"]=> string(1) "4" ["type_id"]=> string(12) "configurable" ["sku"]=> string(9) "CONTI_DWS" ["has_options"]=> string(1) "0" ["required_options"]=> string(1) "0" ["created_at"]=> string(19) "2016-05-18 20:42:55" ["updated_at"]=> string(19) "2016-05-18 20:42:55" ["price"]=> string(8) "150.2900" ["tax_class_id"]=> string(1) "2" ["final_price"]=> string(8) "150.2900" ["minimal_price"]=> string(8) "150.2900" ["min_price"]=> string(8) "150.2900" ["max_price"]=> string(8) "150.2900" ["tier_price"]=> NULL }
- [1]=> array(15) { ["entity_id"]=> string(5) "18711" ["attribute_set_id"]=> string(1) "4" ["type_id"]=> string(12) "configurable" ["sku"]=> string(8) "DURATRAC" ["has_options"]=> string(1) "0" ["required_options"]=> string(1) "0" ["created_at"]=> string(19) "2016-05-18 20:42:55" ["updated_at"]=> string(19) "2016-05-18 20:42:55" ["price"]=> string(8) "185.9800" ["tax_class_id"]=> string(1) "2" ["final_price"]=> string(8) "185.9800" ["minimal_price"]=> string(8) "185.9800" ["min_price"]=> string(8) "185.9800" ["max_price"]=> string(8) "185.9800" ["tier_price"]=> NULL } ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement