Page 1 of 1

Product Template Mass Deletion

Posted: Fri Jul 17, 2009 2:58 pm
by andy
Hey guys,

Why we had all of our data moved from AC5.5 to AC7 they some how made a product template for each and every product. So, there's like 5k of them. Is there a way to delete all of them and start over?

Thanks,
Andy

Re: Product Template Mass Deletion

Posted: Mon Jul 20, 2009 2:23 am
by mazhar
You can try following code to delete all product templates from your store.

Code: Select all

CommerceBuilder.Products.ProductTemplateCollection templates = CommerceBuilder.Products.ProductTemplateDataSource.LoadForStore();
        foreach (ProductTemplate template in templates)
            template.Delete();
Put it somewhere in your store on some page, for example on Product Templates page at some button event.

Re: Product Template Mass Deletion

Posted: Mon Jul 20, 2009 12:01 pm
by andy
Thanks Mazhar,

Could you elaborate any?

Re: Product Template Mass Deletion

Posted: Mon Jul 20, 2009 12:34 pm
by andy
Never mind,

Just figure it out.

Thanks again!