Prestashop: REST API - Impossible to find right product when combination product is added in a pack

Created on 17 Jan 2019  路  5Comments  路  Source: PrestaShop/PrestaShop

Steps to Reproduce:

  1. Create a standard product with different combinations.
    image
  1. Create a pack of products and include any 1 product from the combinations
    image

  2. Use PrestaShop REST API to get the (pack of product) product.

In the response, under associations > product_bundle, I get Id of the standard product. But it is impossible to know which one of the combination was added.

image

Fixed Improvement Products Webservice

Most helpful comment

Unfortunately @ajayak, the core does not provide another API entrypoint for Pack details. If you absolutely need this information, you might need to implement your own entrypoint.

In the meanwhile, I created a PR for the next minor version which covers your needs: https://github.com/PrestaShop/PrestaShop/pull/12329

All 5 comments

Hi @ajayak,

Thanks for your report.
I have the same issue with PS1.7.5.0.
image
But it could be an improvement issue, to specify the exact combination for each product associated to the pack.
@colinegin, @marionf what do you think?
Thanks!

hi @ajayak,

The information is indeed missing, is just a miss. The data is well stored on select * from ps_pack ;

| id_product_pack | id_product_item | id_product_attribute_item | quantity |
+-----------------+-----------------+---------------------------+----------+
|              15 |               5 |                        19 |        5 |
|              15 |               7 |                         0 |        5 |
|              18 |              19 |                        40 |        1 |
|              18 |              19 |                        41 |        1 |
|              18 |              19 |                        42 |        1 |
+-----------------+-----------------+---------------------------+----------+

Thank you for your feedback. Don't hesitate to contribute by making a Pull Request if you have the technical skills. Otherwise, it will be done by our team in the next versions.

Hi @MatShir,

Is it possible to get this information from any other REST API?

Hi @ajayak,

I am afraid not.
@PrestaShop/prestashop-core-developers Is that correct?

Unfortunately @ajayak, the core does not provide another API entrypoint for Pack details. If you absolutely need this information, you might need to implement your own entrypoint.

In the meanwhile, I created a PR for the next minor version which covers your needs: https://github.com/PrestaShop/PrestaShop/pull/12329

Was this page helpful?
0 / 5 - 0 ratings