Skip to content

Commit

Permalink
Fix bug in ProductDataMapper
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdifabio committed May 22, 2017
1 parent 7c484f0 commit 12aa7d6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Model/ProductDataMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class ProductDataMapper
private $attributeOptionCodeRepository;

const PRODUCT_ENTITY_TYPE_ID = 4;
const PRODUCT_ENTITY_TYPE_CODE = 'catalog_product';

public function __construct(
CodedOptionRepository $codedOptionRepository,
Expand Down Expand Up @@ -103,7 +102,7 @@ private function getOrCreateOptionId($attributeCode, $optionCode)
$codedOption = $this->codedOptionFactory->create()
->setValue($optionCode)
->setLabel($optionCode);
$this->codedOptionRepository->save(self::PRODUCT_ENTITY_TYPE_CODE, $attributeCode, $codedOption);
$this->codedOptionRepository->save(self::PRODUCT_ENTITY_TYPE_ID, $attributeCode, $codedOption);
$optionId = $this->attributeOptionCodeRepository
->getOptionId(self::PRODUCT_ENTITY_TYPE_ID, $attributeCode, $optionCode);
}
Expand Down

0 comments on commit 12aa7d6

Please sign in to comment.