PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.14k stars 4.8k forks source link

`order_discounts` not available via WebServices #13394

Closed qtheuret closed 4 years ago

qtheuret commented 5 years ago

Describe the bug I have a connector Odoo <-> PrestaShop worked with PrestaShop 1.6.x. I tried to upgrade the connector to work with 1.7.x versions of PrestaShop, but with 1.7.x versions, the order_discounts is not available via WebServices, so my connector doesn't work.

To Reproduce Steps to reproduce the behavior:

  1. Go to Advanced Parameters > WebServices
  2. Create a new key
  3. In the Permissions settings, the order_discounts object is not available

Additionnal information PrestaShop version: 1.7.x

khouloudbelguith commented 5 years ago

Hi @qtheuret,

I manage to reproduce the issue with PS:1.7.5.1. This issue is added to our bug roadmap.

Thanks!

Quetzacoalt91 commented 5 years ago

As explained in the related PR, we won't bring back this class in the webservice as it was deprecated 7 years ago. New entrypoints have been added to cover the new class name from the API, we suggest to use them instead.

qtheuret commented 5 years ago

@Quetzacoalt91 As explained in the related PR, the order_cart_rule is not available in the Prestashop API. Can you tell me the name of the entrypoint to get order discounts ?

Quetzacoalt91 commented 5 years ago

Well, by looking at the two messages you posted on here and on the PR, it looks like there's probably something I misunderstood. If you're looking for cart rules associated to an order (= used), it seems difficult to find this data.

It would not change the PR being closed as you were anyway dealing with a deprecated class, but using the class OrderCartRule could help.

I'm reopening this issue, but as an improvement.

Daxtermania commented 4 years ago

Solved in

https://github.com/PrestaShop/PrestaShop/pull/16710