Jump to content

Is the quantity field now unsettable via webservice?


Recommended Posts

Good afternoon.

 

I've been using the webservice to insert products in my shop since around version 1.4.6.X, and I just realized that I can no longer change the quantity field of a product when I could before.

 

I get the following error:

 

"parameter "quantity" not writable. Please remove this attribute of this XML"

 

I checked and, certainly, the quantity field is no longer present in the XML when I request a blank schema.

 

Is this a mistake? Is there a different method now or am I no longer allowed to edit this field through webservice?

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...
  • 2 weeks later...
  • 2 weeks later...

I too am having this problem...any update?

..............

-per https://github.com/p...aster/CHANGELOG

 

what was changed was ...

Modified quantities to cancel (now taking ordered quantity instead of "1")

 

-I have no idea what changing to "cancel" means??

 

For now I have just commented out the "quantity" statement in my Import script.

 

Any help on alternatives?

Edited by axetone (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

I am having the same issue, I need to be able to edit quantity and price only using the web service API. But seems we can't. Any way to troubleshoot it? Have spent the whole morning trying to make this work.

 

 

 

 

I too am having this problem...any update?

..............

-per https://github.com/p...aster/CHANGELOG

 

what was changed was ...

Modified quantities to cancel (now taking ordered quantity instead of "1")

 

-I have no idea what changing to "cancel" means??

 

For now I have just commented out the "quantity" statement in my Import script.

 

Any help on alternatives?

Link to comment
Share on other sites

  • 5 months later...

SOLVED:

 

Pleas note that my script below is NOT something part of prestashop, and / unless you have something similar being used with an API, this may not make sense tot he average person. NOTE: I am using an API to pull data form my distributor, and then generaitng the XML output below.

 

(full background) - I was using 3 scripts to load data in prestashop. The first script went out to my distributor (via API) and pulled their product info (which I output into a simple XML file, see output of XML below...

 

The second script increased the "price"...(not important here, but all I did was parse the XML file, and anytime it found "price", I simply multiplied that value by my markup...i.e. price * 1.25), and re-output this into a SECOND XML file.

 

Anyway, in order to get the third script to import this data into prestashop I had to change "quantity" to "stock_available". I did this with a simple find & replace command. Once the "quantity" was changed to "stock_available", everything imported into prestashop fine.

I have only two gripes / complaints:

 

1. PHP is impossibly slow when using scripts for large amounts of data...we had a little over 17,000 products, so prestashop is great, but not for this many products....the only feasible way to import was with CSV file imports....as scripts took almost 2 days to complete!

 

2. My concern with prestashop was, why wasn't this change of "quantity" to "stock_avaialble" posted anywhere when Prestashop updated its software? I mean, seriously, there were LOT's of places that quantity could have been changed...and it wasn't just the one change, there are now three "stock_" type variables instead of one. It took a couple weeks to get prestashop to validate that this was the only one I'd need to change...that they now have three "stock_..." (whatever) values instead of just the old "quantity" value (which is a good and necessary thing of course).

 

 

Anyway, I hope this helps. XML file generated is as below; But I changed "quantity" to "stock_available".

 

 

 

<?xml version="1.0" encoding="UTF-8"?>

<ecioflow>

<products>

<product>

<column>

<name>partnumber</name>

<value>11111111</value>

</column>

<column>

<name>quantity</name>

<value>2</value>

</column>

<column>

<name>price</name>

<value>1.00</value>

</column>

<column>

<name>map</name>

<value>0.83</value>

</column>

<column>

<name>mfgitem</name>

<value>111ABC-XL</value>

</column>

<column>

<name>mfgname</name>

<value>Widget MFG Group</value>

</column>

<column>

<name>desc</name>

<value>Coolest widget on the market</value>

</column>

<column>

<name>name</name>

<value>Cool Widget</value>

</column>

<column>

<name>categoryid</name>

<value>14</value>

</column>

</product>

 

</products>

</ecioflow>

 

...) -the ecioflow was the end of the script.

Link to comment
Share on other sites

×
×
  • Create New...