Uploaded image for project: 'PrestaShop 1.7'
  1. PrestaShop 1.7
  2. BOOM-3639

unit_price_ratio is not saved to database when creating products via the webservice

    Details

    • Type: Bug
    • Status: To Do
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.7.2.0, 1.7.4.0, 1.7.4.1
    • Fix Version/s: None
    • Component/s: Taxes and Prices
    • How to reproduce the issue ?:
      N/A
    • Tests & Expected Results:
      N/A
    • Documentation Change:
      N/A

      Description

      Good day,

      We've encountered a bug with the new 1.7.2 prestashop version.
      Before 1.7.2, we were completely unable to set the unit_price_ratio field on a product via the webservice (it would not be saved to the database) - fortunately, I found that you guys added a fix to 1.7.2 that would resolve this issue.

      The issue is resolved, but only halfway.

      Creating a new product via the webservice and specifying the unit_price_ratio does not save the field to the database, even though it returns it in the POST response.

      Updating a product via the webservice and specifying unit_price_ratio however works and saves it to the database, so the issue is specifically related to creating products via the webservice.

      Steps to reproduce:

      1. Create a product via the webservice and set the unit_price_ratio (for example to 45.454543) - (POST APIURL/api/products)
      2. Note that in the response from this POST, the unit_price_ratio will be set.
      3. Retrieve the product information via the webservice (GET APIURL/api/products/NEWPRODUCTID)
      4. Note that the unit_price_ratio is now 0, not the value specified in step 1.
      5. Update the product via the webservice and set the unit_price_ratio (for example to 45.454543) - (PUT APIURL/products/NEWPRODUCTID)
      6. Note that in the response from this PUT, the unit_price_ratio will be set.
      7. Retrieve the product information via the webservice (GET APIURL/api/products/NEWPRODUCTID)
      8. Note that the unit_price_ratio is now correct.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              CharlTruter Charl Truter
            • Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: