Skip to content

Commit

Permalink
updated dummy data register.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
indpurvesh committed Jul 4, 2018
1 parent 1b1d912 commit 3f40363
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 48 deletions.
84 changes: 37 additions & 47 deletions database/seeds/AvoRedDataSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use AvoRed\Ecommerce\Models\Database\Page;
use AvoRed\Framework\Models\Database\Configuration;


class AvoRedDataSeeder extends Seeder
{
/**
Expand All @@ -32,20 +31,19 @@ public function run()
'slug' => 'bedroom'
]);
$livingRoomCategory = Category::create([
'parent_id' => null,
'parent_id' => null,
'name' => 'Living Room',
'slug' => 'living-room'
]);


$product = Product::create([
'name' => 'Flower Pot',
'slug' => 'flower-pot',
'sku' => 'flower-pot',
'description' => $faker->realText(rand(3000, 6000)),
'status' => 1,
'in_stock' => 1,
'price' => rand(2, 10) . "0." . rand(1, 9) . "0",
'price' => rand(2, 10) . '0.' . rand(1, 9) . '0',
'track_stock' => 1,
'qty' => rand(10, 1000),
'is_taxable' => 1,
Expand All @@ -54,7 +52,7 @@ public function run()
]);

$product->categories()->sync($livingRoomCategory->id);
ProductImage::create(['path' => '/uploads/catalog/images/f/h/2/flower-pot.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);
ProductImage::create(['path' => 'storage/uploads/catalog/images/f/h/2/flower-pot.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);

$product = Product::create([
'name' => 'Classic TV Stand',
Expand All @@ -64,7 +62,7 @@ public function run()
'description' => $faker->realText(rand(3000, 6000)),
'status' => 1,
'in_stock' => 1,
'price' => rand(2, 10) . "0." . rand(1, 9) . "0",
'price' => rand(2, 10) . '0.' . rand(1, 9) . '0',
'track_stock' => 1,
'qty' => rand(10, 1000),
'is_taxable' => 1,
Expand All @@ -73,7 +71,7 @@ public function run()
]);

$product->categories()->sync($livingRoomCategory->id);
ProductImage::create(['path' => '/uploads/catalog/images/d/0/c/classic-tv-stand.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);
ProductImage::create(['path' => 'storage/uploads/catalog/images/d/0/c/classic-tv-stand.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);

$product = Product::create([
'name' => 'Classic Vintage Curtain',
Expand All @@ -84,15 +82,15 @@ public function run()
'status' => 1,
'in_stock' => 1,
'track_stock' => 1,
'price' => rand(2, 10) . "0." . rand(1, 9) . "0",
'price' => rand(2, 10) . '0.' . rand(1, 9) . '0',
'qty' => rand(10, 1000),
'is_taxable' => 1,
'meta_title' => '',
'meta_description' => ''
]);

$product->categories()->sync($livingRoomCategory->id);
ProductImage::create(['path' => '/uploads/catalog/images/y/f/r/textiles-2.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);
ProductImage::create(['path' => 'storage/uploads/catalog/images/y/f/r/textiles-2.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);

$product = Product::create([
'name' => 'Comfirtable Couch',
Expand All @@ -103,15 +101,15 @@ public function run()
'status' => 1,
'in_stock' => 1,
'track_stock' => 1,
'price' => rand(2, 10) . "0." . rand(1, 9) . "0",
'price' => rand(2, 10) . '0.' . rand(1, 9) . '0',
'qty' => rand(10, 1000),
'is_taxable' => 1,
'meta_title' => '',
'meta_description' => ''
]);

$product->categories()->sync($livingRoomCategory->id);
ProductImage::create(['path' => '/uploads/catalog/images/1/k/0/-Single-Panel-New-Pastoral-Linen-Blending-Embroidered-Living-Room-font-b-Curtain-b-font-font.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);
ProductImage::create(['path' => 'storage/uploads/catalog/images/1/k/0/-Single-Panel-New-Pastoral-Linen-Blending-Embroidered-Living-Room-font-b-Curtain-b-font-font.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);

$product = Product::create([
'type' => 'BASIC',
Expand All @@ -122,17 +120,17 @@ public function run()
'status' => 1,
'in_stock' => 1,
'track_stock' => 1,
'price' => rand(2, 10) . "0." . rand(1, 9) . "0",
'price' => rand(2, 10) . '0.' . rand(1, 9) . '0',
'qty' => rand(10, 1000),
'is_taxable' => 1,
'meta_title' => '',
'meta_description' => '',
]);

$product->categories()->sync($livingRoomCategory->id);
ProductImage::create(['path' => '/uploads/catalog/images/q/o/m/comfortable-leather-chair-published-under-the-most-comfortable-couch-group.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);
ProductImage::create(['path' => 'storage/uploads/catalog/images/q/o/m/comfortable-leather-chair-published-under-the-most-comfortable-couch-group.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);

$title = "Medium White Couch";
$title = 'Medium White Couch';
$product = Product::create([
'type' => 'BASIC',
'name' => $title,
Expand All @@ -142,17 +140,17 @@ public function run()
'status' => 1,
'in_stock' => 1,
'track_stock' => 1,
'price' => rand(2, 10) . "0." . rand(1, 9) . "0",
'price' => rand(2, 10) . '0.' . rand(1, 9) . '0',
'qty' => rand(10, 1000),
'is_taxable' => 1,
'meta_title' => '',
'meta_description' => ''
]);

$product->categories()->sync($livingRoomCategory->id);
ProductImage::create(['path' => '/uploads/catalog/images/s/e/j/ff815ea7756de71d6c5edb5566330df6.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);
ProductImage::create(['path' => 'storage/uploads/catalog/images/s/e/j/ff815ea7756de71d6c5edb5566330df6.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);

$title = "Comfirtable Gray Bed";
$title = 'Comfirtable Gray Bed';
$comfirtableGrayBedProduct = Product::create([
'name' => $title,
'type' => 'BASIC',
Expand All @@ -161,7 +159,7 @@ public function run()
'description' => $faker->realText(rand(3000, 6000)),
'status' => 1,
'in_stock' => 1,
'price' => rand(2, 10) . "0." . rand(1, 9) . "0",
'price' => rand(2, 10) . '0.' . rand(1, 9) . '0',
'track_stock' => 1,
'qty' => rand(10, 1000),
'is_taxable' => 1,
Expand All @@ -170,9 +168,9 @@ public function run()
]);

$product->categories()->sync($bedroomCategory->id);
ProductImage::create(['path' => '/uploads/catalog/images/v/t/x/bed-bedding-comfortable-platform-with-smooth-gray-also-are-beds-and-headboard-plus-small-.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);
ProductImage::create(['path' => 'storage/uploads/catalog/images/v/t/x/bed-bedding-comfortable-platform-with-smooth-gray-also-are-beds-and-headboard-plus-small-.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);

$title = "Cute Teddy Bear";
$title = 'Cute Teddy Bear';
$product = Product::create([
'name' => $title,
'slug' => str_slug($title),
Expand All @@ -181,7 +179,7 @@ public function run()
'status' => 1,
'in_stock' => 1,
'track_stock' => 1,
'price' => rand(2, 10) . "0." . rand(1, 9) . "0",
'price' => rand(2, 10) . '0.' . rand(1, 9) . '0',
'qty' => rand(10, 1000),
'is_taxable' => 1,
'meta_title' => '',
Expand All @@ -190,9 +188,9 @@ public function run()
]);

$product->categories()->sync($bedroomCategory->id);
ProductImage::create(['path' => '/uploads/catalog/images/z/c/u/d5d710257f2cf7cf2576f4a43dc40430.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);
ProductImage::create(['path' => 'storage/uploads/catalog/images/z/c/u/d5d710257f2cf7cf2576f4a43dc40430.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);

$title = "Minimalist Ceramic Lamp";
$title = 'Minimalist Ceramic Lamp';
$product = Product::create([
'name' => $title,
'slug' => str_slug($title),
Expand All @@ -201,7 +199,7 @@ public function run()
'status' => 1,
'in_stock' => 1,
'track_stock' => 1,
'price' => rand(2, 10) . "0." . rand(1, 9) . "0",
'price' => rand(2, 10) . '0.' . rand(1, 9) . '0',
'qty' => rand(10, 1000),
'is_taxable' => 1,
'meta_title' => '',
Expand All @@ -210,9 +208,9 @@ public function run()
]);

$product->categories()->sync($bedroomCategory->id);
ProductImage::create(['path' => '/uploads/catalog/images/m/2/z/b594a5c88e527b467508aa9fa3b01228.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);
ProductImage::create(['path' => 'storage/uploads/catalog/images/m/2/z/b594a5c88e527b467508aa9fa3b01228.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);

$title = "Wooden Bunk Bed";
$title = 'Wooden Bunk Bed';
$product = Product::create([
'name' => $title,
'slug' => str_slug($title),
Expand All @@ -221,7 +219,7 @@ public function run()
'status' => 1,
'in_stock' => 1,
'track_stock' => 1,
'price' => rand(2, 10) . "0." . rand(1, 9) . "0",
'price' => rand(2, 10) . '0.' . rand(1, 9) . '0',
'qty' => rand(10, 1000),
'is_taxable' => 1,
'meta_title' => '',
Expand All @@ -230,9 +228,9 @@ public function run()
]);

$product->categories()->sync($bedroomCategory->id);
ProductImage::create(['path' => '/uploads/catalog/images/4/5/n/il_570xN.262261571.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);
ProductImage::create(['path' => 'storage/uploads/catalog/images/4/5/n/il_570xN.262261571.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);

$title = "Cooktail Mixed";
$title = 'Cooktail Mixed';
$product = Product::create([
'name' => $title,
'slug' => str_slug($title),
Expand All @@ -241,7 +239,7 @@ public function run()
'status' => 1,
'in_stock' => 1,
'track_stock' => 1,
'price' => rand(2, 10) . "0." . rand(1, 9) . "0",
'price' => rand(2, 10) . '0.' . rand(1, 9) . '0',
'qty' => rand(10, 1000),
'is_taxable' => 1,
'meta_title' => '',
Expand All @@ -250,9 +248,9 @@ public function run()
]);

$product->categories()->sync($kitchenCategory->id);
ProductImage::create(['path' => '/uploads/catalog/images/n/y/n/CC2600.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);
ProductImage::create(['path' => 'storage/uploads/catalog/images/n/y/n/CC2600.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);

$title = "Coffee Making Machine";
$title = 'Coffee Making Machine';
$product = Product::create([
'name' => $title,
'slug' => str_slug($title),
Expand All @@ -262,17 +260,17 @@ public function run()
'in_stock' => 1,
'track_stock' => 1,
'qty' => rand(10, 1000),
'price' => rand(2, 10) . "0." . rand(1, 9) . "0",
'price' => rand(2, 10) . '0.' . rand(1, 9) . '0',
'is_taxable' => 1,
'meta_title' => '',
'meta_description' => '',
'type' => 'BASIC',
]);

$product->categories()->sync($kitchenCategory->id);
ProductImage::create(['path' => '/uploads/catalog/images/t/b/n/20121018143846738.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);
ProductImage::create(['path' => 'storage/uploads/catalog/images/t/b/n/20121018143846738.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);

$title = "Luxury Cooking Utensil";
$title = 'Luxury Cooking Utensil';
$product = Product::create([
'name' => $title,
'slug' => str_slug($title),
Expand All @@ -282,17 +280,17 @@ public function run()
'in_stock' => 1,
'track_stock' => 1,
'qty' => rand(10, 1000),
'price' => rand(2, 10) . "0." . rand(1, 9) . "0",
'price' => rand(2, 10) . '0.' . rand(1, 9) . '0',
'is_taxable' => 1,
'meta_title' => '',
'meta_description' => '',
'type' => 'BASIC',
]);

$product->categories()->sync($kitchenCategory->id);
ProductImage::create(['path' => '/uploads/catalog/images/l/i/k/coffee-maker-20.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);
ProductImage::create(['path' => 'storage/uploads/catalog/images/l/i/k/coffee-maker-20.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);

$title = "Vintage Toaste";
$title = 'Vintage Toaste';
$product = Product::create([
'name' => $title,
'slug' => str_slug($title),
Expand All @@ -301,7 +299,7 @@ public function run()
'status' => 1,
'in_stock' => 1,
'track_stock' => 1,
'price' => rand(2, 10) . "0." . rand(1, 9) . "0",
'price' => rand(2, 10) . '0.' . rand(1, 9) . '0',
'qty' => rand(10, 1000),
'is_taxable' => 1,
'meta_title' => '',
Expand All @@ -313,40 +311,33 @@ public function run()
'name' => $kitchenCategory->name,
'params' => $kitchenCategory->slug,
'route' => 'category.view',

]);
\AvoRed\Ecommerce\Models\Database\Menu::create([
'name' => $bedroomCategory->name,
'params' => $bedroomCategory->slug,
'route' => 'category.view',

]);
\AvoRed\Ecommerce\Models\Database\Menu::create([
'name' => $livingRoomCategory->name,
'params' => $livingRoomCategory->slug,
'route' => 'category.view',

]);
\AvoRed\Ecommerce\Models\Database\Menu::create([
'name' => 'My Account',
'route' => 'my-account.home',

]);
\AvoRed\Ecommerce\Models\Database\Menu::create([
'name' => 'Cart',
'route' => 'cart.view',

]);
\AvoRed\Ecommerce\Models\Database\Menu::create([
'name' => 'Checkout',
'route' => 'checkout.index',

]);

$product->categories()->sync($kitchenCategory->id);
ProductImage::create(['path' => '/uploads/catalog/images/0/y/4/tsf02crsa.jpg', 'product_id' => $product->id, 'is_main_image' => 1]);


$homePageContent = html_entity_decode('<p>&nbsp;</p><p>&nbsp;</p><p><strong>HOME PAGE FOR AvoRed E COMMERCE LARAVEL OPEN SOURCE SHOPPING CART</strong></p><p>&nbsp;</p><p><strong>Please star us on&nbsp;<a href="https://github.com/avored/laravel-ecommerce">https://github.com/avored/laravel-ecommerce</a></strong></p><p><strong>Like us on Facebook :&nbsp;<a href="https://www.facebook.com/avored/">https://www.facebook.com/avored/</a></strong></p><p><strong>Follow us on Twitter:&nbsp;<a href="https://twitter.com/avoredecommerce/">https://twitter.com/avoredecommerce/</a></strong></p>');
$homePage = Page::create(['name' => 'Home Page',
'slug' => 'home-page',
Expand All @@ -361,6 +352,5 @@ public function run()
'meta_title' => 'Term & Condition - AvoRed E commerce']);
Configuration::create(['configuration_key' => 'general_term_condition_page',
'configuration_value' => $termPage->id]);

}
}
4 changes: 3 additions & 1 deletion register.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: AvoRed Dummy Data
identifier: avored-dummy-data
description: AvoRed Dummy Data Module
namespace: AvoRed\DummyData\
namespace: AvoRed\DummyData\
status: Enabled

0 comments on commit 3f40363

Please sign in to comment.