Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CartConfiguration.php
Go to the documentation of this file.
1 <?php
11 
13 {
21  public function isProductConfigured(\Magento\Catalog\Model\Product $product, $config)
22  {
23  // If below POST fields were submitted - this is product's options, it has been already configured
24  switch ($product->getTypeId()) {
25  case \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE:
26  case \Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL:
27  return isset($config['options']);
28  case \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE:
29  return isset($config['bundle_option']);
30  }
31  return false;
32  }
33 }
isProductConfigured(\Magento\Catalog\Model\Product $product, $config)
$config
Definition: fraud_order.php:17