Jump to content

Webservice - Adding custom product feature values


iipa

Recommended Posts

Hello fellow developers!

I am making a custom product import from customer's database into PrestaShop via webservice. I made a bunch of features into Back Office for all necessary product information. I've tried to investigate webservice documentation and API synopsis, but I haven't found how I can add custom feature values through webservice.

Blank product template gives following part for features:

"product_features": [{
    // feature id
    "id":null,
    // feature value id
    "id_feature_value":null
}]

Since it doesn't ask for feature value, but feature value ID, how can I add a custom value for product feature? Can I just add it into feature value id field and it generates it from there, or is it really so that all feature values have to be added before the product? I have over 10,000 products and one feature field can have tons of different values, including strings, so that would be a huuuge job to add all those values first. And since this import might be used more than once, how can I be sure that there won't be a value that is not already added into feature values?

Any insight would be highly appreciated!

Link to comment
Share on other sites

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...