Example #1
0
function clearTables($con)
{
    echo "Clearing tables\n";
    $productAssociatedContent = Thelia\Model\ProductAssociatedContentQuery::create()->find($con);
    $productAssociatedContent->delete($con);
    $categoryAssociatedContent = Thelia\Model\CategoryAssociatedContentQuery::create()->find($con);
    $categoryAssociatedContent->delete($con);
    $featureProduct = Thelia\Model\FeatureProductQuery::create()->find($con);
    $featureProduct->delete($con);
    $attributeCombination = Thelia\Model\AttributeCombinationQuery::create()->find($con);
    $attributeCombination->delete($con);
    $feature = Thelia\Model\FeatureQuery::create()->find($con);
    $feature->delete($con);
    $feature = Thelia\Model\FeatureI18nQuery::create()->find($con);
    $feature->delete($con);
    $featureAv = Thelia\Model\FeatureAvQuery::create()->find($con);
    $featureAv->delete($con);
    $featureAv = Thelia\Model\FeatureAvI18nQuery::create()->find($con);
    $featureAv->delete($con);
    $attribute = Thelia\Model\AttributeQuery::create()->find($con);
    $attribute->delete($con);
    $attribute = Thelia\Model\AttributeI18nQuery::create()->find($con);
    $attribute->delete($con);
    $attributeAv = Thelia\Model\AttributeAvQuery::create()->find($con);
    $attributeAv->delete($con);
    $attributeAv = Thelia\Model\AttributeAvI18nQuery::create()->find($con);
    $attributeAv->delete($con);
    $brand = Thelia\Model\BrandQuery::create()->find($con);
    $brand->delete($con);
    $brand = Thelia\Model\BrandI18nQuery::create()->find($con);
    $brand->delete($con);
    $category = Thelia\Model\CategoryQuery::create()->find($con);
    $category->delete($con);
    $category = Thelia\Model\CategoryI18nQuery::create()->find($con);
    $category->delete($con);
    $product = Thelia\Model\ProductQuery::create()->find($con);
    $product->delete($con);
    $product = Thelia\Model\ProductI18nQuery::create()->find($con);
    $product->delete($con);
    $folder = Thelia\Model\FolderQuery::create()->find($con);
    $folder->delete($con);
    $folder = Thelia\Model\FolderI18nQuery::create()->find($con);
    $folder->delete($con);
    $content = Thelia\Model\ContentQuery::create()->find($con);
    $content->delete($con);
    $content = Thelia\Model\ContentI18nQuery::create()->find($con);
    $content->delete($con);
    $accessory = Thelia\Model\AccessoryQuery::create()->find($con);
    $accessory->delete($con);
    $stock = \Thelia\Model\ProductSaleElementsQuery::create()->find($con);
    $stock->delete($con);
    $productPrice = \Thelia\Model\ProductPriceQuery::create()->find($con);
    $productPrice->delete($con);
    \Thelia\Model\ProductImageQuery::create()->find($con)->delete($con);
    $customer = Thelia\Model\CustomerQuery::create()->find($con);
    $customer->delete($con);
    echo "Tables cleared with success\n";
}
Example #2
0
 $featureAv->delete();
 $featureAv = Thelia\Model\FeatureAvI18nQuery::create()->find();
 $featureAv->delete();
 $attribute = Thelia\Model\AttributeQuery::create()->find();
 $attribute->delete();
 $attribute = Thelia\Model\AttributeI18nQuery::create()->find();
 $attribute->delete();
 $attributeAv = Thelia\Model\AttributeAvQuery::create()->find();
 $attributeAv->delete();
 $attributeAv = Thelia\Model\AttributeAvI18nQuery::create()->find();
 $attributeAv->delete();
 $category = Thelia\Model\CategoryQuery::create()->find();
 $category->delete();
 $category = Thelia\Model\CategoryI18nQuery::create()->find();
 $category->delete();
 $product = Thelia\Model\ProductQuery::create()->find();
 $product->delete();
 $product = Thelia\Model\ProductI18nQuery::create()->find();
 $product->delete();
 $customer = Thelia\Model\CustomerQuery::create()->find();
 $customer->delete();
 $admin = Thelia\Model\AdminQuery::create()->find();
 $admin->delete();
 $folder = Thelia\Model\FolderQuery::create()->find();
 $folder->delete();
 $folder = Thelia\Model\FolderI18nQuery::create()->find();
 $folder->delete();
 $content = Thelia\Model\ContentQuery::create()->find();
 $content->delete();
 $content = Thelia\Model\ContentI18nQuery::create()->find();
 $content->delete();