mcp2 Posted September 8, 2017 Share Posted September 8, 2017 (edited) Hi all, I started to play with Prestashop a few weeks ago, trying to integrate it via Webservice to a different database. It was quite complicated to understand the whole API with combinations and attribute_values and all, but I managed to crack it in the end. The products are being created with combinations and stocks, all good, nice and fluffy. My issue is now that whenever I'm trying to search one of these products via the search API, it doesn't show. If I enter the admin panel and make a change in the product via the admin panel, after that it will show in the search. Is it something wrong in the way i create the product? Am I missing some switch somewhere? Please see below the XML that is sent to the webservice to create the product. <?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>2</id_category_default> <new/> <cache_default_attribute/> <id_default_image/> <id_default_combination/> <id_tax_rules_group>1</id_tax_rules_group> <type/> <id_shop_default>1</id_shop_default> <reference>FRC</reference> <supplier_reference/> <location/> <width/> <height/> <depth/> <weight>100</weight> <quantity_discount/> <ean13/> <isbn/> <upc/> <cache_is_pack/> <cache_has_attachments/> <is_virtual></is_virtual> <state>1</state> <on_sale/> <online_only/> <ecotax/> <minimal_quantity>1</minimal_quantity> <price>0</price> <wholesale_price/> <unity/> <unit_price_ratio/> <additional_shipping_cost/> <customizable/> <text_fields/> <uploadable_files/> <active>1</active> <redirect_type>404</redirect_type> <id_type_redirected/> <available_for_order>1</available_for_order> <available_date>2017-09-08</available_date> <show_condition/> <condition>new</condition> <show_price>1</show_price> <indexed>1</indexed> <visibility>both</visibility> <advanced_stock_management>0</advanced_stock_management> <date_add/> <date_upd/> <pack_stock_type>3</pack_stock_type> <meta_description><language id="1"/></meta_description> <meta_keywords><language id="1"/></meta_keywords> <meta_title><language id="1">Fargesia robusta</language></meta_title> <link_rewrite><language id="1">fargesia-robustal</language></link_rewrite> <name><language id="1">Fargesia robusta</language></name> <description><language id="1"/></description> <description_short><language id="1"/></description_short> <available_now><language id="1"/></available_now> <available_later><language id="1"/></available_later> <associations> <categories> <category> <id/> </category> </categories> <images> <image> <id/> </image> </images> <combinations> <combination> <id/> </combination> </combinations> <product_option_values> <product_option_value> <id/> </product_option_value> </product_option_values> <product_features> <product_feature> <id/> <id_feature_value/> </product_feature> </product_features> <tags> <tag> <id/> </tag> </tags> <stock_availables> <stock_available> <id/> <id_product_attribute/> </stock_available> </stock_availables> <accessories> <product> <id/> </product> </accessories> <product_bundle> <product> <id/> <quantity/> </product> </product_bundle> </associations> <position_in_category>0</position_in_category> </product> </prestashop> Edited September 8, 2017 by mcp2 (see edit history) Link to comment Share on other sites More sharing options...
Scully Posted September 9, 2017 Share Posted September 9, 2017 Most important information is missing. Which prestashop version? Spoken for 1.6.1.10 and later I know that prestashop doesn't correctly build the index files for new products. This issue is not related to how the product is inserted. To overcome this in the version mentionned there is at least one update on a product needed so the index is in place. The faulty class is product.php. Link to comment Share on other sites More sharing options...
mcp2 Posted October 5, 2017 Author Share Posted October 5, 2017 Managed to find the issue. The version is 1.7.2 . It seems that a product must be associated with a category in order to be available in the catalogue. This was the information I was missing in the XML Most important information is missing. Which prestashop version? Spoken for 1.6.1.10 and later I know that prestashop doesn't correctly build the index files for new products. This issue is not related to how the product is inserted. To overcome this in the version mentionned there is at least one update on a product needed so the index is in place. The faulty class is product.php. Link to comment Share on other sites More sharing options...
Miguel Posted February 28, 2019 Share Posted February 28, 2019 Hello, I am encountering the same problem. Products show up on front end (search, categories, direct link) and i can also choose them from the backend to create orders and from a mass product editor module i have installed, but they wont show up on the order list -.- I read clearing cache on another post but that didnt help. Any ideas? Link to comment Share on other sites More sharing options...
Miguel Posted February 28, 2019 Share Posted February 28, 2019 Forgo to add, category info is set and products show up on front-end categories Link to comment Share on other sites More sharing options...
vad1 Posted October 18, 2019 Share Posted October 18, 2019 (edited) This error has been fixed in 1.7.6.0 https://assets.prestashop2.com/es/system/files/ps_releases/changelog_1.7.6.0.txt -> Note #11192 In Product.php class change Hook::exec('updateProduct', array('id_product' => (int) $this->id)); for Hook::exec('actionProductUpdate', array('id_product' => (int) $this->id)); Edited January 10, 2020 by vad1 (see edit history) 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