Bukimedia / PrestaSharp

CSharp .Net client library for the PrestaShop API via web service
GNU General Public License v3.0
155 stars 151 forks source link

order_discounts not present on prestashop 1.7 #420

Open meriturva opened 3 years ago

meriturva commented 3 years ago

I'm migrating our integration based on PrestaSharp from PrestaShop 1.6 to PrestaShop 1.7.

What i found is that based on https://github.com/PrestaShop/PrestaShop/issues/13394 and https://github.com/PrestaShop/PrestaShop/pull/16710 there is no more order_discounts entity on webservice API.

Here we still have old plural entity name on orderCartRuleFactory https://github.com/Bukimedia/PrestaSharp/blob/b9fdeace3f5de79b64de39bebacfd47cd8e8193e/PrestaSharp/Factories/OrderCartRuleFactory.cs#L15 that actually it works correctly on 1.6.

So the main question here is how to get the order cart rule id from and order so we could use singularEntityName that it has the correct singular entity name on the latest PrestaSharp version. We could also define our custom order cart rule factory but I guess that PrestaSharp has to be compatible with PrestaShop 1.7 version.