Jump to content

Search the Community

Showing results for tags 'Web Service'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Help and Support
    • PrestaShop Download
    • PrestaShop Addons
  • News and Announcements
    • PrestaShop news and releases
    • PrestaShop Beta
    • PrestaShop Blogs
    • PrestaShop Meetups
  • International community (English)
    • General topics
    • PrestaShop Merchants
    • PrestaShop Developers
    • Taxes, Translations & Laws
    • Community Modules and Themes
  • Forum francophone
    • Discussion générale
    • Aide et support communautaire
    • PrestaShop pour les marchands
    • PrestaShop pour les développeurs
    • Adaptation aux lois Québécoises
    • Modules et thèmes gratuits
    • Modules et thèmes payants
  • Foro en Español
    • Discusión general
    • Soporte de la comunidad y ayuda
    • Comerciantes PrestaShop
    • Desarrolladores PrestaShop
    • Módulos y plantillas gratuitas
  • Forum italiano
    • Forum generale
    • Aiuto e supporto della Community
    • Commercianti PrestaShop
    • Sviluppatori PrestaShop
    • Aspetti legali sull'eCommerce
    • Moduli e template gratuiti
  • Deutsches Forum
    • Generelle Fragen
    • Support und Hilfe aus der Community
    • e-Commerce/Versand-Handel mit Prestashop
    • Prestashop-Entwickler
    • Anpassung an deutsches Recht
    • Kostenlose Module und Templates
    • Generelle Fragen Copy
  • Nederlandstalig forum
    • Algemeen
    • Hulp en ondersteuning, van en voor de community
    • PrestaShop-winkeliers
    • PrestaShop-ontwikkelaars
    • Het aanpassen van PrestaShop
    • Gratis modules en templates
  • Fórum em Português
    • Fórum Geral
    • Ajuda e Suporte da Comunidade
    • Lojistas que utilizam o PrestaShop
    • Desenvolvedores PrestaShop
    • Legislação específica
    • Módulos e temas gratuitos
  • Polskie forum
    • Forum ogólne
    • Wsparcie i pomoc użytkowników
    • Oferty twórców PrestaShop
    • Deweloperzy PrestaShop
    • Darmowe Moduły i Szablony
  • Dansk forum
    • Generelt forum
    • Hjælp og support fra fællesskabet
    • PrestaShop for købmænd
    • PrestaShop for udviklere
    • Love og regler
    • Gratis moduler og temaer
  • České fórum
    • Instalasi, Konfigurasi dan upgrade
    • Obecná diskuze
    • Bezplatné moduly a šablony
    • PrestaShop vývojáři
    • PrestaShop obchodníci
  • Bahasa Indonesia
    • Diskusi Umum
    • Podpora a pomoc komunity
    • Laporan Bug
    • Jasa, Promosi & Lowongan Kerja
  • Svenskt forum
    • Allmän diskussion
    • Installation, konfigurering och uppdatering
  • Forumul românesc
    • Discuţii generale
    • Instalare, configurare şi upgrade
  • Pусский язык
    • Обсуждение скрипта
    • Установка, Настройка, Обновление
    • Прием багов
  • Slovenské fórum
    • Všeobecná diskusia
    • Podpora a pomoc komunity
    • PrestaShop obchodníci
    • PrestaShop vývojári
    • Bezplatné moduly a šablóny
  • Türkçe Topluluğu
    • Genel Konular
    • Topluluk desteği ve yardım
    • PrestaShop Tüccarları
    • Prestashop Geliştiricileri
    • Ücretsiz Modül ve Temalar
  • Diễn đàn tiếng Việt
    • Thảo luận chung
    • Hỗ trợ từ cộng đồng
    • Dành cho chủ doanh nghiệp / cửa hàng
    • Dành cho lập trình viên
  • PrestaShop Communities
    • اللغه العربيه [Arabic]
    • Ελληνικά [Greek]
    • עִבְרִית [Hebrew]
    • 中文
    • Magyar [Hungarian]
    • 日本語 [Japanese]
    • Lietuviškai [Lithuanian]
    • انجمن فارسی [Persian]
    • ไทย [Thai]
    • Malaysia [Malaysian]
    • Eesti [Estonian]
    • Slovenščina [Slovenian]
    • Српски [Serbian]
  • IP. Board Forum
    • IP. Board Forum Questions and Issues
  • Archive
    • Zapłać Moduły i Szablony [ARCHIVE]
    • Moduly, upravy a dizajn [ARCHIVE]
    • Phát triển và các mô-đun [ARCHIVE]
    • Yazılım, Modül ve Tema [ARCHIVE]
    • Модули, Шаблоны [ARCHIVE]
    • Module şi teme [ARCHIVE]
    • Pengembangan dan Modul [ARCHIVE]
    • Moduler och teman [ARCHIVE]
    • Ecommerce x PrestaShop [ARCHIVE BOARD]
    • Vývoj a moduly [ARCHIVE]
    • Kostenpflichtige Module, Templates [ARCHIVE]
    • Módulos y temas pagos [ARCHIVE]
    • Módulos e temas pagos [ARCHIVE]
    • Servizi commerciali [ARCHIVE]
    • Forum - Feedback Contributor
    • PrestaShop Cloud

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


  1. Hi, I found out there is a method to do stock update on multiple product with only one request. Maybe some of you already now the way but I didnt found it when I was searsching for. Solution : 1) Create a web request to "http://your.shop.url/api/stock_availables/1&display=[id,quantity]&io_format=JSON" with your optional credentials. 2) Use method="PUT" and ContentType="application/xml" 3) Add the following XML content : "<prestashop>\n" + " <stock_available>\n" + " <id>" + id_prod1 + "</id>\n" + " <id_product>" + id_prod1 + "</id_product>\n" + " <id_product_attribute>0</id_product_attribute>\n" + " <id_shop>1</id_shop>\n" + " <id_shop_group>0</id_shop_group>\n" + " <quantity>" + quantite1 + "</quantity>\n" + " <depends_on_stock>0</depends_on_stock>\n" + " <out_of_stock>" + (quantite1 == 0 ? 2 : 0) + "</out_of_stock>\n" + " <location></location>\n" + " </stock_available>\n" + " <stock_available>\n" + " <id>" + id_prod2 + "</id>\n" + " <id_product>" + id_prod2 + "</id_product>\n" + " <id_product_attribute>0</id_product_attribute>\n" + " <id_shop>1</id_shop>\n" + " <id_shop_group>0</id_shop_group>\n" + " <quantity>" + quantite2 + "</quantity>\n" + " <depends_on_stock>0</depends_on_stock>\n" + " <out_of_stock>" + (quantite2 == 0 ? 2 : 0) + "</out_of_stock>\n" + " <location></location>\n" + " </stock_available>\n" + "</prestashop>"; Or create it with a loop : private static string RequestXML(List<MyJson.Produit> list) { var xml = "<prestashop>\n"; foreach (var prod in list) { xml += " <stock_available>\n" + " <id>" + prod.web_id + "</id>\n" + " <id_product>" + prod.web_id + "</id_product>\n" + " <id_product_attribute>0</id_product_attribute>\n" + " <id_shop>1</id_shop>\n" + " <id_shop_group>0</id_shop_group>\n" + " <quantity>" + prod.quantite_commande + "</quantity>\n" + " <depends_on_stock>0</depends_on_stock>\n" + " <out_of_stock>" + (prod.quantite_commande == 0 ? 2 : 0) + "</out_of_stock>\n" + " <location></location>\n" + " </stock_available>\n"; } return xml+"</prestashop>"; } 4) Send the request and wait for response. 5) Split the string response and check if every product's stock as been updated. Performance : Using one request per product's stock 5 stock updated per second Using one request for all the product's stock : From <1second to up to 10 seconds depending on the numbrer of stocks to update With a good server and good connection. Before that, I was sending 250+ requests in 90 seconds to sync web stock with real stock in the shop. I really hope this will help someone.
  2. Good morning. I am trying to update the stock of the product combinations using the Prestashop api. I've been seeing in forums that an addition is made in the "stock_available" section of the products xml. The problem I have is that the ID of the combination to modify the stock does not appear. I add the structure of an example product. Thank you. <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <product> <id><![CDATA[271]]></id> <id_manufacturer xlink:href="https://xxxxx.com/api/manufacturers/15"><![CDATA[15]]></id_manufacturer> <id_supplier><![CDATA[0]]></id_supplier> <id_category_default xlink:href="https://xxxxx.com/api/categories/2"><![CDATA[2]]></id_category_default> <new></new> <cache_default_attribute><![CDATA[510]]></cache_default_attribute> <id_default_image notFilterable="true"></id_default_image> <id_default_combination xlink:href="https://xxxxx.com/api/combinations/510" notFilterable="true"><![CDATA[510]]></id_default_combination> <id_tax_rules_group xlink:href="https://xxxxx.com/api/tax_rule_groups/1"><![CDATA[1]]></id_tax_rules_group> <position_in_category notFilterable="true"><![CDATA[143]]></position_in_category> <manufacturer_name notFilterable="true"><![CDATA[Spiuk]]></manufacturer_name> <quantity notFilterable="true"><![CDATA[0]]></quantity> <type notFilterable="true"><![CDATA[simple]]></type> <id_shop_default><![CDATA[1]]></id_shop_default> <reference><![CDATA[MCANA173]]></reference> <supplier_reference></supplier_reference> <location></location> <width><![CDATA[0.000000]]></width> <height><![CDATA[0.000000]]></height> <depth><![CDATA[0.000000]]></depth> <weight><![CDATA[0.000000]]></weight> <quantity_discount><![CDATA[0]]></quantity_discount> <ean13></ean13> <isbn></isbn> <upc></upc> <cache_is_pack><![CDATA[0]]></cache_is_pack> <cache_has_attachments><![CDATA[0]]></cache_has_attachments> <is_virtual><![CDATA[0]]></is_virtual> <state><![CDATA[1]]></state> <additional_delivery_times><![CDATA[1]]></additional_delivery_times> <delivery_in_stock><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></delivery_in_stock> <delivery_out_stock><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></delivery_out_stock> <on_sale><![CDATA[0]]></on_sale> <online_only><![CDATA[0]]></online_only> <ecotax><![CDATA[0.000000]]></ecotax> <minimal_quantity><![CDATA[1]]></minimal_quantity> <low_stock_threshold><![CDATA[0]]></low_stock_threshold> <low_stock_alert><![CDATA[0]]></low_stock_alert> <price><![CDATA[0.000000]]></price> <wholesale_price><![CDATA[0.000000]]></wholesale_price> <unity></unity> <unit_price_ratio><![CDATA[0.000000]]></unit_price_ratio> <additional_shipping_cost><![CDATA[0.00]]></additional_shipping_cost> <customizable><![CDATA[0]]></customizable> <text_fields><![CDATA[0]]></text_fields> <uploadable_files><![CDATA[0]]></uploadable_files> <active><![CDATA[1]]></active> <redirect_type><![CDATA[301-category]]></redirect_type> <id_type_redirected><![CDATA[0]]></id_type_redirected> <available_for_order><![CDATA[1]]></available_for_order> <available_date><![CDATA[0000-00-00]]></available_date> <show_condition><![CDATA[0]]></show_condition> <condition><![CDATA[new]]></condition> <show_price><![CDATA[1]]></show_price> <indexed><![CDATA[1]]></indexed> <visibility><![CDATA[both]]></visibility> <advanced_stock_management><![CDATA[0]]></advanced_stock_management> <date_add><![CDATA[2020-12-17 10:43:34]]></date_add> <date_upd><![CDATA[2020-12-29 13:43:22]]></date_upd> <pack_stock_type><![CDATA[3]]></pack_stock_type> <meta_description><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></meta_description> <meta_keywords><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></meta_keywords> <meta_title><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></meta_title> <link_rewrite><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language></link_rewrite> <name><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language></name> <description><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></description> <description_short><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></description_short> <available_now><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></available_now> <available_later><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></available_later> <associations> <categories nodeType="category" api="categories"> <category xlink:href="https://xxxxx.com/api/categories/2"> <id><![CDATA[2]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/116"> <id><![CDATA[116]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/148"> <id><![CDATA[148]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/152"> <id><![CDATA[152]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/170"> <id><![CDATA[170]]></id> </category> </categories> <images nodeType="image" api="images"/> <combinations nodeType="combination" api="combinations"> <combination xlink:href="https://xxxxx.com/api/combinations/510"> <id><![CDATA[510]]></id> </combination> </combinations> <product_option_values nodeType="product_option_value" api="product_option_values"> <product_option_value xlink:href="https://xxxxx.com/api/product_option_values/1"> <id><![CDATA[1]]></id> </product_option_value> <product_option_value xlink:href="https://xxxxx.com/api/product_option_values/117"> <id><![CDATA[117]]></id> </product_option_value> </product_option_values> <product_features nodeType="product_feature" api="product_features"> <product_feature xlink:href="https://xxxxx.com/api/product_features/1"> <id><![CDATA[1]]></id> <id_feature_value xlink:href="https://xxxxx.com/api/product_feature_values/1"><![CDATA[1]]></id_feature_value> </product_feature> </product_features> <tags nodeType="tag" api="tags"/> <stock_availables nodeType="stock_available" api="stock_availables"> <stock_available xlink:href="https://xxxxx.com/api/stock_availables/913"> <id><![CDATA[913]]></id> <id_product_attribute><![CDATA[0]]></id_product_attribute> </stock_available> </stock_availables> <accessories nodeType="product" api="products"/> <product_bundle nodeType="product" api="products"/> </associations> </product> </prestashop>
  3. Hi, I am struggling to get the shipping cost of a carrier while products are in a cart. I've looked at /carts, /carriers, and etc but it doesn't seem to have any field relating to it's shipping cost. I am using this API on a remote server, so I can't edit the prestashop files to retrieve it. Please help me if you have any information regarding this. Any help is very much appreciated.
  4. Hi all, It seems strange, but as far as I see there is no way to set the carrier availability restriction for a product via web service of PS 1.6 (I am talking about what is stored in the ps_product_carrier table) It is not under api/products, not under api/carriers Any idea? Thank you,
  5. Hi all , This is my post in forum , i would like to know is there is any option to filter web service out put for category listing based on language id , below is my current xml out put. GET /itart/api/categories/4 HTTP/1.1 Authorization: Basic Host: 192.168.1.41 Accept: */* RETURN HTTP/1.1 200 OK Date: Wed, 13 Jun 2012 13:20:13 GMT Server: Apache/2.2.14 (Ubuntu) X-Powered-By: PrestaShop Webservice Access-Time: 1339593613 PSWS-Version: 1.4.8.2 Execution-Time: 0.005 Content-Sha1: Vary: Accept-Encoding Content-Length: 4838 Content-Type: text/xml;charset=utf-8 HTTP RETURN <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <category> <id><![CDATA[4]]></id> <id_parent xlink:href="http://192.168.1.41/itart/api/categories/1"><![CDATA[1]]></id_parent> <level_depth readonly="true"><![CDATA[1]]></level_depth> <nb_products_recursive not_filterable="true" readonly="true"><![CDATA[2]]></nb_products_recursive> <active><![CDATA[1]]></active> <name><language id="1" xlink:href="http://192.168.1.41/itart/api/languages/1"><![CDATA[Laptops]]></language><language id="2" xlink:href="http://192.168.1.41/itart/api/languages/2"><![CDATA[Portables]]></language><language id="3" xlink:href="http://192.168.1.41/itart/api/languages/3"><![CDATA[Portátiles]]></language><language id="5" xlink:href="http://192.168.1.41/itart/api/languages/5"><![CDATA[Laptop]]></language></name> <link_rewrite><language id="1" xlink:href="http://192.168.1.41/itart/api/languages/1"><![CDATA[laptops]]></language><language id="2" xlink:href="http://192.168.1.41/itart/api/languages/2"><![CDATA[portables-apple]]></language><language id="3" xlink:href="http://192.168.1.41/itart/api/languages/3"><![CDATA[portatiles-apple]]></language><language id="5" xlink:href="http://192.168.1.41/itart/api/languages/5"><![CDATA[laptop]]></language></link_rewrite> <meta_title><language id="1" xlink:href="http://192.168.1.41/itart/api/languages/1"><![CDATA[Apple laptops]]></language><language id="2" xlink:href="http://192.168.1.41/itart/api/languages/2"><![CDATA[Portables Apple]]></language><language id="3" xlink:href="http://192.168.1.41/itart/api/languages/3"><![CDATA[Portátiles Apple]]></language><language id="5" xlink:href="http://192.168.1.41/itart/api/languages/5"><![CDATA[laptop Apple]]></language></meta_title> <meta_description><language id="1" xlink:href="http://192.168.1.41/itart/api/languages/1"><![CDATA[Powerful and chic Apple laptops]]></language><language id="2" xlink:href="http://192.168.1.41/itart/api/languages/2"><![CDATA[portables apple puissants et design]]></language><language id="3" xlink:href="http://192.168.1.41/itart/api/languages/3"><![CDATA[portátiles apple poderoso y el diseño]]></language><language id="5" xlink:href="http://192.168.1.41/itart/api/languages/5"><![CDATA[Laptop Apple potenti ed eleganti]]></language></meta_description> <meta_keywords><language id="1" xlink:href="http://192.168.1.41/itart/api/languages/1"><![CDATA[Apple laptops MacBook Air]]></language><language id="2" xlink:href="http://192.168.1.41/itart/api/languages/2"><![CDATA[portables apple macbook air]]></language><language id="3" xlink:href="http://192.168.1.41/itart/api/languages/3"><![CDATA[portátiles apple macbook air]]></language><language id="5" xlink:href="http://192.168.1.41/itart/api/languages/5"><![CDATA[laptot Apple MacBook Air]]></language></meta_keywords> <description><language id="1" xlink:href="http://192.168.1.41/itart/api/languages/1"><![CDATA[The latest Intel processor, a bigger hard drive, plenty of memory, and even more new features all fit inside just one liberating inch. The new Mac laptops have the performance, power, and connectivity of a desktop computer. Without the desk part.]]></language><language id="2" xlink:href="http://192.168.1.41/itart/api/languages/2"><![CDATA[Le tout dernier processeur Intel, un disque dur plus spacieux, de la mémoire à profusion et d'autres nouveautés. Le tout, dans à peine 2,59 cm qui vous libèrent de toute entrave. Les nouveaux portables Mac réunissent les performances, la puissance et la connectivité d'un ordinateur de bureau. Sans la partie bureau.]]></language><language id="3" xlink:href="http://192.168.1.41/itart/api/languages/3"><![CDATA[El último procesador Intel, un disco duro más grande, con profusión de memoria y otras novedades. Todo en sólo 2,59 cm libres de cualquier obstrucción. Las nuevas portátiles Mac cumplir rendimiento, potencia y conectividad de una computadora de escritorio. Sin la parte del escritorio.]]></language><language id="5" xlink:href="http://192.168.1.41/itart/api/languages/5"><![CDATA[L'ultimissimo processore Intel, hard drive più ampio, moltissima memoria, e ancora più funzioni tutte inserite in 2,54 centimetri. I nuovi laptop Mac offrono le prestazioni, la potenza e la connettività di un computer da tavolo. Senza bisogno del tavolo.]]></language></description> <date_add readonly="true"><![CDATA[2012-06-07 14:40:49]]></date_add> <date_upd readonly="true"><![CDATA[2012-06-07 14:40:49]]></date_upd> <associations> <categories node_type="category"/> <products node_type="product"> <product xlink:href="http://192.168.1.41/itart/api/products/5"> <id><![CDATA[5]]></id> </product> <product xlink:href="http://192.168.1.41/itart/api/products/6"> <id><![CDATA[6]]></id> </product> </products> </associations> </category> </prestashop> Thanks in advance. Jijomon
  6. Hy, i have a problem. A have a problem, i find how to put a product into a cart but i dont know haw to put another product. $webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG); $xml = $webService->get(array('url' => PS_SHOP_PATH.'/api/carts?schema=blank')); /*Add details*/ $xml->cart->id_address_delivery = $_POST['id_address_delivery']; $xml->cart->id_address_invoice = $_POST['id_address_invoice']; $xml->cart->id_currency = $_POST['id_currency']; $xml->cart->id_customer = $_POST['id_customer']; $xml->cart->id_guest = $_POST['id_guest']; $xml->cart->id_lang = $_POST['id_lang']; $xml->cart->id_shop_group = $_POST['id_shop_group']; $xml->cart->id_shop = $_POST['id_shop']; $xml->cart->id_carrier = $_POST['id_carrier']; $xml->cart->recyclable = $_POST['recyclable']; $xml->cart->gift = $_POST['gift']; $xml->cart->mobile_theme = $_POST['mobile_theme']; $xml->cart->allow_seperated_package = $_POST['allow_seperated_package']; /*add prduct*/ $xml->cart->associations->cart_rows->cart_row->id_product = $_POST['id_product']; $xml->cart->associations->cart_rows->cart_row->id_product_attribute = $_POST['id_product_attribute']; $xml->cart->associations->cart_rows->cart_row->id_address_delivery = $_POST['id_address_delivery']; $xml->cart->associations->cart_rows->cart_row->quantity = $_POST['quantity']; $opt = array('resource' => 'carts'); $opt['postXml'] = $xml->asXML(); $xml = $webService->add($opt); i'm using "PSWebServiceLibrary.php" and basically i don't know how to create a new <cart_row> in a cart blank schema. <cart> <id></id> <id_address_delivery></id_address_delivery> <id_address_invoice></id_address_invoice> <id_currency></id_currency> <id_customer></id_customer> <id_guest></id_guest> <id_lang></id_lang> <id_shop_group></id_shop_group> <id_shop></id_shop> <id_carrier></id_carrier> <recyclable></recyclable> <gift></gift> <gift_message></gift_message> <mobile_theme></mobile_theme> <delivery_option></delivery_option> <secure_key></secure_key> <allow_seperated_package></allow_seperated_package> <date_add></date_add> <date_upd></date_upd> <associations> <cart_rows> <cart_row> <id_product></id_product> <id_product_attribute></id_product_attribute> <id_address_delivery></id_address_delivery> <quantity></quantity> </cart_row> </cart_rows> </associations> </cart> </prestashop> Thx.
  7. Buenos dias, Queria decir que estoy sincronizando (post, put) productos en prestashop 1.7 y me sale un problema al añadir productos con combinaciones. Cuando añado un producto X con combinaciones X1, X2 en la pagina del webservice /api/products/... y tengo bien creadas las combinaciones X1, X2, no me aparece los stocks_availables de X1 i X2. Entonces no puedo actualizar sú stock. Todo esto desde webservice. Solo desde el backoffice, cuando edito y guardo de nuevo el producto X ya existente, me aparecen los stocks availables de dichas combinaciones. Gracias.
  8. Buenos días. Estoy intentando actualizar el stock de las combinaciones de productos utilizando la api de Prestashop. He estado viendo en foros que se realiza una modificación en la sección "stock_available" del xml del producto. El problema que tengo es que no aparece el ID de la combinación para modificar el stock. Añado la estructura de un producto de ejemplo. Gracias. <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <product> <id><![CDATA[271]]></id> <id_manufacturer xlink:href="https://xxxxx.com/api/manufacturers/15"><![CDATA[15]]></id_manufacturer> <id_supplier><![CDATA[0]]></id_supplier> <id_category_default xlink:href="https://xxxxx.com/api/categories/2"><![CDATA[2]]></id_category_default> <new></new> <cache_default_attribute><![CDATA[510]]></cache_default_attribute> <id_default_image notFilterable="true"></id_default_image> <id_default_combination xlink:href="https://xxxxx.com/api/combinations/510" notFilterable="true"><![CDATA[510]]></id_default_combination> <id_tax_rules_group xlink:href="https://xxxxx.com/api/tax_rule_groups/1"><![CDATA[1]]></id_tax_rules_group> <position_in_category notFilterable="true"><![CDATA[143]]></position_in_category> <manufacturer_name notFilterable="true"><![CDATA[Spiuk]]></manufacturer_name> <quantity notFilterable="true"><![CDATA[0]]></quantity> <type notFilterable="true"><![CDATA[simple]]></type> <id_shop_default><![CDATA[1]]></id_shop_default> <reference><![CDATA[MCANA173]]></reference> <supplier_reference></supplier_reference> <location></location> <width><![CDATA[0.000000]]></width> <height><![CDATA[0.000000]]></height> <depth><![CDATA[0.000000]]></depth> <weight><![CDATA[0.000000]]></weight> <quantity_discount><![CDATA[0]]></quantity_discount> <ean13></ean13> <isbn></isbn> <upc></upc> <cache_is_pack><![CDATA[0]]></cache_is_pack> <cache_has_attachments><![CDATA[0]]></cache_has_attachments> <is_virtual><![CDATA[0]]></is_virtual> <state><![CDATA[1]]></state> <additional_delivery_times><![CDATA[1]]></additional_delivery_times> <delivery_in_stock><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></delivery_in_stock> <delivery_out_stock><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></delivery_out_stock> <on_sale><![CDATA[0]]></on_sale> <online_only><![CDATA[0]]></online_only> <ecotax><![CDATA[0.000000]]></ecotax> <minimal_quantity><![CDATA[1]]></minimal_quantity> <low_stock_threshold><![CDATA[0]]></low_stock_threshold> <low_stock_alert><![CDATA[0]]></low_stock_alert> <price><![CDATA[0.000000]]></price> <wholesale_price><![CDATA[0.000000]]></wholesale_price> <unity></unity> <unit_price_ratio><![CDATA[0.000000]]></unit_price_ratio> <additional_shipping_cost><![CDATA[0.00]]></additional_shipping_cost> <customizable><![CDATA[0]]></customizable> <text_fields><![CDATA[0]]></text_fields> <uploadable_files><![CDATA[0]]></uploadable_files> <active><![CDATA[1]]></active> <redirect_type><![CDATA[301-category]]></redirect_type> <id_type_redirected><![CDATA[0]]></id_type_redirected> <available_for_order><![CDATA[1]]></available_for_order> <available_date><![CDATA[0000-00-00]]></available_date> <show_condition><![CDATA[0]]></show_condition> <condition><![CDATA[new]]></condition> <show_price><![CDATA[1]]></show_price> <indexed><![CDATA[1]]></indexed> <visibility><![CDATA[both]]></visibility> <advanced_stock_management><![CDATA[0]]></advanced_stock_management> <date_add><![CDATA[2020-12-17 10:43:34]]></date_add> <date_upd><![CDATA[2020-12-29 13:43:22]]></date_upd> <pack_stock_type><![CDATA[3]]></pack_stock_type> <meta_description><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></meta_description> <meta_keywords><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></meta_keywords> <meta_title><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></meta_title> <link_rewrite><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[maillot-anatomic-m-c-hombre-2017-azul]]></language></link_rewrite> <name><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language></name> <description><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></description> <description_short><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[MAILLOT ANATOMIC M/C HOMBRE 2017 AZUL]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></description_short> <available_now><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></available_now> <available_later><language id="1" xlink:href="https://xxxxx.com/api/languages/1"><![CDATA[]]></language><language id="2" xlink:href="https://xxxxx.com/api/languages/2"><![CDATA[]]></language><language id="3" xlink:href="https://xxxxx.com/api/languages/3"><![CDATA[]]></language><language id="4" xlink:href="https://xxxxx.com/api/languages/4"><![CDATA[]]></language></available_later> <associations> <categories nodeType="category" api="categories"> <category xlink:href="https://xxxxx.com/api/categories/2"> <id><![CDATA[2]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/116"> <id><![CDATA[116]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/148"> <id><![CDATA[148]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/152"> <id><![CDATA[152]]></id> </category> <category xlink:href="https://xxxxx.com/api/categories/170"> <id><![CDATA[170]]></id> </category> </categories> <images nodeType="image" api="images"/> <combinations nodeType="combination" api="combinations"> <combination xlink:href="https://xxxxx.com/api/combinations/510"> <id><![CDATA[510]]></id> </combination> </combinations> <product_option_values nodeType="product_option_value" api="product_option_values"> <product_option_value xlink:href="https://xxxxx.com/api/product_option_values/1"> <id><![CDATA[1]]></id> </product_option_value> <product_option_value xlink:href="https://xxxxx.com/api/product_option_values/117"> <id><![CDATA[117]]></id> </product_option_value> </product_option_values> <product_features nodeType="product_feature" api="product_features"> <product_feature xlink:href="https://xxxxx.com/api/product_features/1"> <id><![CDATA[1]]></id> <id_feature_value xlink:href="https://xxxxx.com/api/product_feature_values/1"><![CDATA[1]]></id_feature_value> </product_feature> </product_features> <tags nodeType="tag" api="tags"/> <stock_availables nodeType="stock_available" api="stock_availables"> <stock_available xlink:href="https://xxxxx.com/api/stock_availables/913"> <id><![CDATA[913]]></id> <id_product_attribute><![CDATA[0]]></id_product_attribute> </stock_available> </stock_availables> <accessories nodeType="product" api="products"/> <product_bundle nodeType="product" api="products"/> </associations> </product> </prestashop>
  9. Hello! Please tell me how to filter products in the Web service according to combinations or characteristics? In a mobile application, you need to filter by color, how to do it through web services? Thanks!
  10. Bonjour, J'essaye de consommer le service web prestashop avec un logiciel type Curl. Le GET marche bien comme suis: GET ("https://domaine/api/customers/1?output_format=JSON", authenticate("FJ1T7FE6JVT8PHME5SK8D9A34RFDGT56","")) Par contre le POST ne marche pas: POST ("https://domaine/api/customers/1", authenticate("FJ1T7FE6JVT8PHME5SK8D9A34RFDGT56",""), body = body1, content_type("text/xml")) Le message d'erreur recu est le suivant: Response [https://domaine/api/customers/1] Date: 2019-08-07 14:01 Status: 400 Content-Type: text/xml;charset=utf-8 Size: 232 B <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <errors> <error> <code><![CDATA[41]]></code> <message><![CDATA[parameter "passwd" required]]></message> </error> </errors> </prestashop> La version de prestashop est 1.7.5.1 est tous les autres methodes d'authetication marchent pas (i.e. en incluant la ws_key dans l'url) Merci!
  11. Hi, how I could get the best sellers and more viewed product from Web Service? Actually, I'm getting all products from web service with this endpoint: https://xxxx.xx/api/products?display=full&ws_key=xxxxxxxx I can't see any field that tells me this The response is: "id": 2, "id_manufacturer": "1", "id_supplier": "0", "id_category_default": "2", "new": null, "cache_default_attribute": "9", "id_default_image": "21", "id_default_combination": "9", "id_tax_rules_group": "1", "position_in_category": "1", "manufacturer_name": "Studio Design", "quantity": "0", "type": "simple", "id_shop_default": "1", "reference": "demo_3", "supplier_reference": "", "location": "", "width": "0.000000", "height": "0.000000", "depth": "0.000000", "weight": "0.000000", "quantity_discount": "0", "ean13": "", "isbn": "", "upc": "", "cache_is_pack": "0", "cache_has_attachments": "0", "is_virtual": "0", "state": "1", "additional_delivery_times": "1", "delivery_in_stock": [ { "id": "1", "value": "" }, { "id": "2", "value": "" }, { "id": "3", "value": "" }, { "id": "4", "value": "" } ], "delivery_out_stock": [ { "id": "1", "value": "" }, { "id": "2", "value": "" }, { "id": "3", "value": "" }, { "id": "4", "value": "" } ], "on_sale": "0", "online_only": "0", "ecotax": "0.000000", "minimal_quantity": "1", "low_stock_threshold": null, "low_stock_alert": "0", "price": "35.900000", "wholesale_price": "0.000000", "unity": "", "unit_price_ratio": "0.000000", "additional_shipping_cost": "0.00", "customizable": "0", "text_fields": "0", "uploadable_files": "0", "active": "1", "redirect_type": "404", "id_type_redirected": "0", "available_for_order": "1", "available_date": "0000-00-00", "show_condition": "0", "condition": "new", "show_price": "1", "indexed": "1", "visibility": "both", "advanced_stock_management": "0", "date_add": "2019-02-15 17:00:00", "date_upd": "2019-02-15 17:00:00", "pack_stock_type": "3", "meta_description": [ { "id": "1", "value": "" }, { "id": "2", "value": "" }, { "id": "3", "value": "" }, { "id": "4", "value": "" } ], "meta_keywords": [ { "id": "1", "value": "" }, { "id": "2", "value": "" }, { "id": "3", "value": "" }, { "id": "4", "value": "" } ], "meta_title": [ { "id": "1", "value": "" }, { "id": "2", "value": "" }, { "id": "3", "value": "" }, { "id": "4", "value": "" } ], "link_rewrite": [ { "id": "1", "value": "brown-bear-printed-sweater" }, { "id": "2", "value": "brown-bear-printed-sweater" }, { "id": "3", "value": "brown-bear-printed-sweater" }, { "id": "4", "value": "brown-bear-printed-sweater" } ], "name": [ { "id": "1", "value": "Hummingbird printed sweater" }, { "id": "2", "value": "Hummingbird printed sweater" }, { "id": "3", "value": "Hummingbird printed sweater" }, { "id": "4", "value": "Hummingbird printed sweater" } ], "description": [ { "id": "1", "value": "<p><span style=\"font-size:10pt;font-family:Arial;font-style:normal;\"><span style=\"font-size:10pt;font-family:Arial;font-style:normal;\">Studio Design' PolyFaune collection features classic products with colorful patterns, inspired by the traditional japanese origamis. To wear with a chino or jeans. The sublimation textile printing process provides an exceptional color rendering and a color, guaranteed overtime.</span></span></p>" }, { "id": "2", "value": "<p><span style=\"font-size:10pt;font-family:Arial;font-style:normal;\"><span style=\"font-size:10pt;font-family:Arial;font-style:normal;\">Studio Design' PolyFaune collection features classic products with colorful patterns, inspired by the traditional japanese origamis. To wear with a chino or jeans. The sublimation textile printing process provides an exceptional color rendering and a color, guaranteed overtime.</span></span></p>" }, { "id": "3", "value": "<p><span style=\"font-size:10pt;font-family:Arial;font-style:normal;\"><span style=\"font-size:10pt;font-family:Arial;font-style:normal;\">Studio Design' PolyFaune collection features classic products with colorful patterns, inspired by the traditional japanese origamis. To wear with a chino or jeans. The sublimation textile printing process provides an exceptional color rendering and a color, guaranteed overtime.</span></span></p>" }, { "id": "4", "value": "<p><span style=\"font-size:10pt;font-family:Arial;font-style:normal;\"><span style=\"font-size:10pt;font-family:Arial;font-style:normal;\">Studio Design' PolyFaune collection features classic products with colorful patterns, inspired by the traditional japanese origamis. To wear with a chino or jeans. The sublimation textile printing process provides an exceptional color rendering and a color, guaranteed overtime.</span></span></p>" } ], "description_short": [ { "id": "1", "value": "<p><span style=\"font-size:10pt;font-family:Arial;font-style:normal;\">Regular fit, round neckline, long sleeves. 100% cotton, brushed inner side for extra comfort. </span></p>" }, { "id": "2", "value": "<p><span style=\"font-size:10pt;font-family:Arial;font-style:normal;\">Regular fit, round neckline, long sleeves. 100% cotton, brushed inner side for extra comfort. </span></p>" }, { "id": "3", "value": "<p><span style=\"font-size:10pt;font-family:Arial;font-style:normal;\">Regular fit, round neckline, long sleeves. 100% cotton, brushed inner side for extra comfort. </span></p>" }, { "id": "4", "value": "<p><span style=\"font-size:10pt;font-family:Arial;font-style:normal;\">Regular fit, round neckline, long sleeves. 100% cotton, brushed inner side for extra comfort. </span></p>" } ], "available_now": [ { "id": "1", "value": "" }, { "id": "2", "value": "" }, { "id": "3", "value": "" }, { "id": "4", "value": "" } ], "available_later": [ { "id": "1", "value": "" }, { "id": "2", "value": "" }, { "id": "3", "value": "" }, { "id": "4", "value": "" } ], "associations": { "categories": [ { "id": "2" }, { "id": "3" }, { "id": "5" } ], "images": [ { "id": "21" } ], "combinations": [ { "id": "9" }, { "id": "10" }, { "id": "11" }, { "id": "12" } ], "product_option_values": [ { "id": "1" }, { "id": "2" }, { "id": "3" }, { "id": "4" } ], "stock_availables": [ { "id": "2", "id_product_attribute": "0" }, { "id": "28", "id_product_attribute": "9" }, { "id": "29", "id_product_attribute": "10" }, { "id": "30", "id_product_attribute": "11" }, { "id": "31", "id_product_attribute": "12" } ] } }
  12. Hello, I´m trying to add a manufacturer image via WS but I receive this error: <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <errors> <error> <code><![CDATA[66]]></code> <message><![CDATA[unable to save this image]]></message> </error> </errors> </prestashop> I think that the image permissions is related with the problem: <manufacturers xlink:href="http://localhost/myweb/api/images/manufacturers" get="true" put="false" post="false" delete="false" head="true" upload_allowed_mimetypes="image/gif, image/jpg, image/jpeg, image/pjpeg, image/png, image/x-png"/> I am using a .NET program with PrestaSharp to update the manufacturers. You can find the source code from GitHub: https://github.com/E...von/PrestaSharp You can see the settings of my web service in the attached file. Thanks in advance.
  13. I want to embed code to connect to a web service on the button where you can pay, could you share the route to make the changes in the code?
  14. i have made a custom payment gateway module now i have create a web service and a WSDL so that the gateway provider can update the payment status in case the payment is successful or not. There is no help around for creating webservice for PS 1.7.
  15. Hello, I am developing the Windows Desktop application (.NET) which uses PrestaShop API for adding new products (for example). When I add only few products, the adding is relatively fast, but when I add more products to the shop, for example 1000 - 5000 products, the adding goes always slower and slower. For exaple: - adding 100 product to the empty shop (without pictures) takes about 40 seconds - adding 1000 products takes about 12 minutes - adding 2000 products takes about 36 minutes I don't know, if this is normal, or some bug, or is it possible to solve it by changing some parameters on server, or PrestaShop settings. I would like to have fast PrestaShop API with about 5000 products in shop. I tried to do tests on more webhostings and VPS, but everywhere is this problem similar. Thanks.
  16. Ciao a tutti, come faccio ad accedere alle API di prestashop? da backend sono andato in Advanced Parameters > Webservice , ne ho creato uno con la sua bella key ed ho dato qualche permesso di lettura e aggiornamento in products e stock_availables. navigando all'URL http://www.... /api mi dice: "www richiede un nome utente e una password. Il sito riporta: “Welcome to PrestaShop Webservice, please enter the authentication key as the login. No password required.” inserisco la mia key generata dal sito, ma continua a chiedermela e non succede nulla... cosa sbaglio? Grazie a tutti.
  17. I'm on Prestashop 1.6.1.6 I need to update the shipping_number of an order. For that I'm using: PUT to http://SN...7C@localhost:8888/prestashop1616/api/orders If I send: <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <order> <id>5</id> <shipping_number notFilterable="true">1234567890</shipping_number> </order> </prestashop> The response is: parameter "id_address_delivery" required ------- So apparently the request requires ALL the fields of the object, some of them are mandatory, which can be ok to some extent. But other that are not mandatory, if omitted, their values are cleared from the original data. To me that doesn't make much sense, it behaves as a POST and not as a PUT. Having to send ALL the data over is a needless risk in my opinion. Is this behaviour a bug of 1.6.1.6? Also this PUT create a new order_history object, which again I'm not sure it makes much sense.
  18. Bonjour à tous, J’aurai besoin de petits renseignements sur l’utilisation du web service sur Prestashop 1.6 et 1.7. Nous avons plusieurs boutiques physiques qui utilise des caisses enregistreuses (ERP & CRM) ces caisses gèrent nos produits, nos stocks, fichiers clients… Nous allons relier le serveur de nos caisses en web service avec Prestashop. Mais est ce que le web service va fonctionner dans les 2 sens… 1. Toutes les commandes de Prestashop devront remonter sur le serveur de nos caisses avec produit, nom client, adresse de livraison… (ça je ne pense pas que cela pose un problème car des sociétés d’expéditions utilise le web service pour récupérer ces infos) 2. Est-ce que via le web service nous pourrons automatiquement importer catégories et produits ? 3. Pour le stock et ces la que j’ai besoin de plus d’info, est ce que le stock fonctionnera dans les deux sens : si une commande sur PrestaShop que ça déstocke sur notre serveur de caisse et si vente en boutique déstocke sur Prestashop ? Avoir des stocks à jour en temps réel. Quand je vais dans le web service sur PrestaShop, la partie stock « Ajouter (Post) et Supprimer (Delete) sont grisé et je ne peux donc pas sélectionner ces options. Voilà ceci sont les interrogations les plus importante que j’ai, donc est ce que le web service me permettra de gérer ça ou me faut il un module spécifique pour synchro produits, stock… ? Merci d’avance pour vos réponses et surtout d’avoir pris le temps de lire. Bien à vous Yohann
  19. Bonjour, J'essaye d'interfacer mon ERP avec PrestaShop.1.7.2.0 J'arrive à envoyer les catégories (Famille d'article) ainsi que les produits. Quand j'envoie une modification d'article, tout se modifie bien sauf le prix ??? Y a t-il quelque chose de spéciale à faire pour modifier cette information ? Merci pour votre aide. JC Voici l'extrait du message que j'envoie : <?xml version="1.0" encoding="UTF-8" ?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <product> <id><![CDATA[23]]></id> <id_category_default xlink:href="http://www.monsite.com/shop/api/categories/95"><![CDATA[95]]></id_category_default> <id_tax_rules_group xlink:href="http://www.monsite.com/shop/api/tax_rule_groups/1"><![CDATA[1]]></id_tax_rules_group> <position_in_category notFilterable="true"><![CDATA[0]]></position_in_category> <type notFilterable="true"><![CDATA[simple]]></type> <id_shop_default><![CDATA[1]]></id_shop_default> <reference><![CDATA[TRI0000000029]]></reference> <supplier_reference><![CDATA[319]]></supplier_reference> <ean13><![CDATA[5425017852711]]></ean13> <upc/> <state><![CDATA[1]]></state> <on_sale><![CDATA[0]]></on_sale> <minimal_quantity><![CDATA[0]]></minimal_quantity> <price><![CDATA[38.429800]]></price> <unity><![CDATA[PCE]]></unity> <unit_price_ratio><![CDATA[1.000000]]></unit_price_ratio> <active><![CDATA[1]]></active> <show_price><![CDATA[1]]></show_price> <indexed><![CDATA[1]]></indexed> <date_add><![CDATA[2014-12-12 00:00:00]]></date_add> <link_rewrite> <language id="1" xlink:href="http://www.monsite.com/shop/api/languages/1"><![CDATA[pdt_TRI0000000029]]></language> </link_rewrite> <name> <language id="1" xlink:href="http://www.monsite.com/shop/api/languages/1"><![CDATA[FEU D'ARTIFICE MAXIMUM POTENTIAL 78 SHOTS]]></language> </name> <description> <language id="1" xlink:href="http://www.monsite.com/shop/api/languages/1"><![CDATA[<P>Type : Pavé<BR/>Nombre de coups : 78<BR/>Durée : 90 secondes<BR/>Nec : 495.20 gr<BR/>Hauteur : 40 m<BR/>Couleur : rouge, vert, pourpre<BR/>Effet : comètes, fleurs, pluie crépitante, crackling<BR/>Age minimum : 16 ans<BR/></P>]]></language> </description> <description_short> <language id="1" xlink:href="http://www.monsite.com/shop/api/languages/1"><![CDATA[<P>Le feux d'artice TRISTAR Maximum Potential est un pavé de 78<BR/>coups. Comètes, fleurs, pluies crépitantes, crackling ...<BR/>Un spectacle de 90 secondes pour le plaisir des yeux.<BR/><BR/>Inderdit aux enfants de moins 16 ans.<BR/></P>]]></language> </description_short> </product> </prestashop> Voici la réponse : <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <product> <id><![CDATA[23]]></id> <id_manufacturer></id_manufacturer> <id_supplier></id_supplier> <id_category_default xlink:href="http://www.monsite.com/shop/api/categories/95"><![CDATA[95]]></id_category_default> <new></new> <cache_default_attribute></cache_default_attribute> <id_default_image notFilterable="true"></id_default_image> <id_default_combination notFilterable="true"></id_default_combination> <id_tax_rules_group xlink:href="http://www.monsite.com/shop/api/tax_rule_groups/1"><![CDATA[1]]></id_tax_rules_group> <position_in_category notFilterable="true"><![CDATA[0]]></position_in_category> <manufacturer_name notFilterable="true"></manufacturer_name> <quantity notFilterable="true"></quantity> <type notFilterable="true"><![CDATA[simple]]></type> <id_shop_default><![CDATA[1]]></id_shop_default> <reference><![CDATA[TRI0000000029]]></reference> <supplier_reference><![CDATA[319]]></supplier_reference> <location></location> <width></width> <height></height> <depth></depth> <weight></weight> <quantity_discount></quantity_discount> <ean13><![CDATA[5425017852711]]></ean13> <isbn></isbn> <upc></upc> <cache_is_pack></cache_is_pack> <cache_has_attachments></cache_has_attachments> <is_virtual></is_virtual> <state><![CDATA[1]]></state> <on_sale><![CDATA[0]]></on_sale> <online_only></online_only> <ecotax></ecotax> <minimal_quantity><![CDATA[0]]></minimal_quantity> <price><![CDATA[39.2562]]></price> <wholesale_price></wholesale_price> <unity><![CDATA[PCE]]></unity> <unit_price_ratio><![CDATA[1.000000]]></unit_price_ratio> <additional_shipping_cost></additional_shipping_cost> <customizable></customizable> <text_fields></text_fields> <uploadable_files></uploadable_files> <active><![CDATA[1]]></active> <redirect_type></redirect_type> <id_type_redirected></id_type_redirected> <available_for_order></available_for_order> <available_date></available_date> <show_condition></show_condition> <condition><![CDATA[new]]></condition> <show_price><![CDATA[1]]></show_price> <indexed><![CDATA[1]]></indexed> <visibility><![CDATA[both]]></visibility> <advanced_stock_management></advanced_stock_management> <date_add><![CDATA[2014-12-12 00:00:00]]></date_add> <date_upd><![CDATA[2018-02-01 00:17:07]]></date_upd> <pack_stock_type></pack_stock_type> <meta_description><language id="1"></language></meta_description> <meta_keywords><language id="1"></language></meta_keywords> <meta_title><language id="1"></language></meta_title> <link_rewrite><language id="1" xlink:href="http://www.monsite.com/shop/api/languages/1"><![CDATA[pdt_TRI0000000029]]></language></link_rewrite> <name><language id="1" xlink:href="http://www.monsite.com/shop/api/languages/1"><![CDATA[FEU D'ARTIFICE MAXIMUM POTENTIAL 78 SHOTS]]></language></name> <description><language id="1" xlink:href="http://www.monsite.com/shop/api/languages/1"><![CDATA[<P>Type : Pavé<BR/>Nombre de coups : 78<BR/>Durée : 90 secondes<BR/>Nec : 495.20 gr<BR/>Hauteur : 40 m<BR/>Couleur : rouge, vert, pourpre<BR/>Effet : comètes, fleurs, pluie crépitante, crackling<BR/>Age minimum : 16 ans<BR/></P>]]></language></description> <description_short><language id="1" xlink:href="http://www.monsite.com/shop/api/languages/1"><![CDATA[<P>Le feux d'artice TRISTAR Maximum Potential est un pavé de 78<BR/>coups. Comètes, fleurs, pluies crépitantes, crackling ...<BR/>Un spectacle de 90 secondes pour le plaisir des yeux.<BR/><BR/>Inderdit aux enfants de moins 16 ans.<BR/></P>]]></language></description_short> <available_now><language id="1"></language></available_now> <available_later><language id="1"></language></available_later> <associations> <categories nodeType="category" api="categories"> <category xlink:href="http://www.monsite.com/shop/api/categories/95"> <id><![CDATA[95]]></id> </category> </categories> <images nodeType="image" api="images"/> <combinations nodeType="combination" api="combinations"/> <product_option_values nodeType="product_option_value" api="product_option_values"/> <product_features nodeType="product_feature" api="product_features"/> <tags nodeType="tag" api="tags"/> <stock_availables nodeType="stock_available" api="stock_availables"> <stock_available xlink:href="http://www.monsite.com/shop/api/stock_availables/68"> <id><![CDATA[68]]></id> <id_product_attribute><![CDATA[0]]></id_product_attribute> </stock_available> </stock_availables> <accessories nodeType="product" api="products"/> <product_bundle nodeType="product" api="products"/> </associations> </product> </prestashop>
  20. Hi, I try to devlop a very simple module to access my prestashop site in 1.6. My code is like this : require_once('PSWebServiceLibrary.php'); try { $webService = new PrestaShopWebservice('http://mysite/api/', 'XXXXXXXXXXXXXXXXXXXXXXXXXX', false); $xml = $webService->get(array('resource' => 'product_option_values')); //$opt['resource']= 'product_option_values'; //$xml = $webService->get($opt); } catch (PrestaShopWebserviceException $ex) { // Shows a message related to the error echo 'Other error: <br />' . $ex->getMessage(); } The module return bad request (err. 400) The web service works with URL : http://mysite.com/api/product_option_values What I am doing wrong ? Thanks for helping me. Jean-Marie
  21. Hello, a question : Can I consume an asp.net web service with my PrestaShop platform? thank you .
  22. How can I get the web service to return json instead of xml?
  23. Hi there, We are using two sites one is Prestashop and another one is an ASP.NET based site. Now we want to communicate Prestashop from ASP.NET site to add customers, products, list products and much more, We found a solution that Prestashop have inbuilt Webservices. We are currently host the prestashop in IIS7. Now we need to configure the webservice in prestashop to communicate with ASP.NET site. Can anyone tell me the procedure to setup webservice of prestashop in IIS7? Thanks in advance... We are using, Prestashop 1.4.1 version IIS 7.0 in windows server 2008 ASP.NET 2.0 Framework
  24. I'm trying to create a product on 1.6 web service but I'm getting this error. Anybody know how to fix it? $webService = new PrestaShopWebservice('http://presta.dev:8888', 'IJQ3F3EULJYS1EYSSDBB8EA4Y2K7RHSY', true); $opt = array('resource' => 'products'); $xml = $webService->get(array('url' => 'http://presta.dev:8888/api/products?schema=blank')); $resources = $xml->children()->children(); unset($resources->position_in_category); unset($resources->manufacturer_name); $resources->price = '1000'; $resources->active = '1'; $resources->link_rewrite = 'test-rewrite'; $resources->name = 'test name'; $resources->description = 'test description'; $resources->description_short = 'test short description'; $resources->associations = ''; $opt = array('resource' => 'products'); $opt['postXml'] = $xml->asXML(); $xml = $webService->add($opt); XML SENT xml=<?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <product> <id/> <id_manufacturer/> <id_supplier/> <id_category_default/> <new/> <cache_default_attribute/> <id_default_image/> <id_default_combination/> <id_tax_rules_group/> <type/> <id_shop_default/> <reference/> <supplier_reference/> <location/> <width/> <height/> <depth/> <weight/> <quantity_discount/> <ean13/> <upc/> <cache_is_pack/> <cache_has_attachments/> <is_virtual/> <on_sale/> <online_only/> <ecotax/> <minimal_quantity/> <price>1000</price> <wholesale_price/> <unity/> <unit_price_ratio/> <additional_shipping_cost/> <customizable/> <text_fields/> <uploadable_files/> <active>1</active> <redirect_type/> <id_product_redirected/> <available_for_order/> <available_date/> <condition/> <show_price/> <indexed/> <visibility/> <advanced_stock_management/> <date_add/> <date_upd/> <meta_description><language id="1"/><language id="2"/></meta_description> <meta_keywords><language id="1"/><language id="2"/></meta_keywords> <meta_title><language id="1"/><language id="2"/></meta_title> <link_rewrite>test-rewrite</link_rewrite> <name>test name</name> <description>test description</description> <description_short>test short description</description_short> <available_now><language id="1"/><language id="2"/></available_now> <available_later><language id="1"/><language id="2"/></available_later> <associations></associations> </product> </prestashop> RETURN HTTP BODY <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <errors> <error> <code><![CDATA[84]]></code> <message><![CDATA[Validation error: "Property Product->link_rewrite is empty"]]></message> </error> </errors> </prestashop>
  25. Bonjour, Je voudais savoir si c'est possible d'obtenir le détail des taxes pour une commande ou facture avec un appel au webservice de prestashop? (EX: /api/orders/1 ) En ce moment, je suis capable d'avoir le total des taxes pour une commande avec la soustraction suivante: total_paid_tax_incl(114.96$) - total_paid_tax_excl(100$) = tax(14.96$) Par contre, mes produits dans prestashop utilisent une règle de taxe qui contient 2 taxes. J'aimerais avoir le total de taxe séparé par taxe dans ma commande. Exemple: taxe1 = 5$ taxe2 = 9.96$ Je me doute bien que ce n'est pas possible directement dans la commande mais, connaisez-vous une manière détournée d'obtenir la valeur de chaque taxe en questionnant d'autres tables disponibles du webservice (EX: products; taxes; tax_rule_groups; addresses; etc.)? C'est bien important de passer uniquement par le webservice. Pas de modification possible du PHP de PrestasShop. Merci, Sébastien.
×
×
  • Create New...