diff --git a/install/faker.php b/install/faker.php index 45ebb2fc3..4cb5169c8 100755 --- a/install/faker.php +++ b/install/faker.php @@ -314,6 +314,12 @@ try { for($k=0; $kaddFolder($subfolder); + + $contentFolders = $content->getContentFolders(); + $collection = new \Propel\Runtime\Collection\Collection(); + $collection->prepend($contentFolders[0]->setDefaultFolder(1)); + $content->setContentFolders($collection); + $content->setVisible(rand(1, 10)>7 ? 0 : 1); $content->setPosition($k); setI18n($faker, $content); @@ -460,7 +466,6 @@ function createProduct($faker, Thelia\Model\Category $category, $position, $temp $product->addCategory($category); $product->setVisible(1); $productCategories = $product->getProductCategories(); - $productCategories[0]->setDefaultCategory(true); $collection = new \Propel\Runtime\Collection\Collection(); $collection->prepend($productCategories[0]->setDefaultCategory(1)); $product->setProductCategories($collection);