{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/7362","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/7362/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/7362/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/7362/events","html_url":"https://github.com/magento/magento2/issues/7362","id":188067885,"number":7362,"title":"Special price vigency for configurable childs (simple products associated) doesn´t work","user":{"login":"valenciaisaza","id":17551159,"avatar_url":"https://avatars.githubusercontent.com/u/17551159?v=3","gravatar_id":"","url":"https://api.github.com/users/valenciaisaza","html_url":"https://github.com/valenciaisaza","followers_url":"https://api.github.com/users/valenciaisaza/followers","following_url":"https://api.github.com/users/valenciaisaza/following{/other_user}","gists_url":"https://api.github.com/users/valenciaisaza/gists{/gist_id}","starred_url":"https://api.github.com/users/valenciaisaza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valenciaisaza/subscriptions","organizations_url":"https://api.github.com/users/valenciaisaza/orgs","repos_url":"https://api.github.com/users/valenciaisaza/repos","events_url":"https://api.github.com/users/valenciaisaza/events{/privacy}","received_events_url":"https://api.github.com/users/valenciaisaza/received_events","type":"User","site_admin":false},"labels":[{"id":429635502,"url":"https://api.github.com/repos/magento/magento2/labels/2.1.x","name":"2.1.x","color":"fbca04","default":false},{"id":21716835,"url":"https://api.github.com/repos/magento/magento2/labels/acknowledged","name":"acknowledged","color":"02d7e1","default":false},{"id":147131376,"url":"https://api.github.com/repos/magento/magento2/labels/bug%20report","name":"bug report","color":"d93f0b","default":false},{"id":374038437,"url":"https://api.github.com/repos/magento/magento2/labels/Catalog","name":"Catalog","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-08T18:28:08Z","updated_at":"2016-12-27T14:09:51Z","closed_at":null,"body":"Special price vigency for configurable child´s (simple products associated) doesn´t work\r\n\r\n\r\n### Preconditions\r\n1. Magento 2.1.2\r\n2. PHP 7.0.11\r\n\r\n### Steps to reproduce\r\n1. Create configurable product (I created a  color-configurable).\r\n2. Create his childs with different colors.\r\n3. Assign a Special price for one of teh simple´s, with the lower price of all.\r\n4. Put the vigency with both dates in past.\r\n\r\n### Expected result\r\n1. The Configurable price in the catalog and the product page is the lowest actual price (having the validity in consideration)\r\n\r\n### Actual result\r\n1. Shown the special price expired (because is the lowest)\r\n![image](https://cloud.githubusercontent.com/assets/17551159/20111408/d6bd99fa-a5c6-11e6-9d8d-b6517e9e707e.png)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/269330815","html_url":"https://github.com/magento/magento2/issues/7362#issuecomment-269330815","issue_url":"https://api.github.com/repos/magento/magento2/issues/7362","id":269330815,"user":{"login":"mauromm","id":5629108,"avatar_url":"https://avatars.githubusercontent.com/u/5629108?v=3","gravatar_id":"","url":"https://api.github.com/users/mauromm","html_url":"https://github.com/mauromm","followers_url":"https://api.github.com/users/mauromm/followers","following_url":"https://api.github.com/users/mauromm/following{/other_user}","gists_url":"https://api.github.com/users/mauromm/gists{/gist_id}","starred_url":"https://api.github.com/users/mauromm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauromm/subscriptions","organizations_url":"https://api.github.com/users/mauromm/orgs","repos_url":"https://api.github.com/users/mauromm/repos","events_url":"https://api.github.com/users/mauromm/events{/privacy}","received_events_url":"https://api.github.com/users/mauromm/received_events","type":"User","site_admin":false},"created_at":"2016-12-27T14:09:51Z","updated_at":"2016-12-27T14:09:51Z","body":"In Magento 2.1.3, the method getProducts() was moved to **Magento\\ConfigurableProduct\\Pricing\\Price\\LowestPriceOptionsProvider**\r\n\r\nTo patch it, you need to implement di.xml:\r\n\r\n```\r\n<?xml version=\"1.0\"?>\r\n<config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:ObjectManager/etc/config.xsd\">\r\n    <preference for=\"Magento\\ConfigurableProduct\\Pricing\\Price\\LowestPriceOptionsProvider\"\r\n                type=\"YourVendor\\YourModuleFixSpecialPrice\\Pricing\\Price\\LowestPriceOptionsProvider\" />\r\n</config>\r\n```\r\n\r\nAnd replace:\r\n\r\n ```\r\n   public function getProducts(ProductInterface $product)\r\n    {\r\n        $productIds = $this->resource->getConnection()->fetchCol(\r\n            '(' . implode(') UNION (', $this->linkedProductSelectBuilder->build($product->getId())) . ')'\r\n        );\r\n\r\n        $lowestPriceChildProducts = $this->collectionFactory->create()\r\n            ->addAttributeToSelect(['price', 'special_price','special_from_date', 'special_to_date'])\r\n            ->addIdFilter($productIds)\r\n            ->getItems();\r\n        return $lowestPriceChildProducts;\r\n    }\r\n```\r\n"}}
{"actor":{"display_login":"mauromm"}}