Aero Commerce CommandsThis might need splitting out into more docs over time, but a starting point

Re-indexes database data into your search provider.

php artisan aero:search:reindex

Re-setup and re-index your search environment.

php artisan aero:search:rebuild

Aero CSV importer commands in Dev Mode

https://agora.aerocommerce.com/packages/aerocargo/csv

It’s common in local dev to have the below in your .env;

QUEUE_CONNECTION=sync

However the CSV module won’t work (You’ll click in the module list and nothing will happen), so you need to replicate live;

QUEUE_CONNECTION=database

A side effect of this is that queue commands will be just that, queued, and need to be run, so you need run the queues manually else nothing happens (elastic search updates, product updates etc, so open two terminal windows in the project root and run the following commands, kill and restart if significant changes;

php artisan queue:work --queue=search

php artisan queue:work --timeout=0

You will see the individual commands scroll past in the terminal too to give you positive acknowledgement that things are happening / breaking!

⚠️ SQL Commands - Danger!!

Manually delete all products and images - not officially sanctioned, will need to reindex after, and kill any processes, eg queues, workers, that may have models and relationships cached

delete from bundle_variant where product_id > 0;delete from attribute_product_image where product_image_id > 0;delete from images where id in (select image_id from product_images where product_id > 0);delete from content_template_product where product_id > 0;delete from product_tag where product_id > 0;delete from product_images where product_id > 0;delete from products where id > 0;delete from attribute_variant where variant_id > 0;delete from variants where id > 0;delete from listings where product_id > 0;delete from seo where seoable_type='product';