Advertisement
Guest User

Untitled

a guest
May 25th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. <?php
  2. namespace FooTireSearchBlock;
  3. class Main extends MagentoFrameworkViewElementTemplate
  4. {
  5. protected $productCollectionFactory;
  6.  
  7. public function __construct(
  8. MagentoFrameworkViewElementTemplateContext $context,
  9. MagentoCatalogModelResourceModelProductCollectionFactory $productCollectionFactory
  10. )
  11. {
  12. $this->productCollectionFactory = $productCollectionFactory;
  13. parent::__construct($context);
  14. }
  15.  
  16. function _prepareLayout(){
  17.  
  18. $collection = $this->productCollectionFactory->create();
  19. $product = $collection->load(21704);
  20. var_dump($product->getData());
  21.  
  22. exit;
  23. }
  24.  
  25. 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 }
  26. [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