i need problem with extension interface in magento2.
Mi extension_attributes.xml:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
<extension_attributes for="MagentoSalesRuleApiDataCouponGenerationSpecInterface">
<attribute code="specific" type="string" />
</extension_attributes>
</config>
Mi di.xml
<preference for="MagentoSalesRuleBlockAdminhtmlPromoQuoteEditTabCouponsForm"
type="CustomSalesRuleBlockAdminhtmlPromoQuoteEditTabCouponsForm" />
<preference for="MagentoSalesRuleHelperCoupon"
type="CustomSalesRuleHelperCoupon"/>
<preference for="MagentoSalesRuleModelServiceCouponManagementService"
type="CustomSalesRuleModelServiceCouponManagementService"/>
<preference for="MagentoSalesRuleModelCouponMassgenerator"
type="CustomSalesRuleModelCouponMassgenerator"/>
<preference for="MagentoSalesRuleModelDataCouponGenerationSpec"
type="CustomSalesRuleModelDataCouponGenerationSpec"/>
Mi model/data:
<?php
namespace CustomSalesRuleModelData;
class CouponGenerationSpec extends MagentoSalesRuleModelDataCouponGenerationSpec
{
const KEY_SPECIFIC = 'specific';
public function getSpecific()
{
return $this->_get(self::KEY_SPECIFIC);
}
public function setSpecific($specific)
{
return $this->setData(self::KEY_SPECIFIC, $specific);
}
}
The $specific return null ever. My CouponGenerationSpecExtensionInterface.php and CouponGenerationSpecExtension.php extended setSpecific y getSpecific but i never can enter in $specific.