Skip to content

Commit

Permalink
Fix object could not be converted to int
Browse files Browse the repository at this point in the history
  • Loading branch information
luigifab committed Apr 16, 2023
1 parent e83b135 commit f741c88
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ protected function _prepareForm()
/** @var Mage_Catalog_Model_Product_Type_Configurable $productType */
$productType = $this->_getProduct()->getTypeInstance(true);
$usedAttributes = $productType->getUsedProductAttributes($this->_getProduct());
$usedAttributesIds = array_keys($usedAttributes);

/* Standard attributes */
foreach ($attributes as $attribute) {
Expand All @@ -67,7 +68,7 @@ protected function _prepareForm()
// If not applied to configurable
&& !in_array(Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE, $attribute->getApplyTo())
// If not used in configurable
&& !in_array($attribute->getId(), $usedAttributes))
&& !in_array($attribute->getId(), $usedAttributesIds))
// Or in additional
|| in_array($attributeCode, $attributesConfig['additional'])
) {
Expand Down

0 comments on commit f741c88

Please sign in to comment.