diff --git a/assets/.DS_Store b/assets/.DS_Store new file mode 100644 index 0000000..89a79fe Binary files /dev/null and b/assets/.DS_Store differ diff --git a/assets/uploads/cms/images/b/k/o/TIydVFNLKKJTiqJjUa29LKdVH0sgxadTJGogzGuI.jpeg b/assets/uploads/cms/images/b/k/o/TIydVFNLKKJTiqJjUa29LKdVH0sgxadTJGogzGuI.jpeg new file mode 100644 index 0000000..099991a Binary files /dev/null and b/assets/uploads/cms/images/b/k/o/TIydVFNLKKJTiqJjUa29LKdVH0sgxadTJGogzGuI.jpeg differ diff --git a/assets/uploads/cms/images/b/k/o/large-TIydVFNLKKJTiqJjUa29LKdVH0sgxadTJGogzGuI.jpeg b/assets/uploads/cms/images/b/k/o/large-TIydVFNLKKJTiqJjUa29LKdVH0sgxadTJGogzGuI.jpeg new file mode 100644 index 0000000..acf8785 Binary files /dev/null and b/assets/uploads/cms/images/b/k/o/large-TIydVFNLKKJTiqJjUa29LKdVH0sgxadTJGogzGuI.jpeg differ diff --git a/assets/uploads/cms/images/b/k/o/med-TIydVFNLKKJTiqJjUa29LKdVH0sgxadTJGogzGuI.jpeg b/assets/uploads/cms/images/b/k/o/med-TIydVFNLKKJTiqJjUa29LKdVH0sgxadTJGogzGuI.jpeg new file mode 100644 index 0000000..d9708a1 Binary files /dev/null and b/assets/uploads/cms/images/b/k/o/med-TIydVFNLKKJTiqJjUa29LKdVH0sgxadTJGogzGuI.jpeg differ diff --git a/assets/uploads/cms/images/b/k/o/small-TIydVFNLKKJTiqJjUa29LKdVH0sgxadTJGogzGuI.jpeg b/assets/uploads/cms/images/b/k/o/small-TIydVFNLKKJTiqJjUa29LKdVH0sgxadTJGogzGuI.jpeg new file mode 100644 index 0000000..74f8362 Binary files /dev/null and b/assets/uploads/cms/images/b/k/o/small-TIydVFNLKKJTiqJjUa29LKdVH0sgxadTJGogzGuI.jpeg differ diff --git a/assets/uploads/cms/images/n/k/q/large-txdsemPHuXC9CHvXrXB7vvRVZc4C0YhrOrr4v1Su.jpeg b/assets/uploads/cms/images/n/k/q/large-txdsemPHuXC9CHvXrXB7vvRVZc4C0YhrOrr4v1Su.jpeg new file mode 100644 index 0000000..8b7eb80 Binary files /dev/null and b/assets/uploads/cms/images/n/k/q/large-txdsemPHuXC9CHvXrXB7vvRVZc4C0YhrOrr4v1Su.jpeg differ diff --git a/assets/uploads/cms/images/n/k/q/med-txdsemPHuXC9CHvXrXB7vvRVZc4C0YhrOrr4v1Su.jpeg b/assets/uploads/cms/images/n/k/q/med-txdsemPHuXC9CHvXrXB7vvRVZc4C0YhrOrr4v1Su.jpeg new file mode 100644 index 0000000..f0ca8e0 Binary files /dev/null and b/assets/uploads/cms/images/n/k/q/med-txdsemPHuXC9CHvXrXB7vvRVZc4C0YhrOrr4v1Su.jpeg differ diff --git a/assets/uploads/cms/images/n/k/q/small-txdsemPHuXC9CHvXrXB7vvRVZc4C0YhrOrr4v1Su.jpeg b/assets/uploads/cms/images/n/k/q/small-txdsemPHuXC9CHvXrXB7vvRVZc4C0YhrOrr4v1Su.jpeg new file mode 100644 index 0000000..10a3e26 Binary files /dev/null and b/assets/uploads/cms/images/n/k/q/small-txdsemPHuXC9CHvXrXB7vvRVZc4C0YhrOrr4v1Su.jpeg differ diff --git a/assets/uploads/cms/images/n/k/q/txdsemPHuXC9CHvXrXB7vvRVZc4C0YhrOrr4v1Su.jpeg b/assets/uploads/cms/images/n/k/q/txdsemPHuXC9CHvXrXB7vvRVZc4C0YhrOrr4v1Su.jpeg new file mode 100644 index 0000000..5a3f41e Binary files /dev/null and b/assets/uploads/cms/images/n/k/q/txdsemPHuXC9CHvXrXB7vvRVZc4C0YhrOrr4v1Su.jpeg differ diff --git a/assets/uploads/cms/images/y/v/u/CqQjp5hSvRFnx0glalLnpTP7F1PLOCGoLAMPtnmc.jpeg b/assets/uploads/cms/images/y/v/u/CqQjp5hSvRFnx0glalLnpTP7F1PLOCGoLAMPtnmc.jpeg new file mode 100644 index 0000000..cfd2b20 Binary files /dev/null and b/assets/uploads/cms/images/y/v/u/CqQjp5hSvRFnx0glalLnpTP7F1PLOCGoLAMPtnmc.jpeg differ diff --git a/assets/uploads/cms/images/y/v/u/large-CqQjp5hSvRFnx0glalLnpTP7F1PLOCGoLAMPtnmc.jpeg b/assets/uploads/cms/images/y/v/u/large-CqQjp5hSvRFnx0glalLnpTP7F1PLOCGoLAMPtnmc.jpeg new file mode 100644 index 0000000..b6a68ca Binary files /dev/null and b/assets/uploads/cms/images/y/v/u/large-CqQjp5hSvRFnx0glalLnpTP7F1PLOCGoLAMPtnmc.jpeg differ diff --git a/assets/uploads/cms/images/y/v/u/med-CqQjp5hSvRFnx0glalLnpTP7F1PLOCGoLAMPtnmc.jpeg b/assets/uploads/cms/images/y/v/u/med-CqQjp5hSvRFnx0glalLnpTP7F1PLOCGoLAMPtnmc.jpeg new file mode 100644 index 0000000..3cc2a29 Binary files /dev/null and b/assets/uploads/cms/images/y/v/u/med-CqQjp5hSvRFnx0glalLnpTP7F1PLOCGoLAMPtnmc.jpeg differ diff --git a/assets/uploads/cms/images/y/v/u/small-CqQjp5hSvRFnx0glalLnpTP7F1PLOCGoLAMPtnmc.jpeg b/assets/uploads/cms/images/y/v/u/small-CqQjp5hSvRFnx0glalLnpTP7F1PLOCGoLAMPtnmc.jpeg new file mode 100644 index 0000000..2c18923 Binary files /dev/null and b/assets/uploads/cms/images/y/v/u/small-CqQjp5hSvRFnx0glalLnpTP7F1PLOCGoLAMPtnmc.jpeg differ diff --git a/database/seeds/AvoRedDataSeeder.php b/database/seeds/AvoRedDataSeeder.php index 5e8aac5..50f6a53 100644 --- a/database/seeds/AvoRedDataSeeder.php +++ b/database/seeds/AvoRedDataSeeder.php @@ -1,13 +1,16 @@ first(); - $kitchenCategory = Category::create([ 'parent_id' => null, 'name' => 'Kitchen', @@ -35,7 +37,6 @@ public function run() 'name' => 'Living Room', 'slug' => 'living-room' ]); - $product = Product::create([ 'name' => 'Flower Pot', 'slug' => 'flower-pot', @@ -50,11 +51,9 @@ public function run() 'meta_title' => '', 'meta_description' => '' ]); - $product->categories()->sync($livingRoomCategory->id); - ProductImage::create(['path' => 'storage/uploads/catalog/images/f/h/2/flower-pot.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - - $product = Product::create([ + ProductImage::create(['path' => 'uploads/catalog/images/f/h/2/flower-pot.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); + $classicTvProduct = Product::create([ 'name' => 'Classic TV Stand', 'type' => 'BASIC', 'slug' => 'classic-tv-stand', @@ -69,10 +68,11 @@ public function run() 'meta_title' => '', 'meta_description' => '' ]); - - $product->categories()->sync($livingRoomCategory->id); - ProductImage::create(['path' => 'storage/uploads/catalog/images/d/0/c/classic-tv-stand.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - + $classicTvProduct->categories()->sync($livingRoomCategory->id); + ProductImage::create(['path' => 'uploads/catalog/images/d/0/c/classic-tv-stand.jpg', + 'product_id' => $classicTvProduct->id, + 'is_main_image' => 1 + ]); $product = Product::create([ 'name' => 'Classic Vintage Curtain', 'type' => 'BASIC', @@ -88,10 +88,8 @@ public function run() 'meta_title' => '', 'meta_description' => '' ]); - $product->categories()->sync($livingRoomCategory->id); - ProductImage::create(['path' => 'storage/uploads/catalog/images/y/f/r/textiles-2.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - + ProductImage::create(['path' => 'uploads/catalog/images/y/f/r/textiles-2.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); $product = Product::create([ 'name' => 'Comfirtable Couch', 'type' => 'BASIC', @@ -107,10 +105,8 @@ public function run() 'meta_title' => '', 'meta_description' => '' ]); - $product->categories()->sync($livingRoomCategory->id); - 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]); - + 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]); $product = Product::create([ 'type' => 'BASIC', 'name' => 'Delicate Brown Curtain', @@ -126,10 +122,8 @@ public function run() 'meta_title' => '', 'meta_description' => '', ]); - $product->categories()->sync($livingRoomCategory->id); - 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]); - + 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]); $title = 'Medium White Couch'; $product = Product::create([ 'type' => 'BASIC', @@ -146,10 +140,8 @@ public function run() 'meta_title' => '', 'meta_description' => '' ]); - $product->categories()->sync($livingRoomCategory->id); - ProductImage::create(['path' => 'storage/uploads/catalog/images/s/e/j/ff815ea7756de71d6c5edb5566330df6.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - + ProductImage::create(['path' => 'uploads/catalog/images/s/e/j/ff815ea7756de71d6c5edb5566330df6.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); $title = 'Comfirtable Gray Bed'; $comfirtableGrayBedProduct = Product::create([ 'name' => $title, @@ -166,10 +158,8 @@ public function run() 'meta_title' => '', 'meta_description' => '' ]); - $product->categories()->sync($bedroomCategory->id); - 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]); - + 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]); $title = 'Cute Teddy Bear'; $product = Product::create([ 'name' => $title, @@ -186,10 +176,8 @@ public function run() 'meta_description' => '', 'type' => 'BASIC', ]); - $product->categories()->sync($bedroomCategory->id); - ProductImage::create(['path' => 'storage/uploads/catalog/images/z/c/u/d5d710257f2cf7cf2576f4a43dc40430.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - + ProductImage::create(['path' => 'uploads/catalog/images/z/c/u/d5d710257f2cf7cf2576f4a43dc40430.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); $title = 'Minimalist Ceramic Lamp'; $product = Product::create([ 'name' => $title, @@ -206,10 +194,8 @@ public function run() 'meta_description' => '', 'type' => 'BASIC', ]); - $product->categories()->sync($bedroomCategory->id); - ProductImage::create(['path' => 'storage/uploads/catalog/images/m/2/z/b594a5c88e527b467508aa9fa3b01228.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - + ProductImage::create(['path' => 'uploads/catalog/images/m/2/z/b594a5c88e527b467508aa9fa3b01228.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); $title = 'Wooden Bunk Bed'; $product = Product::create([ 'name' => $title, @@ -226,12 +212,10 @@ public function run() 'meta_description' => '', 'type' => 'BASIC', ]); - $product->categories()->sync($bedroomCategory->id); - ProductImage::create(['path' => 'storage/uploads/catalog/images/4/5/n/il_570xN.262261571.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - + ProductImage::create(['path' => 'uploads/catalog/images/4/5/n/il_570xN.262261571.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); $title = 'Cooktail Mixed'; - $product = Product::create([ + $cockTailProduct = Product::create([ 'name' => $title, 'slug' => str_slug($title), 'sku' => str_slug($title), @@ -246,12 +230,14 @@ public function run() 'meta_description' => '', 'type' => 'BASIC', ]); - - $product->categories()->sync($kitchenCategory->id); - ProductImage::create(['path' => 'storage/uploads/catalog/images/n/y/n/CC2600.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - + $cockTailProduct->categories()->sync($kitchenCategory->id); + ProductImage::create([ + 'path' => 'uploads/catalog/images/n/y/n/CC2600.jpg', + 'product_id' => $cockTailProduct->id, + 'is_main_image' => 1 + ]); $title = 'Coffee Making Machine'; - $product = Product::create([ + $coffeProduct = Product::create([ 'name' => $title, 'slug' => str_slug($title), 'sku' => str_slug($title), @@ -266,10 +252,12 @@ public function run() 'meta_description' => '', 'type' => 'BASIC', ]); - - $product->categories()->sync($kitchenCategory->id); - ProductImage::create(['path' => 'storage/uploads/catalog/images/t/b/n/20121018143846738.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - + $coffeProduct->categories()->sync($kitchenCategory->id); + ProductImage::create([ + 'path' => 'uploads/catalog/images/t/b/n/20121018143846738.jpg', + 'product_id' => $coffeProduct->id, + 'is_main_image' => 1 + ]); $title = 'Luxury Cooking Utensil'; $product = Product::create([ 'name' => $title, @@ -286,10 +274,8 @@ public function run() 'meta_description' => '', 'type' => 'BASIC', ]); - $product->categories()->sync($kitchenCategory->id); - ProductImage::create(['path' => 'storage/uploads/catalog/images/l/i/k/coffee-maker-20.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); - + ProductImage::create(['path' => 'uploads/catalog/images/l/i/k/coffee-maker-20.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); $title = 'Vintage Toaste'; $product = Product::create([ 'name' => $title, @@ -306,51 +292,99 @@ public function run() 'meta_description' => '', 'type' => 'BASIC', ]); - - \AvoRed\Framework\Models\Database\Menu::create([ + Menu::create([ 'name' => $kitchenCategory->name, 'params' => $kitchenCategory->slug, 'route' => 'category.view', ]); - \AvoRed\Framework\Models\Database\Menu::create([ + Menu::create([ 'name' => $bedroomCategory->name, 'params' => $bedroomCategory->slug, 'route' => 'category.view', ]); - \AvoRed\Framework\Models\Database\Menu::create([ + Menu::create([ 'name' => $livingRoomCategory->name, 'params' => $livingRoomCategory->slug, 'route' => 'category.view', ]); - \AvoRed\Framework\Models\Database\Menu::create([ + Menu::create([ 'name' => 'My Account', 'route' => 'my-account.home', ]); - \AvoRed\Framework\Models\Database\Menu::create([ + Menu::create([ 'name' => 'Cart', 'route' => 'cart.view', ]); - \AvoRed\Framework\Models\Database\Menu::create([ + 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('
HOME PAGE FOR AvoRed E COMMERCE LARAVEL OPEN SOURCE SHOPPING CART
Please star us on https://github.com/avored/laravel-ecommerce
Like us on Facebook : https://www.facebook.com/avored/
Follow us on Twitter: https://twitter.com/avoredecommerce/
'); + ProductImage::create(['path' => 'uploads/catalog/images/0/y/4/tsf02crsa.jpg', 'product_id' => $product->id, 'is_main_image' => 1]); + $homePageContent = html_entity_decode('### avored-banner ###
HOME PAGE FOR AvoRed E COMMERCE LARAVEL OPEN SOURCE SHOPPING CART
Please star us on https://github.com/avored/laravel-ecommerce
Like us on Facebook : https://www.facebook.com/avored/
Follow us on Twitter: https://twitter.com/avoredecommerce/
### avored-featured ###
'); $homePage = Page::create(['name' => 'Home Page', 'slug' => 'home-page', 'content' => $homePageContent, 'meta_title' => 'Home Page - AvoRed E commerce']); Configuration::create(['configuration_key' => 'general_home_page', 'configuration_value' => $homePage->id]); - $termPage = Page::create(['name' => 'Term & Condition', 'slug' => 'term-condition', 'content' => $faker->text(200), 'meta_title' => 'Term & Condition - AvoRed E commerce']); Configuration::create(['configuration_key' => 'general_term_condition_page', - 'configuration_value' => $termPage->id]); + 'configuration_value' => $termPage->id + ]); + Banner::create([ + 'name' => 'Kitchen Sale', + 'image_path' => 'uploads/cms/images/b/k/o/TIydVFNLKKJTiqJjUa29LKdVH0sgxadTJGogzGuI.jpeg', + 'alt_text' => 'Kitchen On Sale', + 'url' => 'category/kitchen', + 'status' => 'ENABLED', + 'sort_order' => 10 + ]); + Banner::create([ + 'name' => 'Living Room On Sale', + 'image_path' => 'uploads/cms/images/y/v/u/CqQjp5hSvRFnx0glalLnpTP7F1PLOCGoLAMPtnmc.jpeg', + 'alt_text' => 'Living Room Items on Sale', + 'url' => 'category/living-room', + 'status' => 'ENABLED', + 'sort_order' => 20 + ]); + Banner::create([ + 'name' => 'Bedroom Sale', + 'image_path' => 'uploads/cms/images/n/k/q/txdsemPHuXC9CHvXrXB7vvRVZc4C0YhrOrr4v1Su.jpeg', + 'alt_text' => 'Bedroom On Sale', + 'url' => 'category/bedroom', + 'status' => 'ENABLED', + 'sort_order' => 30 + ]); + $isFeaturedProperty = Property::whereIdentifier('avored-is-featured')->first(); + if(null !== $isFeaturedProperty) { + $yesPropertyDropdownValueId = PropertyDropdownOption::wherePropertyId($isFeaturedProperty->id) + ->whereDisplayText('Yes') + ->first(); + ProductPropertyIntegerValue::create([ + 'property_id' => $isFeaturedProperty->id, + 'product_id' => $classicTvProduct->id, + 'value' => $yesPropertyDropdownValueId->id + ]); + ProductPropertyIntegerValue::create([ + 'property_id' => $isFeaturedProperty->id, + 'product_id' => $product->id, + 'value' => $yesPropertyDropdownValueId->id + ]); + ProductPropertyIntegerValue::create([ + 'property_id' => $isFeaturedProperty->id, + 'product_id' => $coffeProduct->id, + 'value' => $yesPropertyDropdownValueId->id + ]); + ProductPropertyIntegerValue::create([ + 'property_id' => $isFeaturedProperty->id, + 'product_id' => $cockTailProduct->id, + 'value' => $yesPropertyDropdownValueId->id + ]); + + } } -} +} \ No newline at end of file