Giuseppe L. Posted September 26, 2015 Share Posted September 26, 2015 Hi all, i have an unusual problem with the webservice. When i use the function GET or POST for add a new Product, the system working correct. When i try to update (PUT) or delete (DELETE) a product present into db. The system return 404 Can you help me? Link to comment Share on other sites More sharing options...
JoelWebsites Posted September 26, 2015 Share Posted September 26, 2015 You will need to atleast show what type of code you are using to get this done.Please copy paste the code here so that we will understand better. Link to comment Share on other sites More sharing options...
Giuseppe L. Posted September 26, 2015 Author Share Posted September 26, 2015 Hi Joel, this is the code used Thanks. <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <product> <id>558</id> <id_manufacturer>22</id_manufacturer> <id_supplier></id_supplier> <id_category_default>483</id_category_default> <new></new> <cache_default_attribute></cache_default_attribute> <id_default_combination></id_default_combination> <id_tax_rules_group>1</id_tax_rules_group> <type></type> <id_shop_default>1</id_shop_default> <reference></reference> <supplier_reference></supplier_reference> <location></location> <width></width> <height></height> <depth></depth> <weight>1.250</weight> <quantity_discount></quantity_discount> <ean13>643</ean13> <upc></upc> <cache_is_pack></cache_is_pack> <cache_has_attachments></cache_has_attachments> <is_virtual></is_virtual> <on_sale></on_sale> <online_only></online_only> <ecotax></ecotax> <minimal_quantity></minimal_quantity> <price>18.2131</price> <wholesale_price></wholesale_price> <unity></unity> <unit_price_ratio></unit_price_ratio> <additional_shipping_cost></additional_shipping_cost> <customizable></customizable> <text_fields></text_fields> <uploadable_files></uploadable_files> <active>1</active> <redirect_type></redirect_type> <id_product_redirected></id_product_redirected> <available_for_order>1</available_for_order> <available_date></available_date> <condition></condition> <show_price>1</show_price> <indexed></indexed> <visibility></visibility> <advanced_stock_management></advanced_stock_management> <date_add></date_add> <date_upd></date_upd> <meta_description> <language id="1">Riesling 2014 Taschlerhof</language> </meta_description> <meta_keywords> <language id="1"></language> </meta_keywords> <meta_title> <language id="1">Riesling 2014 Taschlerhof</language> </meta_title> <link_rewrite> <language id="1">riesling</language> </link_rewrite> <name> <language id="1">Riesling </language> </name> <description> <language id="1">Colore giallo paglierino con leggeri riflessi verdi. Molto tipico nel suo bouquet netto e spiccato con delicate note fruttate (pesca, pera). Sapore vinoso dal fresco finale. L’acidità è armoniosamente legata alla struttura fruttata.</language> </description> <description_short> <language id="1">Delizioso e accattivante, ideale per avvicinarsi a questa varietà.</language> </description_short> <available_now> <language id="1"></language> </available_now> <available_later> <language id="1"></language> </available_later> <associations> <product_features> <product_feature><id>32</id><id_feature_value>20475</id_feature_value></product_feature> <product_feature><id>28</id><id_feature_value>580</id_feature_value></product_feature> <product_feature><id>29</id><id_feature_value>483</id_feature_value></product_feature> <product_feature><id>30</id><id_feature_value>672</id_feature_value></product_feature> <product_feature><id>31</id><id_feature_value>509</id_feature_value></product_feature> <product_feature><id>33</id><id_feature_value>20476</id_feature_value></product_feature> <product_feature><id>34</id><id_feature_value>20477</id_feature_value></product_feature> <product_feature><id>35</id><id_feature_value>20478</id_feature_value></product_feature> <product_feature><id>36</id><id_feature_value>20479</id_feature_value></product_feature> <product_feature><id>43</id><id_feature_value>20480</id_feature_value></product_feature> <product_feature><id>44</id><id_feature_value>20481</id_feature_value></product_feature> <product_feature><id>45</id><id_feature_value>696</id_feature_value></product_feature> <product_feature><id>41</id><id_feature_value>20482</id_feature_value></product_feature> <product_feature><id>40</id><id_feature_value>20483</id_feature_value></product_feature> </product_features> </associations> </product> </prestashop> Link to comment Share on other sites More sharing options...
JoelWebsites Posted September 26, 2015 Share Posted September 26, 2015 (edited) Are all the checkboxes checked for the webservice (PUT) or delete (DELETE)? You should see it in the webservice settings.404 means it is not able to find the file or not able to make the connection to the file..have you made sure that the link and everthying is correct? Here there are a few examples that will be useful. https://github.com/PrestaShop/PrestaShop-webservice-lib/tree/master/examples Edited September 26, 2015 by JoelWebsites (see edit history) Link to comment Share on other sites More sharing options...
Giuseppe L. Posted September 26, 2015 Author Share Posted September 26, 2015 Hi Joel, thanks for your reply. I try the PUT function with POSTMAN and when SEND the command i have immediately the 404. Link to comment Share on other sites More sharing options...
JoelWebsites Posted September 26, 2015 Share Posted September 26, 2015 (edited) Can you put the entire code (with the php) and not just the xml?..if thats fine. Or Message me the code so i may find it easier to check ...cannot understand looking at just half the code( just the xml)..thanks..is yur code structure same as shown in the example link? Edited September 26, 2015 by JoelWebsites (see edit history) Link to comment Share on other sites More sharing options...
Giuseppe L. Posted September 28, 2015 Author Share Posted September 28, 2015 Ok i solved. i hava add this line into .htaccess file. <Limit GET POST PUT DELETE HEAD OPTIONS> Order allow,deny Allow from all </Limit> <LimitExcept GET POST PUT DELETE HEAD OPTIONS> Order deny,allow Deny from all </LimitExcept> Now it's work correctly! Link to comment Share on other sites More sharing options...
JoelWebsites Posted September 28, 2015 Share Posted September 28, 2015 Awesome Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now