Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Currency i18n fields issue in webservice #17069

Merged
merged 2 commits into from Jan 10, 2020

Conversation

@atomiix
Copy link
Contributor

atomiix commented Jan 8, 2020

Questions Answers
Branch? 1.7.6.x
Description? Correctly show name and symbol in the xml output of the currency webservice and prevent updating those fields when updating the currency.
Type? bug fix
Category? WS
BC breaks? no
Deprecations? no
Fixed ticket? Fixes #16760
How to test? See below

How to test

  1. After enabling webservice in Advanced Parameters -> Webservice and adding a key with full access on the currency endpoint, send a GET request to /api/currencies?display=full. The field name and symbol should be present with the correct value.

  2. Send a PUT request on /api/currencies with the necessary XML body :

<?xml version="1.0" encoding="UTF-8"?>
<prestashop
  xmlns:xlink="http://www.w3.org/1999/xlink">
  <currency>
    <id><![CDATA[1]]></id>
    <iso_code><![CDATA[EUR]]></iso_code>
    <numeric_iso_code><![CDATA[978]]></numeric_iso_code>
    <precision><![CDATA[2]]></precision>
    <conversion_rate><![CDATA[1.000000]]></conversion_rate>
    <deleted><![CDATA[0]]></deleted>
    <active><![CDATA[1]]></active>
  </currency>
</prestashop>

In the database, the field name and symbol should not be empty in the ps_currency_lang table.


This change is Reviewable

@atomiix atomiix requested a review from PrestaShop/prestashop-core-developers as a code owner Jan 8, 2020
@Progi1984 Progi1984 added this to the 1.7.6.3 milestone Jan 8, 2020
Copy link
Contributor

Progi1984 left a comment

A small feedback

@Robin-Fischer-PS Robin-Fischer-PS self-assigned this Jan 10, 2020
@Progi1984 Progi1984 merged commit 90ee5fb into PrestaShop:1.7.6.x Jan 10, 2020
2 checks passed
2 checks passed
PrettyCI Code formatting
Details
Travis CI - Pull Request Build Passed
Details
@Progi1984

This comment has been minimized.

Copy link
Contributor

Progi1984 commented Jan 10, 2020

Thanks @atomiix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.