Merge branch 'master' of https://github.com/thelia/thelia
# By Etienne Roudeix (10) and franck (2) # Via Etienne Roudeix (3) and franck (2) * 'master' of https://github.com/thelia/thelia: Polished categories related content Finished category related content management delivery process delivery form order delivery form fix fixture dependant unit test delivery process delivery process cart integration cart integration cart page cart template Conflicts: install/faker.php
This commit is contained in:
@@ -206,7 +206,7 @@ try {
|
||||
$featureList = array();
|
||||
for($i=0; $i<4; $i++) {
|
||||
$feature = new Thelia\Model\Feature();
|
||||
$feature->setVisible(rand(1, 10)>7 ? 0 : 1);
|
||||
$feature->setVisible(1);
|
||||
$feature->setPosition($i);
|
||||
setI18n($faker, $feature);
|
||||
|
||||
@@ -280,7 +280,7 @@ try {
|
||||
for($i=0; $i<4; $i++) {
|
||||
$folder = new Thelia\Model\Folder();
|
||||
$folder->setParent(0);
|
||||
$folder->setVisible(rand(1, 10)>7 ? 0 : 1);
|
||||
$folder->setVisible(1);
|
||||
$folder->setPosition($i);
|
||||
setI18n($faker, $folder);
|
||||
|
||||
@@ -297,7 +297,7 @@ try {
|
||||
for($j=1; $j<rand(0, 5); $j++) {
|
||||
$subfolder = new Thelia\Model\Folder();
|
||||
$subfolder->setParent($folder->getId());
|
||||
$subfolder->setVisible(rand(1, 10)>7 ? 0 : 1);
|
||||
$subfolder->setVisible(1);
|
||||
$subfolder->setPosition($j);
|
||||
setI18n($faker, $subfolder);
|
||||
|
||||
@@ -458,12 +458,13 @@ function createProduct($faker, Thelia\Model\Category $category, $position, $temp
|
||||
$product = new Thelia\Model\Product();
|
||||
$product->setRef($category->getId() . '_' . $position . '_' . $faker->randomNumber(8));
|
||||
$product->addCategory($category);
|
||||
$product->setVisible(1);
|
||||
$productCategories = $product->getProductCategories();
|
||||
$productCategories[0]->setDefaultCategory(true);
|
||||
$collection = new \Propel\Runtime\Collection\Collection();
|
||||
$collection->append($productCategories[0]->setDefaultCategory(true));
|
||||
$product->setProductCategories($collection);
|
||||
$product->setVisible(rand(1, 10)>7 ? 0 : 1);
|
||||
$product->setVisible(1);
|
||||
$product->setPosition($position);
|
||||
$product->setTaxRuleId(1);
|
||||
$product->setTemplate($template);
|
||||
@@ -489,7 +490,7 @@ function createCategory($faker, $parent, $position, &$categoryIdList, $contentId
|
||||
{
|
||||
$category = new Thelia\Model\Category();
|
||||
$category->setParent($parent);
|
||||
$category->setVisible(rand(1, 10)>7 ? 0 : 1);
|
||||
$category->setVisible(1);
|
||||
$category->setPosition($position);
|
||||
setI18n($faker, $category);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user