Bukimedia / PrestaSharp

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

Problem executing PUT #332

Closed ricardomls closed 5 years ago

ricardomls commented 6 years ago

[Prestashop 1.6.1.20 & IIS Server & PHP7] Hello. First of all I would like to congrats this project for its excellence.

I'm developing a VB.NET library to handle ERP new products and price/description update.

Creation and image deploy works fine, but when I'm trying to update an object, webservice answers with:

`<?xml version="1.0" encoding="utf-8"?>

2879 0 0 1 0 0 5407 1 1 0 simple 1 9997 0.000000 0.000000 0.000000 0.000000 0 0 0 0 0 0 0 0.000000 1 10 0.000000 0.000000 0.00 0 0 0 1 0 1 0000-00-00 0 new 1 1 both 0 2018-07-16 12:21:11 2018-07-16 11:58:39 0 novo-produto-primavera novo-produto-primavera Novo Produto Primavera Novo Produto Primavera 1 1 5407 2879 0 ` ` HttpStatusCode: InternalServerError ` Before the update call I execute this code: `Public Function UpdateProduto(produto As Produto) Dim dsearch = New Dictionary(Of String, String) Dim product As New Bukimedia.PrestaSharp.Entities.product dsearch.Add("reference", produto.reference) Dim list_products_web = pf.GetByFilter(dsearch, "", "") If list_products_web.Count > 0 Then product = New Bukimedia.PrestaSharp.Entities.product product = pf.Get(list_products_web(0).id) Try pf.Update(product) Catch ex As Exception Return -1 End Try Else product = New Bukimedia.PrestaSharp.Entities.product preencherProdutoNovo(produto, product) Try product = pf.Add(product) imgf.AddProductImage(product.id, Path_ + "semimagem.jpg") Catch ex As Exception Return -1 End Try End If Return product.id.ToString() End Function` I'm doing a full set of the object, not editing any property. Thanks for the help. CHEERS
biovolt commented 5 years ago

Try checking out the code using this commit 066ffbc49be441d894355031bdb21783ffb91254 and see if this solves our problem e.g. git checkout 066ffbc49be441d894355031bdb21783ffb91254

I think it is related to https://github.com/Bukimedia/PrestaSharp/issues/318

mowcixo commented 5 years ago

It should be fixed in v1.0.3 release. Please, try it and let me know.

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.