Created
July 10, 2019 13:16
-
-
Save edavydova/ff8152c7c69fd2c40564f5b4fdcd68d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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