Selective bulk eCommerce product deletion
Permalink
We're looking for a php developer who knows Concrete5 eCommerce to create a product deletion Job that will remove all products and associated images from a store with the exception of those within two or three specific categories.
The store has 4,500 products so this cannot be done manually.
There is code already within the forum to delete all product which will probably be a good starting point for this:
The store has 4,500 products so this cannot be done manually.
There is code already within the forum to delete all product which will probably be a good starting point for this:
<? Loader::model('product/list','core_commerce'); $productList = new CoreCommerceProductList(); $products = $productList->get(100); while(is_array($products)&& count($products)){ foreach($products as $product) { $product->delete(); echo "Deleted some stuff... "; } $products = $productList->get(100); } echo "\nNo more ducks!(or anything else you might have had in your store...)";
Are you looking for something where you have some kind of interface to select which "categories" are not deleted, or can that be hard coded into the script?
When you say "categories" what are you really talking about, since eCommerce doesn't have Product Categories, are you talking about Product Sets or having a certain Product Attribute?