CSV import: hide products that are not the CSV file

CSV import: hide products that are not the CSV file

Avatar image
Aug 14, 2014
David González wrote
I think this would be very useful and very easy to implement.
Currently, Store Manager allows several actions when a reference is already in the database but not in the CSV import file. One of those actions is to set quantity of those references to zero. A very useful addition would a be a similar action: set quantity to zero and ALSO set visibility to hidden.
Prestashop by itself does not allow to hide out-of-stock products (a really absurd limitation), but shows an ugly warning box instead when trying to order it. The only solution I know of is to install a trigger at PHPMyAdmin (http://bit.ly/1nSWmk4) . This feature would gracefully overcome that limitation, and probably is very easy to program.
New
0 votes
Vote
Reply
8 Answers
Avatar image
Aug 20, 2014
Olivier Decroupette wrote
it's actually the status. the way i do it, is sorting all product by modified date, then selecting products not modified and changing status
Avatar image
Aug 25, 2014
Alex Pryshlivskiy agent wrote
Hello David!
Something like this will be available soon. This is Custom SQL feature. You can execute any SQL query after import.
Example of implementation of Store Manager for VirtueMart - http://virtuemart-manager.com/useful-articles/tips-tricks/what-are-custom-sqls-and-how-to-manage-virtuemart-data-using-them/
Avatar image
Aug 25, 2014
David González wrote
Thanks Sergiy. I didn't know about the current Custom SQL feature, sorry. I understand it cannot be triggered automatically for the moment after a CSV import, but that's a minor shortcoming. Would you be so kind of posting the correct custom SQL query to set visibility to hidden to every product when quantity equals zero? Or should I post it the help forum?
Avatar image
Aug 25, 2014
Alex Pryshlivskiy agent wrote
Hello David!
First of all, this feature in our to-do list. That's why you'll not be able to find it in the current Release.
Custom SQL will be executed by Store Manager after import automatically without any additional help.
All you need is to add this SQL query in the configuration of import.
I'll try to prepare Custom SQL for you as an example.
Avatar image
Aug 26, 2014
Alex Pryshlivskiy agent wrote
You need the following sections:
- Raw Table Editor
- Custom SQL section
- Import-Export Wizard with Custom SQL execution support (will be available soon in feature Release)
See screenshots

You can construct something like this
UPDATE `ps_product`
SET active=0
WHERE id_manufacturer = 8;

where id_manufacturer is you special manufacturer with id = 8
or you can use another filed as condition - id_product or id_supplier or another field you want to compare.


Avatar image
Aug 26, 2014
David González wrote
Thank you.
Avatar image
Aug 26, 2014
Alex Pryshlivskiy agent wrote
Small update: You should be familiar with SQL to create such queries.
Mar 12 (3 months ago)
Deepak wrote
REQUEST FREE SCRAPING SERVICE
Site to scrape:
https://myshopprime.com/shop/i4rd3iq
Required file format: Specific format (WooCommerce, Shopify, etc) or a plain CSV
csv
No file chosen

DeepakDC66@gmail.com
GDPR - Agree with personal data processing.