コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function execute()
 {
     parent::beforeExecute();
     $magentoAttributes = $this->webservice->getAllAttributes();
     foreach ($magentoAttributes as $attribute) {
         $this->cleanAttribute($attribute, $magentoAttributes);
     }
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function execute()
 {
     parent::beforeExecute();
     $magentoOptions = $this->webservice->getAllAttributesOptions();
     foreach ($magentoOptions as $attributeCode => $options) {
         $attribute = $this->getAttribute($attributeCode);
         $this->cleanOptions($options, $attribute);
     }
 }
コード例 #3
0
 /**
  * {@inheritdoc}
  */
 public function execute()
 {
     parent::beforeExecute();
     $magentoFamilies = $this->webservice->getAttributeSetList();
     foreach ($magentoFamilies as $name => $id) {
         try {
             $this->handleFamilyNotInPimAnymore($name, $id);
         } catch (SoapCallException $e) {
             throw new InvalidItemException($e->getMessage(), [$name]);
         }
     }
 }
コード例 #4
0
 /**
  * {@inheritdoc}
  */
 public function execute()
 {
     parent::beforeExecute();
     $magentoCategories = $this->webservice->getCategoriesStatus();
     foreach ($magentoCategories as $category) {
         if (!$this->categoryMappingManager->magentoCategoryExists($category['category_id'], $this->getSoapUrl()) && !($category['level'] === '0' || $category['level'] === '1')) {
             try {
                 $this->handleCategoryNotInPimAnymore($category);
             } catch (SoapCallException $e) {
                 throw new InvalidItemException($e->getMessage(), [json_encode($category)]);
             }
         }
     }
 }
コード例 #5
0
 /**
  * {@inheritdoc}
  */
 public function execute()
 {
     parent::beforeExecute();
     $magentoProducts = $this->webservice->getProductsStatus();
     $exportedProducts = $this->getExportedProductsSkus();
     $pimProducts = $this->getPimProductsSkus();
     foreach ($magentoProducts as $product) {
         try {
             if (AbstractNormalizer::MAGENTO_SIMPLE_PRODUCT_KEY === $product['type'] || in_array($product['type'], $this->productTypesNotHandledByPim)) {
                 if (!in_array($product['sku'], $pimProducts)) {
                     $this->handleProductNotInPimAnymore($product);
                 } elseif (!in_array($product['sku'], $exportedProducts)) {
                     $this->handleProductNotCompleteAnymore($product);
                 }
             }
         } catch (SoapCallException $e) {
             throw new InvalidItemException($e->getMessage(), [json_encode($product)]);
         }
     }
 }