- Posts: 11
- Thank you received: 0
Removal of Products when importing CSV
Currently we are using Hikashop Products Cron Update Plugin to process our articles/products.
As we enabled the option delete products not in CSV you would expect that products will be removed/deleted from our shop.
The current format of the CSV is:
product_code|price_value|categories|categories_namekey|images|product_quantity|product_description|cxp_merknaam|product_name|product_sale_end|cxp_toepassing|cxp_materiaal|product_published|cxp_levertijd|cxp_normale_prijs
The importing is working as it should be!
The removal is however not working despite the configuration of the column names configurations:
Configuration of column names:
product_code:product_code|price_value:price_value|categories:categories|categories_namekey:categories_namekey|images:images|product_quantity:product_quantity|product_description:product_description|cxp_merknaam:cxp_merknaam|product_name:product_name|product_sale_end:product_sale_end|cxp_toepassing:cxp_toepassing|cxp_materiaal:cxp_materiaal|product_published:product_published|cxp_levertijd:cxp_levertijd|cxp_normale_prijs:cxp_normale_prijs
It's rather difficult to troubleshoot or find documentation/examples.
What are the criteria to get is working successful?
Please Log in or Create an account to join the conversation.
Which version of HikaShop are you using ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
$query ='SELECT product_id FROM '.hikashop_table('product').' WHERE product_id IN ('.implode(',',$ids).') AND product_type=\'main\';';
to:
$query ='SELECT product_id FROM '.hikashop_table('product').' WHERE product_id NOT IN ('.implode(',',$ids).') AND product_type=\'main\';';
in the file plugins/hikashop/datafeed/datafeed.php and try again ?
Please Log in or Create an account to join the conversation.
I'm sorry but that doesn't remove the articles that are not in the CSV?
The function uses product_id to check but that is not in my csv file, I have change it to product_code.
What can we check more?
The image attached in first message shows configuration is that correct?
Does the PIPE separator/delimiter influence the behavior?
Please Log in or Create an account to join the conversation.
Somehow the contentfile is treated as object but is not.
Should the helper convert it?
Please Log in or Create an account to join the conversation.
Any help?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Have you set a limit in the filters ? like on the example start:0 and limit:500 ?
Then execute again the mass action with start:500 and limit:500.
Else if there is too many data, the servers can't process the action.
Please Log in or Create an account to join the conversation.
The server responds with limit 500:500 =
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 251396073 bytes) in C:\domains\website.nl\wwwroot\administrator\components\com_hikashop\classes\massaction.php on line 1555
Warning: mysqli_ping() [function.mysqli-ping]: MySQL server has gone away in C:\domains\website.nl\wwwroot\libraries\joomla\database\database\mysqli.php on line 190
Is there still a option?
Is it also posible to point to a URL in the massaction?
Please Log in or Create an account to join the conversation.
Sorry for the late reply, have you solved your problem ?
Do you have the latest version (2.2.3) ?
Thanks to reduce the limit, could you give me the concerned lines regarding the Fatal Error ?
Please Log in or Create an account to join the conversation.
Did you have a look at the code what I mentioned in my earlier response?
Currently I'm not able to provide but i will try this week.
Please Log in or Create an account to join the conversation.
But not sure that they fix this problem.
Please Log in or Create an account to join the conversation.