Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edavydova/ff8152c7c69fd2c40564f5b4fdcd68d6 to your computer and use it in GitHub Desktop.
Save edavydova/ff8152c7c69fd2c40564f5b4fdcd68d6 to your computer and use it in GitHub Desktop.
diff --git a/app/addons/rus_exim_1c/Tygh/Commerceml/RusEximCommerceml.php b/app/addons/rus_exim_1c/Tygh/Commerceml/RusEximCommerceml.php
index 1562a02..31fdd8d 100644
--- a/app/addons/rus_exim_1c/Tygh/Commerceml/RusEximCommerceml.php
+++ b/app/addons/rus_exim_1c/Tygh/Commerceml/RusEximCommerceml.php
@@ -3947,7 +3947,8 @@ class RusEximCommerceml
if ($xml_offer->{$cml['product_features']}->{$cml['product_feature']}) {
foreach ($xml_offer->{$cml['product_features']}->{$cml['product_feature']} as $feature) {
- $offer_feature_value = OfferFeatureValue::create((string) $feature->{$cml['id']}, (string) $feature->{$cml['value']});
+ $feature_id = !empty($feature->{$cml['id']}) ? $feature->{$cml['id']} : $feature->{$cml['name']};
+ $offer_feature_value = OfferFeatureValue::create((string) $feature_id, (string) $feature->{$cml['value']});
$offer_feature_value->setFeatureName((string) $feature->{$cml['name']});
$offer_feature_value->setVariantName((string) $feature->{$cml['value']});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment