Aladrial Posted January 17, 2018 Share Posted January 17, 2018 Hello,I would like to ask your help, perhaps someone has seen this problem:- Using web service I upload product groups, products and variations into Prestashop-Everything looks fine in the admin window. The groups, products and variations are created.-But at the end user window the new products cannot be seen among the New products and neither under the manufacturer.However on the page of the product the quantity and the manufacturer fields are filled-If I refresh a product manually then the product will be seen under the New products and under the manufacturer.The product upload code is this: $xml = $webService->get(array('url' => $shopurl.'api/products?schema=blank')); $product = $xml->children()->children(); $product->price = 0; $product->wholesale_price = 0; $product->active = 1; $product->on_sale = 0; $product->show_price = 1; $product->available_for_order = 1; $product->id_tax_rules_group = 1; $product->unity = $data->Termek_Csomagolasi_egyseg; $product->minimal_quantity = $data->Termek_MinimumKeszlet; $product->pack_stock_type = 3; $product->state = 1; $product->reference = $data->Termek_SajatCikkSzam; $product->id_manufacturer = $gyarto['id_manufacturer']; $product->name->language[0][0] = $data->Termek_Megnevezes; $product->name->language[0][0]['id'] = 1; $product->description->language[0][0] = $data->Termek_Megjegyzes; $product->description->language[0][0]['id'] = 1; $product->description_short->language[0][0] = $data->Termek_Megjegyzes; $product->description_short->language[0][0]['id'] = 1; $product->reference = $data->Termek_SajatCikkSzam; $product->associations->categories->addChild('category')->addChild('id', $csoport["id_category"]); $product->associations->categories->addChild('category')->addChild('id', $parent["id_parent"]); $product->id_category_default = $csoport["id_category"]; $product->associations->stock_availables->stock_available->quantity = $data->Termek_AktualisKeszlet; $opt = array('resource' => 'products'); $opt['postXml'] = $xml->asXML(); sleep(1); $xml = $webService->add($opt); $product = $xml->product; In the database the insert date and update date is good.It seems that after manuals refresh there is no change in the database regarding the product.The cache is switched off in the webshop.The question is why doesn't the product appear under the New products and under the manufacturer without manual refresh?The product can only be seen under its own category in the end user window.Thank you very much for your help! Link to comment Share on other sites More sharing options...
a17000 Posted January 18, 2018 Share Posted January 18, 2018 On 17/01/2018 at 9:52 AM, Aladrial said: $product->on_sale = 0; Link to comment Share on other sites More sharing options...
Aladrial Posted January 18, 2018 Author Share Posted January 18, 2018 15 minutes ago, a17000 said: Thanks, but this is not the solution for me. These products are not discounted products, so the on_sale is 0. The products are visible on the front page under their categories, but not in the new products and under the selected manufacturer, only after I manually update the product without any changes. After this, the on sale is 0 too. Link to comment Share on other sites More sharing options...
a17000 Posted January 29, 2018 Share Posted January 29, 2018 maybe it's a problem with " id_category_default " add a product with your function and add another product manually and compare in ps_product the two row 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