Wednesday, November 27, 2024 7:00:28 AM
public class FeedManagerPlugin
{
public virtual string ReadAttributeValue(Product product, ProductAttributeCombination productAttributeCombination, string feedColumName, string typeFeed)
{
if (product.Sku.StartsWith("WN-") || product.Sku.StartsWith("WU-") || product.Sku.StartsWith("WR-") || product.Sku.StartsWith("WI-"))
return product.Sku.Substring(3);
else
return product.Sku;
}
}
<FeedAttribute>
<Id>15</Id>
<FeedCaption>Manufacturer Part Number (MPN)</FeedCaption>
<FeedName>mpn</FeedName>
<FieldNameCode>plugin:ReplaceWs</FieldNameCode>
<ConvertValues />
<CharsLimit>70</CharsLimit>
<Required>false</Required>
<IgnoreNullOrEmpty>false</IgnoreNullOrEmpty>
<UseCDATA>false</UseCDATA>
<ActionId>0</ActionId>
<AdvancedField>false</AdvancedField>
<RowSourceType>0</RowSourceType>
<AttributeControlType>0</AttributeControlType>
</FeedAttribute>