Answer the question
In order to leave comments, you need to log in
How to assign values to a property of an object with this structure?
object -> $product. Its print_r :
....
[cache_default_attribute] =>
[category] =>
[webserviceParameters:protected] => Array
(
[objectMethods] => Array
(
[add] => addWs
[update] => updateWs
)
[objectNodeNames] => products
[fields] => Array
(
[id_manufacturer] => Array
(
[xlink_resource] => manufacturers
)
[id_supplier] => Array
(
[xlink_resource] => suppliers
)
[id_category_default] => Array
(
[xlink_resource] => categories
)
[new] => Array
(
)
[cache_default_attribute] => Array
(
)
[id_default_image] => Array
(
[getter] => getCoverWs
[setter] => setCoverWs
[xlink_resource] => Array
(
[resourceName] => images
[subResourceName] => products
)
)
[id_default_combination] => Array
(
[getter] => getWsDefaultCombination
[setter] => setWsDefaultCombination
[xlink_resource] => Array
(
[resourceName] => combinations
)
)
[id_tax_rules_group] => Array
(
[xlink_resource] => Array
(
[resourceName] => tax_rule_groups
)
)
[position_in_category] => Array
(
[getter] => getWsPositionInCategory
[setter] =>
)
[manufacturer_name] => Array
(
[getter] => getWsManufacturerName
[setter] =>
)
[quantity] => Array
(
[getter] =>
[setter] =>
)
[type] => Array
(
[getter] => getWsType
[setter] => setWsType
)
)
[associations] => Array
(
[categories] => Array
(
[resource] => category
[fields] => Array
(
[id] => Array
(
[required] => 1
)
)
)
[images] => Array
(
[resource] => image
[fields] => Array
(
[id] => Array
(
)
)
)
[combinations] => Array
(
[resource] => combinations
[fields] => Array
(
[id] => Array
(
[required] => 1
)
)
)
[product_option_values] => Array
(
[resource] => product_options_values
[fields] => Array
(
[id] => Array
(
[required] => 1
)
)
)
[product_features] => Array
(
[resource] => product_feature
[fields] => Array
(
[id] => Array
(
[required] => 1
)
[custom] => Array
(
[required] =>
)
[id_feature_value] => Array
(
[required] => 1
[xlink_resource] => product_feature_values
)
)
)
.....
$product->... = $znacheniya
Answer the question
In order to leave comments, you need to log in
Found a solution:
Product::addFeatureProductImport($id_product, $feat_id, $feat_value_id);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question