Skip to content

Commit

Permalink
ENGCOM-3584: Sample Link Issue in Downloadable product in magento-2.2.6
Browse files Browse the repository at this point in the history
#19344 #19431

 - Merge Pull Request #19431 from ansari-krish/magento2:patch-2.2.6-19344
 - Merged commits:
   1. eed8485
   2. 99dbb54
   3. 29eea73
   4. 3b6307b
   5. e519bc6
  • Loading branch information
magento-engcom-team committed Nov 29, 2018
2 parents 65c9a58 + e519bc6 commit 871ddbb
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Magento\Downloadable\Api\Data\SampleInterfaceFactory;
use Magento\Downloadable\Api\Data\LinkInterfaceFactory;

/**
* Class for initialization downloadable info from request.
*/
class Downloadable
{
/**
Expand Down Expand Up @@ -92,6 +95,8 @@ public function afterInitialize(
}
}
$extension->setDownloadableProductLinks($links);
} else {
$extension->setDownloadableProductLinks([]);
}
if (isset($downloadable['sample']) && is_array($downloadable['sample'])) {
$samples = [];
Expand All @@ -107,6 +112,8 @@ public function afterInitialize(
}
}
$extension->setDownloadableProductSamples($samples);
} else {
$extension->setDownloadableProductSamples([]);
}
$product->setExtensionAttributes($extension);
if ($product->getLinksPurchasedSeparately()) {
Expand Down

0 comments on commit 871ddbb

Please sign in to comment.