Jump to content
samnorr

Getting product customization values via webservice

Recommended Posts

I am using a custom integration via the REST webservice, and I simply need a way to get the associated customization values for an order detail line. But I can't find any way of doing this from the documentation or anywhere else online.

 

I am able to get ALL historical customization values for a particular product by using /api/customizations endpoint, but there does not seem to be a way to relate the customized_data_text_field elements to a particular order line?

 

Would greatly appreciate any advice.

Share this post


Link to post
Share on other sites

you have customization detail

api/customizations/NUMBER

you ve got the ws list in classe/webservice/webservicerequest.php

Share this post


Link to post
Share on other sites

Hey i have the same question, maybe samnorr find solution.

I need concrete customized_data_text_field value connected to concrete order.

gorgorbhey in api/customizations/NUMBER i have cart_id product_id customized_field and value BUT i have ALL values! Not only from cart_id.

When i bought this product twice in customizations/1 and customizations/2 i have TWO values connected to my product, but i need only one.

Share this post


Link to post
Share on other sites

Hey everybody,

I'm experiencing the same issue. Ordering the same product several times with different customization fields, the listing in the order history looks like this:

grafik.png.2191de0cbd1aaaaff87457c64fbc3a11.png

So there were three different quantities with different customization fields. But requesting this information from the API is not distinguished as required.

Getting the customization fields using

*/api/customizations?filter[id_cart]=244

returns as expected three different customization ids:

<prestashop>
  <customizations>
    <customization id="215" xlink:href="*/api/customizations/215"/>
    <customization id="216" xlink:href="*/api/customizations/216"/>
    <customization id="217" xlink:href="*/api/customizations/217"/>
  </customizations>
</prestashop>

If we request the links provided in this xml file, the result is not clear.

api/customizations/215
--
leads to
--
...omitted...
<id>215</id>
...omitted...
<quantity>2</quantity>
...omitted...
<associations>
  <customized_data_text_fields nodeType="customized_data_text_field" virtualEntity="true">
    <customized_data_text_field>
      <id_customization_field xlink:href="*/api/product_customization_fields/27">27</id_customization_field>
      <value>FranzOhneMail</value>
    </customized_data_text_field>
    <customized_data_text_field>
      <id_customization_field xlink:href="*/api/product_customization_fields/28">28</id_customization_field>
      <value>NurMail@test1.com</value>
    </customized_data_text_field>
    <customized_data_text_field>
      <id_customization_field xlink:href="*/api/product_customization_fields/27">27</id_customization_field>
      <value>Hubert</value>
    </customized_data_text_field>
    <customized_data_text_field>
      <id_customization_field xlink:href="*/api/product_customization_fields/28">28</id_customization_field>
      <value>hubert@test1.com</value>
    </customized_data_text_field>
  </customized_data_text_fields>
  <customized_data_images nodeType="customized_data_image" virtualEntity="true"/>
</associations>
...omitted...

And this is the same for each of the three requests, always containing all customized data text fields. The id and the quantity are correct, but you can't link the customization fields to the ids.

api/customizations/216
--
leads to
--
...omitted...
<id>216</id>
...omitted...
<quantity>3</quantity>
...omitted...
<associations>
  <customized_data_text_fields nodeType="customized_data_text_field" virtualEntity="true">
    <customized_data_text_field>
      <id_customization_field xlink:href="*/api/product_customization_fields/27">27</id_customization_field>
      <value>FranzOhneMail</value>
    </customized_data_text_field>
    <customized_data_text_field>
      <id_customization_field xlink:href="*/api/product_customization_fields/28">28</id_customization_field>
      <value>NurMail@test1.com</value>
    </customized_data_text_field>
    <customized_data_text_field>
      <id_customization_field xlink:href="*/api/product_customization_fields/27">27</id_customization_field>
      <value>Hubert</value>
    </customized_data_text_field>
    <customized_data_text_field>
      <id_customization_field xlink:href="*/api/product_customization_fields/28">28</id_customization_field>
      <value>hubert@test1.com</value>
    </customized_data_text_field>
  </customized_data_text_fields>
  <customized_data_images nodeType="customized_data_image" virtualEntity="true"/>
</associations>
...omitted...

Does anybody know a solution for this?

Best regards
Fis8

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More