diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml new file mode 100644 index 0000000..b444e16 --- /dev/null +++ b/.idea/sqldialects.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a0e5968..6bcd99a 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,18 +5,20 @@ - - - - - - - - - - - + + + + + + + + + + + + + @@ -47,32 +49,6 @@ @@ -84,60 +60,38 @@ - - - - - - - - - - - - + + - - + + - - - - - - - - - - - - - - + + - - + + - - + + - - + + - - + + @@ -165,20 +119,7 @@ @@ -359,7 +313,6 @@ - @@ -381,6 +334,7 @@ + @@ -760,26 +714,26 @@ - + - + - + + + - - @@ -814,386 +768,389 @@ - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - + - + - - + + - + - - + + - + - + - + - + - + - - + + - + - - + + - + - - - + + - + - + - - + + - + + + + - - + + - + - + - - + + + - + - - + + + - + - - + + + - + - - + + + - + - - + + + - + - - + + + - + - - + + + - + - - + + + - + - - + + + - + - - + + + - + - - + + - + - - + + - + - - - - - + + + - + - + - + - - - - - + + + - - - - + - - + + - + - - + + - + - - + + - + - - - - - + + + - + - - + + - + - - + + - + - - + + diff --git a/app/Http/Controllers/BackendController.php b/app/Http/Controllers/BackendController.php index 5fd9684..2f091cc 100644 --- a/app/Http/Controllers/BackendController.php +++ b/app/Http/Controllers/BackendController.php @@ -6,7 +6,7 @@ use App\Models\Category; use App\Models\Order; use App\Models\Product; -use App\Models\Brands; +use App\Models\Brand; use Illuminate\Http\Request; use Auth, View, Gate, DB; use Validator, Input, Redirect; @@ -116,7 +116,7 @@ public function productsEdit() $edit->add('slug', 'Slug', 'text')->rule('required|min:3'); $edit->add('name', 'Name', 'text')->rule('required|min:3'); $edit->add('description', 'Description', 'redactor'); - $edit->add('brand_id', 'Brand', 'select')->options(Brands::lists("brand", "brand_id")->all()); + $edit->add('brand_id', 'Brand', 'select')->options(Brand::lists("brand", "brand_id")->all()); $edit->add('cat_id', 'Category', 'select')->options(Category::lists("cat", "cat_id")->all()); $edit->add('size.size', 'Size', 'tags'); $edit->add('color.color', 'Color', 'tags'); diff --git a/app/Models/Brands.php b/app/Models/Brand.php similarity index 68% rename from app/Models/Brands.php rename to app/Models/Brand.php index 30de486..c3e5f91 100644 --- a/app/Models/Brands.php +++ b/app/Models/Brand.php @@ -4,14 +4,14 @@ use Illuminate\Database\Eloquent\Model; -class Brands extends Model +class Brand extends Model { /** * The database table used by the model. * * @var string */ - protected $table = 'brand'; + protected $table = 'brands'; /** * The attributes that are mass assignable. @@ -37,4 +37,15 @@ public function product() { return $this->belongsTo('App\Models\Product','brand_id', 'brand_id'); } + + /** + * Count brands + * @return mixed + */ + public function brandCount() + { + return $this->product() + ->selectRaw('brand_id, count(*) as aggregate') + ->groupBy('brand_id'); + } } \ No newline at end of file diff --git a/app/Models/Color.php b/app/Models/Color.php index 9bcc9ae..8cb6cb2 100644 --- a/app/Models/Color.php +++ b/app/Models/Color.php @@ -33,4 +33,15 @@ class Color extends Model */ public $timestamps = false; + + /** + * count colors + * @return mixed + */ + public function colorCount() + { + return $this->hasOne('App\Models\Colors_products') + ->selectRaw('color_id, count(*) as aggregate') + ->groupBy('color_id'); + } } \ No newline at end of file diff --git a/app/Models/Colors_products.php b/app/Models/Colors_products.php index 420e508..da96763 100644 --- a/app/Models/Colors_products.php +++ b/app/Models/Colors_products.php @@ -32,6 +32,9 @@ class Colors_products extends Model public $timestamps = false; + /** + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo + */ public function product() { return $this->belongsTo('App\Models\Product'); diff --git a/app/Models/Product.php b/app/Models/Product.php index f010de1..50b2d0b 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -47,7 +47,7 @@ class Product extends Model */ public function brands() { - return $this->hasOne('App\Models\Brands', 'brand_id', 'brand_id'); + return $this->hasOne('App\Models\Brand', 'brand_id', 'brand_id'); } public function category() @@ -111,4 +111,16 @@ public function scopeItemProperty($query, $id) { return $query->with('category', 'size', 'color')->findOrFail($id); } + + /** + * Get parent items for colors and sizes + * @param $query + * @param $parent + * @return mixed + */ + public function scopeGetParents($query, $parent) + { + return $query->where(['parent_id' => $parent]) + ->lists('product_id'); + } } \ No newline at end of file diff --git a/app/Models/Size.php b/app/Models/Size.php index dbc8a97..14e76a4 100644 --- a/app/Models/Size.php +++ b/app/Models/Size.php @@ -32,4 +32,15 @@ class Size extends Model */ public $timestamps = false; + + /** + * count sizes + * @return mixed + */ + public function sizeCount() + { + return $this->hasOne('App\Models\Products_sizes') + ->selectRaw('size_id, count(*) as aggregate') + ->groupBy('size_id'); + } } \ No newline at end of file diff --git a/app/Repositories/ProductRepository.php b/app/Repositories/ProductRepository.php index 3bfa39f..c916169 100644 --- a/app/Repositories/ProductRepository.php +++ b/app/Repositories/ProductRepository.php @@ -2,18 +2,20 @@ namespace App\Repositories; -use App\Models\Brands; +use App\Models\Brand; use App\Models\Category; +use App\Models\Color; use App\Models\Product; +use App\Models\Size; use App\Repositories\ShareRepository as Share; -use Request,DB; +use Request, DB; class ProductRepository { /** * - * Product Class with custom methods for products. + * Product repository Class with custom methods for products. * Just move logic outside from Eloquent model. * * @package ecommerce-cms @@ -23,34 +25,24 @@ class ProductRepository */ /** - * @param $parent + * Get data and count items for filters page. * @return mixed */ public static function getAll($parent) { - $sqla = '(SELECT count(products.brand_id) as count - FROM products - WHERE products.brand_id = brand.brand_id - AND products.parent_id = "' . $parent . '") as brand_cnt'; - $sqlb = '(SELECT count(color_product.color_id) as count - FROM color_product - LEFT JOIN products - ON products.product_id = color_product.product_id - WHERE color_product.color_id = colors.color_id - AND products.parent_id = "' . $parent . '") as color_cnt'; - $result = DB::table('brand') - ->select(array('*', DB::raw($sqla), DB::raw($sqlb))) - ->leftJoin('sizes', 'brand.brand_id', '=', 'sizes.size_id') - ->leftJoin('colors', 'brand.brand_id', '=', 'colors.color_id') - ->get(); - $data['brand'] = array(); - $data['color'] = array(); - $data['size'] = array(); - foreach ($result as $val) { - $data['brand'][] = $val; - $data['color'][] = $val; - $data['size'][] = $val; - } + $parents = Product::GetParents($parent); + $data['brand'] = Brand::with(['brandCount' => function ($q) use ($parent) { + $q->where('parent_id', $parent); + }])->get(); + $data['brand']->first()->brandCount; + $data['color'] = Color::with(['colorCount' => function ($q) use ($parents) { + $q->whereIn('product_id', $parents); + }])->get(); + $data['color']->first()->colorCount; + $data['size'] = Size::with(['sizeCount' => function ($q) use ($parents) { + $q->whereIn('product_id', $parents); + }])->get(); + $data['size']->first()->sizeCount; return $data; } @@ -60,7 +52,7 @@ public static function getAll($parent) */ public static function getHome() { - $data['brands'] = Brands::all(); + $data['brands'] = Brand::all(); $data['latest'] = Product::latest(); $data['products'] = Product::Products(); return $data; @@ -140,9 +132,9 @@ public static function pagination($parent) if (!empty(Request::input('brand'))) { $query->whereIn('brand_id', Request::input('brand')); }; - if(Request::input('name')){ + if (Request::input('name')) { $query->orderBy('name', Request::input('name')); - }else{ + } else { $query->orderBy('price', Request::input('price')); } //$query->orderBy('price', Request::input('price')); diff --git a/cms.sql b/cms.sql index 79eef01..8385caa 100644 --- a/cms.sql +++ b/cms.sql @@ -3,7 +3,7 @@ -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 --- Generation Time: Jul 03, 2016 at 11:30 AM +-- Generation Time: Jul 19, 2016 at 03:55 PM -- Server version: 5.6.21 -- PHP Version: 5.6.3 @@ -23,69 +23,19 @@ SET time_zone = "+00:00"; -- -------------------------------------------------------- -- --- Table structure for table `bl_cat` +-- Table structure for table `brands` -- -CREATE TABLE IF NOT EXISTS `bl_cat` ( - `id` int(11) NOT NULL, - `category` varchar(32) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Dumping data for table `bl_cat` --- - -INSERT INTO `bl_cat` (`id`, `category`) VALUES -(1, 'dress'), -(2, 'jeans'), -(3, 'boots'), -(4, 'jackets'), -(5, 'shirts'), -(6, 'outwear'), -(7, 'blazers'), -(8, 'sweaters'); - --- -------------------------------------------------------- - --- --- Table structure for table `bl_tag` --- - -CREATE TABLE IF NOT EXISTS `bl_tag` ( - `id` int(11) NOT NULL, - `tag` varchar(32) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Dumping data for table `bl_tag` --- - -INSERT INTO `bl_tag` (`id`, `tag`) VALUES -(1, 'dress'), -(2, 'jeans'), -(3, 'boots'), -(4, 'jackets'), -(5, 'shirts'), -(6, 'outwear'), -(7, 'blazers'), -(8, 'sweaters'); - --- -------------------------------------------------------- - --- --- Table structure for table `brand` --- - -CREATE TABLE IF NOT EXISTS `brand` ( +CREATE TABLE IF NOT EXISTS `brands` ( `brand_id` int(11) NOT NULL, `brand` varchar(45) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; -- --- Dumping data for table `brand` +-- Dumping data for table `brands` -- -INSERT INTO `brand` (`brand_id`, `brand`) VALUES +INSERT INTO `brands` (`brand_id`, `brand`) VALUES (1, 'Gucci'), (2, 'Dior'), (3, 'Moschino'), @@ -232,15 +182,15 @@ INSERT INTO `color_product` (`id`, `product_id`, `color_id`) VALUES (59, 43, 6), (60, 36, 1), (61, 47, 2), -(62, 48, 2), +(62, 48, 3), (63, 49, 2), (64, 50, 2), -(65, 51, 2), +(65, 51, 6), (66, 52, 2), (67, 53, 2), (68, 54, 4), (69, 54, 7), -(70, 55, 4), +(70, 55, 6), (71, 56, 7), (72, 57, 4), (73, 57, 5), @@ -257,7 +207,7 @@ INSERT INTO `color_product` (`id`, `product_id`, `color_id`) VALUES (84, 65, 1), (85, 66, 4), (86, 66, 7), -(87, 67, 4), +(87, 67, 3), (88, 68, 1), (89, 69, 1), (90, 70, 3), @@ -634,32 +584,6 @@ INSERT INTO `customers` (`id`, `user_id`, `country`, `city`, `postcode`, `name`, -- -------------------------------------------------------- --- --- Table structure for table `images_tmp` --- - -CREATE TABLE IF NOT EXISTS `images_tmp` ( -`img_id` int(11) NOT NULL, - `images` varchar(45) NOT NULL -) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; - --- --- Dumping data for table `images_tmp` --- - -INSERT INTO `images_tmp` (`img_id`, `images`) VALUES -(1, '51809-pmo000a.jpg'), -(2, '8f2b0-pmo000b.jpg'), -(3, 'ee087-pmo000c.jpg'), -(4, '9c53b-mtk006a.jpg'), -(5, '37a0b-mtk006b.jpg'), -(6, '295af-mtk006t.jpg'), -(7, '25cd2-mtk009a.jpg'), -(8, 'ba14e-mtk009b.jpg'), -(9, '58e6f-mtk009t.jpg'); - --- -------------------------------------------------------- - -- -- Table structure for table `migrations` -- @@ -874,45 +798,6 @@ CREATE TABLE IF NOT EXISTS `permission_user` ( -- -------------------------------------------------------- --- --- Table structure for table `portfolio` --- - -CREATE TABLE IF NOT EXISTS `portfolio` ( - `id` int(11) NOT NULL, - `priority` int(11) NOT NULL, - `url` varchar(32) DEFAULT NULL, - `title` varchar(32) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Dumping data for table `portfolio` --- - -INSERT INTO `portfolio` (`id`, `priority`, `url`, `title`) VALUES -(1, 2, 'e96e9-a1.jpg', 'Nissan'), -(2, 1, 'd70f1-a2.jpg', 'Lambo1'), -(4, 1, 'c2510-a3.jpg', 'Lambo2'), -(5, 2, 'a0809-a6.jpg', 'Audi\n'), -(6, 2, '32d56-a9.jpg', 'Honda'), -(7, 3, '98e8a-i9.jpg', 'int_1'), -(8, 3, 'b5fd8-i12.jpg', 'int_2'), -(10, 1, '9730c-a8.jpg', 'Mitsubishi'), -(11, 2, '396d5-a10.jpg', 'beast'), -(12, 2, 'a4d7f-a7.jpg', 'audi_2'), -(1, 2, 'e96e9-a1.jpg', 'Nissan'), -(2, 1, 'd70f1-a2.jpg', 'Lambo1'), -(4, 1, 'c2510-a3.jpg', 'Lambo2'), -(5, 2, 'a0809-a6.jpg', 'Audi\n'), -(6, 2, '32d56-a9.jpg', 'Honda'), -(7, 3, '98e8a-i9.jpg', 'int_1'), -(8, 3, 'b5fd8-i12.jpg', 'int_2'), -(10, 1, '9730c-a8.jpg', 'Mitsubishi'), -(11, 2, '396d5-a10.jpg', 'beast'), -(12, 2, 'a4d7f-a7.jpg', 'audi_2'); - --- -------------------------------------------------------- - -- -- Table structure for table `posts` -- @@ -947,32 +832,6 @@ INSERT INTO `posts` (`post_id`, `user_id`, `username`, `title`, `content`, `cate -- -------------------------------------------------------- --- --- Table structure for table `productimg_tmp` --- - -CREATE TABLE IF NOT EXISTS `productimg_tmp` ( - `product_id` int(11) DEFAULT NULL, - `img_id` int(11) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Dumping data for table `productimg_tmp` --- - -INSERT INTO `productimg_tmp` (`product_id`, `img_id`) VALUES -(2, 1), -(2, 2), -(2, 3), -(1, 6), -(1, 5), -(1, 4), -(4, 7), -(4, 9), -(4, 8); - --- -------------------------------------------------------- - -- -- Table structure for table `products` -- @@ -1418,21 +1277,9 @@ INSERT INTO `users` (`id`, `name`, `avatar`, `email`, `password`, `remember_toke -- -- --- Indexes for table `bl_cat` +-- Indexes for table `brands` -- -ALTER TABLE `bl_cat` - ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `id` (`id`); - --- --- Indexes for table `bl_tag` --- -ALTER TABLE `bl_tag` - ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `id` (`id`); - --- --- Indexes for table `brand` --- -ALTER TABLE `brand` +ALTER TABLE `brands` ADD PRIMARY KEY (`brand_id`); -- @@ -1477,12 +1324,6 @@ ALTER TABLE `currencies` ALTER TABLE `customers` ADD PRIMARY KEY (`id`); --- --- Indexes for table `images_tmp` --- -ALTER TABLE `images_tmp` - ADD PRIMARY KEY (`img_id`); - -- -- Indexes for table `orders` -- @@ -1531,12 +1372,6 @@ ALTER TABLE `permission_user` ALTER TABLE `posts` ADD PRIMARY KEY (`post_id`), ADD UNIQUE KEY `post_id` (`post_id`), ADD KEY `fk_posts_users_idx` (`user_id`), ADD KEY `fk_posts_comments_idx` (`post_id`); --- --- Indexes for table `productimg_tmp` --- -ALTER TABLE `productimg_tmp` - ADD KEY `fk_images_products_idx` (`product_id`); - -- -- Indexes for table `products` -- @@ -1602,9 +1437,9 @@ ALTER TABLE `users` -- -- --- AUTO_INCREMENT for table `brand` +-- AUTO_INCREMENT for table `brands` -- -ALTER TABLE `brand` +ALTER TABLE `brands` MODIFY `brand_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=8; -- -- AUTO_INCREMENT for table `categories` @@ -1642,11 +1477,6 @@ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4; ALTER TABLE `customers` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=40; -- --- AUTO_INCREMENT for table `images_tmp` --- -ALTER TABLE `images_tmp` -MODIFY `img_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=10; --- -- AUTO_INCREMENT for table `orders` -- ALTER TABLE `orders` @@ -1744,17 +1574,11 @@ ALTER TABLE `permission_user` ADD CONSTRAINT `permission_user_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `permission_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; --- --- Constraints for table `productimg_tmp` --- -ALTER TABLE `productimg_tmp` -ADD CONSTRAINT `fk_images_products` FOREIGN KEY (`product_id`) REFERENCES `products` (`product_id`) ON DELETE CASCADE ON UPDATE CASCADE; - -- -- Constraints for table `products` -- ALTER TABLE `products` -ADD CONSTRAINT `fk_products_brand` FOREIGN KEY (`brand_id`) REFERENCES `brand` (`brand_id`) ON DELETE CASCADE ON UPDATE CASCADE, +ADD CONSTRAINT `fk_products_brand` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`brand_id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `fk_products_categories` FOREIGN KEY (`cat_id`) REFERENCES `categories` (`cat_id`) ON DELETE CASCADE ON UPDATE CASCADE; -- diff --git a/database/migrations/0000_00_00_000000_create_dump_table.php b/database/migrations/0000_00_00_000000_create_dump_table.php new file mode 100644 index 0000000..f0ea13c --- /dev/null +++ b/database/migrations/0000_00_00_000000_create_dump_table.php @@ -0,0 +1,26 @@ +\r\n The cousin had a point. Consider Casasola’s spring/ summer 2014 lineup, which, inspired by the work of Brazilian constructivist master Lygia Clark, explores the duality of discipline and sensuality: There is something decidedly not of this century about the evening dresses—and they are almost all evening dresses, with a few soigné jumpsuits and pencil skirts in the mix—that she crafts from unembellished satins, cadys, and organzas, with hems cropped just above the ankle. “A lot of people think it makes you look shorter,” says Casasola of her preferred silhouette. “But it’s the other way around.”

\r\n

\r\n This courage of conviction allows such friends of the designer as Caroline Issa and Brazilian princess Paola Orléans e Bragança and other fans—like, say, Gwyneth Paltrow—to stand tall in her designs. (The five-inch pumps she collaborated on with Manolo Blahnik also help). Casasola has a Central Saint Martins degree and design work at Lanvin on her résumé, but she says she learned the most from her seamstress grandmother, who never left the house in anything but a maxi-length. The lesson, she says: “Luxury is simplicity.”

\r\n', '1', '1', '7.jpg', '2015-06-27 21:18:15'), +(2, 2, 'tihomir blajev', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.', '

\r\n Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi.

\r\n', '2', '2', '8.jpg', '2015-06-30 15:48:45'), +(3, 2, 'tihomir blajev', 'Lorem ipsum dolor sit amet', '

\r\n Phasellus ultrices nulla quis nibh. Quisque a lectus. Donec consectetuer ligula vulputate sem tristique cursus. Nam nulla quam, gravida non, commodo a, sodales sit amet, nisi.

\r\n', '3', '3', '10.jpg', '2015-07-01 17:35:22'), +(4, 2, 'tihomir blajev', 'Aliquam tincidunt mauris eu risus.', '

\r\n Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat.

\r\n', '1', '1', '9.jpg', '2015-07-01 18:20:05'), +(5, 2, 'tihomir blajev', 'Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.', '

\r\n Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.

\r\n', '1', '1', '11.jpg', '2015-07-01 18:21:17'), +(6, 2, 'tihomir blajev', 'Vestibulum auctor dapibus neque.', '

\r\n Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus

\r\n', '3', '3', 'ede0b-12.jpg', '2015-07-02 11:19:36'), +(7, 2, 'tihomir blajev', 'Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna', '
\r\n Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna 
\r\n
\r\n aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea 
\r\n
\r\n commodo consequat.
\r\n', '3', '3', '29855-13.jpg', '2015-07-01 22:08:07'), +(8, 2, 'tihomir blajev', 'Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.', '

\r\n Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.

\r\n', '2', '2', '07718-14.jpg', '2015-07-01 23:12:18'), +(9, 2, 'tihomir blajev', ' Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna.', '

\r\n Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.

\r\n', '2', '2', '4f53f-15.jpg', '2015-07-01 22:12:00'), +(10, 2, 'tihomir blajev', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.', 'Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.', '8', '8', '41.jpg', '2015-09-21 20:31:52'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `productimg_tmp` +-- + +CREATE TABLE IF NOT EXISTS `productimg_tmp` ( + `product_id` int(11) DEFAULT NULL, + `img_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `productimg_tmp` +-- + +INSERT INTO `productimg_tmp` (`product_id`, `img_id`) VALUES +(2, 1), +(2, 2), +(2, 3), +(1, 6), +(1, 5), +(1, 4), +(4, 7), +(4, 9), +(4, 8); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `products` +-- + +CREATE TABLE IF NOT EXISTS `products` ( +`product_id` int(11) NOT NULL, + `slug` varchar(45) NOT NULL, + `name` varchar(45) NOT NULL, + `description` mediumtext NOT NULL, + `a_img` varchar(45) NOT NULL, + `b_img` varchar(45) NOT NULL, + `c_img` varchar(45) NOT NULL, + `brand_id` int(11) NOT NULL, + `cat_id` int(11) NOT NULL, + `parent_id` int(11) NOT NULL, + `quantity` int(11) DEFAULT NULL, + `price` float NOT NULL +) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `products` +-- + +INSERT INTO `products` (`product_id`, `slug`, `name`, `description`, `a_img`, `b_img`, `c_img`, `brand_id`, `cat_id`, `parent_id`, `quantity`, `price`) VALUES +(1, 'CK-Blue-Schoolboy-Blazer', 'CK Blue Schoolboy Blazer', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', 'ed60e-mpd000c.jpg', 'df7b4-mpd000t.jpg', '09a16-mpd000t_6.jpg', 5, 7, 1, 8, 25), +(2, 'Dior-Blue-Peacoat-Trench', 'Dior Blue Peacoat Trench', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '0c88d-mtk009a.jpg', '1d3f9-mtk009b.jpg', '604e7-mtk009t.jpg', 2, 3, 1, 5, 15), +(3, 'Fendi-Waxed-Blue-Jacket', 'Fendi Waxed Blue Jacket', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '51c1b-pmo000a.jpg', 'c10d9-pmo000b.jpg', 'bdb32-pmo000c.jpg', 7, 9, 1, 3, 80), +(4, 'Gucci-Red-Neck-Sweater', 'Gucci Red Neck Sweater', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '8d383-mtk006a.jpg', '07e30-mtk006b.jpg', '9cbb3-mtk006t.jpg', 1, 3, 1, 5, 12), +(5, 'Pepe-Jeans-Outwear-Jeans', 'Pepe Jeans Outwear Jeans', '

\r\n Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium.

\r\n', 'f0a95-mpd000a.jpg', '87131-mpd000b.jpg', '', 4, 8, 1, 23, 19), +(6, 'DKNY-Brown-Line-Jeans', 'DKNY Brown Line Jeans', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '94efc-mpd012a.jpg', '35a3f-mpd012b.jpg', 'aa423-mpd012t.jpg', 6, 6, 1, 45, 7), +(7, 'Moschino-Violet-Shirt ', 'Moschino Violet Shirt ', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', 'd4bfb-mtk000a.jpg', '0dfc6-mtk000b.jpg', '52d0c-mtk000t.jpg', 3, 5, 1, 67, 6), +(8, 'Pepe-Jeans-Blue-Retro', 'Pepe Jeans Blue Retro', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', 'e11b9-mpd006a.jpg', '01bc5-mpd006b.jpg', '', 4, 6, 1, 32, 37), +(9, 'Gucci-Brown-Jeans', 'Gucci Brown Jeans', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '9e254-mpd003a.jpg', '80540-mpd003b.jpg', 'c4a7d-mpd003t.jpg', 1, 6, 1, 31, 32), +(10, 'Dior-Brown-Mens-Shirt', 'Dior Brown Mens Shirt', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '543ea-mtk004a.jpg', '97d6f-mtk004t.jpg', '', 2, 5, 1, 78, 5), +(11, 'Fendi-White-Jacket', 'Fendi White Jacket', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', 'c6b37-pmtk001c.jpg', '04ec4-pmtk001t.jpg', '', 7, 9, 1, 1, 99), +(12, 'Dior-Black-Long-Blazer', 'Dior Black Long Blazer', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', 'dd8f7-pmo001a.jpg', 'd071b-pmo001b.jpg', 'd4450-pmo001t.jpg', 2, 7, 1, 3, 89), +(13, 'CK-Shell-Black-Blazer', 'CK Shell Black Blazer', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '3a815-pmo002a.jpg', '6cb7c-pmo002b.jpg', '3e659-pmo002t.jpg', 5, 7, 1, 4, 94), +(14, 'Fendi-Brown-Skinny-Jeans', 'Fendi Brown Skinny Jeans', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '56245-pmp002a.jpg', '1f543-pmp002b.jpg', '892a5-pmp002t.jpg', 7, 6, 1, 42, 54), +(15, 'DKNY-Black-Neck-Sweater', 'DKNY Black Neck Sweater', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '10551-pmtk006a.jpg', '594d8-pmtk006t.jpg', '', 6, 3, 1, 32, 23), +(16, 'Moschino-White-Hoodie', 'Moschino White Hoodie', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', 'ebd78-pmtk004a.jpg', '74d1c-pmtk004b.jpg', '405b7-pmtk004t.jpg', 3, 3, 1, 34, 12), +(17, 'Pepe-Jeans-Stripe-Shirt', 'Pepe Jeans Stripe Shirt', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '57e1d-pmtk001a.jpg', '41715-pmtk001b.jpg', '', 4, 5, 1, 75, 10), +(18, 'Fendi-Blue-Neck-Shirt', 'Fendi Blue Neck Shirt', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', 'be78d-pms004a.jpg', 'ee0c7-pms004b.jpg', 'e84e4-pms004t.jpg', 7, 8, 1, 21, 32), +(19, 'Gucci-White-Sleeve-Shirt', 'Gucci White Sleeve Shirt', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '04776-pms000a.jpg', 'ef015-pms000b.jpg', 'bd7a2-pms000t.jpg', 1, 5, 1, 3, 32), +(20, 'CK-White-Heisen-Sweater', 'CK White Heisen Sweater', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', 'b2890-pmtk000a.jpg', 'd513f-pmtk000t.jpg', '', 5, 3, 1, 32, 23), +(21, 'DKNY-Red-Neck-Shirt', 'DKNY Red Neck Shirt', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', 'ea72e-mpd006t.jpg', '02090-pms003a.jpg', '', 6, 5, 1, 72, 19), +(22, 'Fendi-Navy-Front-Jacket', 'Fendi Navy Front Jacket', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', 'd52bb-pmtk005b.jpg', '93d69-pmtk005t.jpg', '', 7, 9, 1, 67, 21), +(23, 'Moschino-Shell-Viol-Shirt', 'Moschino Shell Viol Shirt', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', 'ee72c-1.jpg', 'a35ee-1_2.jpg', '', 3, 8, 1, 28, 9), +(24, 'Pepe-Jeans-Blue-Shirt', 'Pepe Jeans Blue Shirt', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '1d60f-2.jpg', '43f35-2_2.jpg', '', 4, 8, 1, 71, 27), +(25, 'Moschino-White-Jacket', 'Moschino White Jacket', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '1ddb2-9.jpg', '88519-9_2.jpg', '', 3, 3, 1, 30, 23), +(26, 'Gucci-Fine-Sweaters', 'Gucci Fine Sweaters', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '6201a-8.jpg', '646e6-8_2.jpg', '', 1, 3, 1, 34, 16), +(27, 'Fendi-Black-Stripe-Shirt', 'Fendi Black Stripe Shirt', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.', '9fee1-7_2.jpg', '5a8ba-7.jpg', '', 7, 5, 1, 23, 19), +(28, 'CK-Blue-Nautical-Shirt', 'CK Blue Nautical Shirt', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '68d00-4.jpg', '093a2-4_2.jpg', '', 5, 6, 1, 67, 37), +(29, 'Dior-White-Shirt', 'Dior White Shirt', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '727db-5.jpg', '36cb0-5_2.jpg', '', 2, 8, 1, 21, 22), +(30, 'DKNY-Blue-Sleeve-Shirt ', 'DKNY Blue Sleeve Shirt ', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '2bf67-6.jpg', '97b6b-6_2.jpg', '', 6, 8, 1, 6, 27), +(31, 'CK-Jeans-Mid-Wash', 'CK Jeans Mid Wash', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', 'de5e1-image1.jpg', '277fa-image2.jpg', 'b9e23-image3.jpg', 5, 6, 1, 76, 35), +(32, 'DKNY-White-Lapell-Blazer', 'DKNY White Lapell Blazer', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '11f4f-image1xxl.jpg', 'ae5f0-image2xxl.jpg', '70794-image4xxl.jpg', 6, 7, 1, 41, 56), +(36, 'Moschino-Red-Jacket', 'Moschino Red Jacket', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.>

\r\n', '481c6-m0.jpg', '5ca87-m1.jpg', 'd394f-m2.jpg', 3, 9, 1, 60, 31), +(37, 'CK-Violet-Jacket-Arc', 'CK Violet Jacket Arc', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '429a3-image1xxl-3-.jpg', '48fc8-image2xxl-3-.jpg', '', 5, 8, 1, 32, 101), +(38, 'Fendi-Blue-Jacket ', 'Fendi Blue Jacket ', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', 'edcd0-image1xxl-5-.jpg', '62db1-image2xxl-5-.jpg', '1a69c-image3xxl-4-.jpg', 7, 9, 1, 41, 38), +(39, 'Pepe-Jeans-Violet-Blazer', 'Pepe Jeans Violet Blazer', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', 'be3aa-image11.jpg', 'ba959-image4xxl-1-.jpg', 'ccb74-image2xxl-7-.jpg', 4, 7, 1, 2, 108), +(40, 'Pepe-Jeans-Vintage-1969', 'Pepe Jeans Vintage 1969', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '742e0-image1xxl-7-.jpg', 'a8337-image2xxl-8-.jpg', 'cf60e-image4xxl-2-.jpg', 4, 6, 1, 55, 34), +(41, 'Moschino-Blue-Sweater', 'Moschin Blue Sweater', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '086c2-a1.jpg', '929fb-a2.jpg', 'c5e8e-a3.jpg', 3, 3, 1, 11, 11), +(42, 'Fendi-Tuxedo-Blazer', 'Fendi Tuxedo Blazer', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '729d0-b1.jpg', 'dae7a-b3.jpg', 'cd9f8-b2.jpg', 7, 7, 1, 1, 103), +(43, 'CK-Violet-Blazer', 'CK Violet Blazer', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '0455e-c1.jpg', '94765-c3.jpg', 'c3d77-c2.jpg', 5, 7, 1, 5, 108), +(44, 'Dior-Black-Shirt-Stripe', 'Dior Black Shirt Stripe', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', '39915-v1.jpg', '9b7f8-v2.jpg', '1f9e4-v3.jpg', 2, 5, 1, 53, 6), +(45, 'Fendi-Red-T-Shirt', 'Fendi Red T-Shirt', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\r\n', 'c2ae6-n1.jpg', 'c5a0d-n2.jpg', '08ec9-n3.jpg', 7, 5, 1, 64, 5), +(46, 'DKNY-Black-Jacket', 'DKNY Black Jacket', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.\r\n', '7039c-image1xxl-6-.jpg', 'c3329-image4xxl-3-.jpg', '', 6, 9, 1, 23, 85), +(47, 'Dior-Blue-Women-Wrap', 'Dior Blue Women Wrap', '

\r\n Nice blue stylish wrap from famous brand Dior

\r\n', '3c47b-pwt001a_1.jpg', '5f9ad-pwt001b.jpg', 'd808a-pwt001t.jpg', 5, 10, 2, 11, 89), +(48, 'CK-Nice-Women-Blue-Wrap', 'CK Nice Women Blue Wrap', '

\r\n K Nice Women Blue Wrap. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper

\r\n', '53b38-wsd013a.jpg', '9d808-wsd013b.jpg', '6a8b5-wsd013t.jpg', 5, 10, 2, 5, 43), +(49, 'CK-Wrap-Women-Blue ', 'CK Wrap Women Blue ', '

\r\n Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper

\r\n', 'df290-wbk003a.jpg', '18b18-wbk003b.jpg', 'be567-wbk003t.jpg', 5, 10, 2, 6, 32), +(50, 'CK-Women-Wrap', 'CK Women Wrap', '

\r\n Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper

\r\n', '942b2-pwd000a.jpg', '31ccc-pwd000b.jpg', '840c9-pwd000t.jpg', 5, 10, 2, 23, 78), +(51, 'CL-Light-Blue-Wrap', 'CL Light Blue Wrap', '

\r\n Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper

\r\n', '0bc05-pwt000a.jpg', 'e4bc3-pwt000b.jpg', 'b9cf1-pwt000t.jpg', 5, 10, 2, 3, 39), +(52, 'CK-Wrap-Blue-Jeans', 'CK Wrap Blue Jeans', '

\r\n Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper

\r\n', 'e8086-wpd005a.jpg', 'c5317-wpd005b.jpg', '', 5, 10, 2, 45, 30), +(53, 'CK-Blue-Wrap-Shirt', 'CK Blue Wrap Shirt', '

\r\n Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper

\r\n', '0c2d2-wbk012c-royal-blue.jpg', 'c6269-wbk012d-pink.jpg', '', 5, 10, 2, 21, 56), +(54, 'Dior-White-Mini', 'Dior White Mini', '

\r\n Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.

\r\n', '35f37-wsd008a.jpg', 'c45b2-wsd008b.jpg', '2282b-wsd008t.jpg', 2, 11, 2, 20, 34), +(55, 'DKNY-Black-Mini', 'DKNY Black Mini', '

\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\r\n', 'a88c7-pwd001a.jpg', 'd10c8-pwd001b.jpg', '78a4b-pwd001t.jpg', 6, 11, 2, 4, 67), +(56, 'Gucci-White-Mini', 'Gucci White Mini', '

\r\n Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat.

\r\n', 'a1fe9-pwd002a.jpg', '7e425-pwd002b.jpg', '2defc-pwd002t.jpg', 1, 11, 2, 13, 22), +(57, 'Fendi-Brown-Mini', 'Fendi Brown Mini', '

\r\n Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat.

\r\n', '27081-pwt004a.jpg', '01f42-pwt004b.jpg', '3f214-pwt004t.jpg', 7, 11, 2, 19, 14), +(58, 'Pepe-Jeans-Black-Mini', 'Pepe Jeans Black Mini', '

\r\n Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat.

\r\n', 'e93d3-pwt003a.jpg', '9002f-pwt003t.jpg', '', 4, 11, 2, 34, 12), +(59, 'Moschino-Brown-Mini', 'Moschino Brown Mini', '

\r\n Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat.

\r\n', '0122b-wsd000t.jpg', '9e31b-wsd000a.jpg', '64625-wsd000b.jpg', 3, 11, 2, 29, 21), +(62, 'CK-White-Pleated-Top', 'CK White Pleated Top', '

\r\n Gluten-free quinoa selfies carles, kogi gentrify retro marfa viral. Odd future photo booth flannel ethnic pug, occupy keffiyeh synth blue bottle tofu tonx iphone. Blue bottle 90′s vice trust fund gastropub gentrify retro marfa viral. Gluten-free quinoa selfies carles, kogi gentrify retro marfa viral. Odd future photo booth flannel ethnic pug, occupy keffiyeh synth blue bottle tofu tonx iphone. Blue bottle 90′s vice trust fund gastropub gentrify retro marfa viral.

\r\n', '53103-11000876_4923878_480.jpg', '6df9e-11000876_4923882_480.jpg', '25079-11000876_4923876_480.jpg', 5, 15, 2, 45, 23), +(63, 'Dior-Brown-Tops', 'Dior Brown Tops', '

\r\n Gluten-free quinoa selfies carles, kogi gentrify retro marfa viral. Odd future photo booth flannel ethnic pug, occupy keffiyeh synth blue bottle tofu tonx iphone. Blue bottle 90′s vice trust fund gastropub gentrify retro marfa viral. Gluten-free quinoa selfies carles, kogi gentrify retro marfa viral. Odd future photo booth flannel ethnic pug, occupy keffiyeh synth blue bottle tofu tonx iphone. Blue bottle 90′s vice trust fund gastropub gentrify retro marfa viral.

\r\n', '832bd-11087120_5289707_480.jpg', '554fe-11087120_5289711_480.jpg', 'd44ce-11087120_5289701_480.jpg', 2, 15, 2, 32, 45), +(64, 'Gucci-Black-Top', 'Gucci Black Top', '

\r\n Gluten-free quinoa selfies carles, kogi gentrify retro marfa viral. Odd future photo booth flannel ethnic pug, occupy keffiyeh synth blue bottle tofu tonx iphone. Blue bottle 90′s vice trust fund gastropub gentrify retro marfa viral. Gluten-free quinoa selfies carles, kogi gentrify retro marfa viral. Odd future photo booth flannel ethnic pug, occupy keffiyeh synth blue bottle tofu tonx iphone. Blue bottle 90′s vice trust fund gastropub gentrify retro marfa viral

\r\n', '2b287-image2xxl-1-.jpg', '40749-image3xxl.jpg', '78689-image4xxl-1-.jpg', 1, 15, 2, 3, 27), +(65, 'Moschino-Red-Top', 'Moschino Red Top', '

\r\n Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.

\r\n', 'bc43c-image1xxl.jpg', '967a0-image2xxl.jpg', '21951-image4xxl.jpg', 3, 15, 2, 6, 34), +(66, 'DKNY-Black-Crop-Top', 'DKNY Black Crop Top', '

\r\n Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.

\r\n', 'ee456-image1xxl-1-.jpg', '294b5-image2xxl-2-.jpg', '4a8a8-image4xxl-2-.jpg', 6, 15, 2, 18, 20), +(67, 'Pepe-Jeans-Mini', 'Pepe Jeans Mini', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\r\n', '6e71c-image1xxl-2-.jpg', '759f6-image2xxl-3-.jpg', '0a402-image4xxl-3-.jpg', 4, 11, 2, 8, 16), +(68, 'Fendi-Red-Top', 'Fendi Red Top', 'Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat.\r\n', '547c8-image1xxl-4-.jpg', 'd3fdb-image2xxl-4-.jpg', 'ec72c-image4xxl-5-.jpg', 7, 15, 2, 2, 12), +(69, 'CK-Graphic-Top', 'CK Graphic Top', '

\r\n Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque.

\r\n', '5ded8-image1xxl-5-.jpg', '372d5-image2xxl-5-.jpg', '74840-image4xxl-6-.jpg', 5, 15, 2, 8, 9), +(70, 'Pepe-Green-Shirt', 'Pepe Green Shirt', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam tincidunt rhoncus malesuada. Cras consequat pharetra accumsan. Vivamus condimentum nibh sapien, eget lobortis libero feugiat ultricies. Curabitur ac libero tempus, congue magna sit amet, hendrerit tellus. Curabitur laoreet mattis maximus. In egestas ex in neque molestie, at lobortis odio luctus. Cras porta arcu vel mi commodo sodales. Mauris porttitor ante orci, id gravida lorem rhoncus nec. Praesent dapibus sapien a lacus egestas, vitae dapibus nibh dictum. Integer vel mauris diam. Mauris eleifend pulvinar augue. Mauris sollicitudin ligula id mattis condimentum. Duis ac tristique est. Integer facilisis, diam nec tempor congue, leo massa pulvinar purus, interdum laoreet nibh sem sed felis. Fusce tristique cursus urna a bibendum.', '2f92d-green.jpg', '', '', 4, 5, 1, 28, 7), +(79, 'Gucci-Black-Top', 'Gucci Black Top', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur consequat faucibus sollicitudin. Sed nec fringilla nibh. Sed maximus finibus purus, eu volutpat arcu aliquet sit amet. Sed cursus ipsum sit amet elit sagittis, ac faucibus libero ultricies. In tempor velit vel dictum rhoncus. Morbi in ante commodo, condimentum felis in, lobortis ante. Praesent vitae magna ultricies, rutrum lorem et, iaculis nunc. Curabitur finibus neque neque, at consectetur tellus tristique ac. Praesent eu sollicitudin magna, in placerat nisi.\r\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur consequat faucibus sollicitudin. Sed nec fringilla nibh. Sed maximus finibus purus, eu volutpat arcu aliquet sit amet.', '6e71c-image1xxl-2-.jpg', '', '', 1, 15, 2, 8, 11), +(80, 'DKNY-Green-Shirt', 'DKNY Green Shirt', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin elementum nibh nulla, eget gravida libero venenatis ac. Praesent sit amet metus cursus, ultricies ligula ut, sollicitudin libero. Phasellus sagittis posuere nisl sit amet eleifend. Ut nec metus feugiat, mollis ante vel, auctor orci. Phasellus sit amet vestibulum tortor. Praesent dignissim magna ut arcu ornare, a fringilla ipsum ultrices. Integer eros dolor, volutpat eget orci viverra, suscipit rhoncus arcu. Phasellus bibendum non turpis nec cursus. Pellentesque fringilla venenatis justo, ac pretium enim malesuada sit amet.\r\nNulla semper metus sit amet suscipit pellentesque. Maecenas ultrices tempor auctor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec feugiat sollicitudin nibh, vel sollicitudin nulla elementum quis.', '2bf67-6.jpg', '', '', 6, 5, 1, 20, 25); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `product_size` +-- + +CREATE TABLE IF NOT EXISTS `product_size` ( +`id` int(11) NOT NULL, + `product_id` int(11) DEFAULT NULL, + `size_id` int(11) NOT NULL +) ENGINE=InnoDB AUTO_INCREMENT=177 DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `product_size` +-- + +INSERT INTO `product_size` (`id`, `product_id`, `size_id`) VALUES +(1, 2, 3), +(2, 2, 1), +(3, 1, 2), +(4, 1, 6), +(5, 1, 7), +(6, 3, 4), +(7, 3, 3), +(8, 3, 1), +(9, 4, 3), +(10, 4, 5), +(11, 2, 6), +(12, 5, 6), +(13, 5, 7), +(14, 6, 3), +(15, 6, 1), +(16, 6, 5), +(17, 7, 4), +(18, 7, 1), +(19, 7, 2), +(20, 8, 4), +(21, 8, 6), +(22, 8, 7), +(24, 10, 4), +(25, 10, 1), +(26, 10, 5), +(27, 11, 6), +(28, 12, 4), +(29, 12, 6), +(30, 13, 5), +(31, 13, 6), +(32, 15, 4), +(33, 15, 2), +(34, 16, 3), +(35, 16, 5), +(36, 16, 6), +(37, 17, 4), +(38, 18, 6), +(39, 18, 7), +(40, 19, 4), +(41, 19, 3), +(42, 19, 1), +(43, 20, 3), +(44, 20, 1), +(45, 20, 6), +(46, 21, 1), +(47, 21, 2), +(48, 22, 3), +(49, 22, 2), +(50, 22, 7), +(51, 23, 4), +(52, 23, 3), +(53, 23, 2), +(54, 24, 6), +(55, 25, 6), +(56, 26, 6), +(57, 26, 7), +(58, 27, 4), +(59, 27, 5), +(60, 27, 6), +(61, 28, 4), +(62, 29, 3), +(63, 29, 2), +(64, 30, 6), +(65, 30, 7), +(66, 31, 5), +(67, 31, 6), +(68, 32, 3), +(69, 32, 5), +(71, 36, 5), +(72, 36, 6), +(73, 36, 7), +(74, 37, 4), +(75, 37, 3), +(76, 38, 5), +(77, 38, 6), +(79, 39, 5), +(80, 40, 5), +(81, 41, 4), +(82, 41, 6), +(83, 42, 6), +(84, 43, 6), +(85, 44, 6), +(86, 44, 7), +(87, 45, 4), +(88, 45, 6), +(89, 46, 3), +(90, 46, 6), +(91, 47, 3), +(92, 47, 1), +(93, 47, 6), +(94, 48, 4), +(95, 48, 3), +(96, 48, 1), +(97, 49, 3), +(98, 49, 1), +(99, 50, 1), +(100, 51, 3), +(101, 52, 4), +(102, 52, 5), +(103, 53, 3), +(104, 54, 3), +(105, 54, 1), +(106, 54, 2), +(107, 55, 5), +(108, 56, 4), +(109, 56, 3), +(110, 56, 5), +(111, 57, 3), +(112, 57, 1), +(113, 57, 6), +(114, 58, 4), +(115, 58, 3), +(116, 58, 2), +(117, 58, 6), +(118, 59, 4), +(119, 59, 3), +(120, 59, 1), +(121, 62, 3), +(122, 62, 1), +(123, 62, 5), +(124, 63, 4), +(125, 63, 1), +(126, 63, 5), +(127, 64, 4), +(128, 64, 3), +(129, 64, 1), +(130, 64, 5), +(131, 65, 4), +(132, 65, 3), +(133, 65, 2), +(134, 66, 4), +(135, 66, 3), +(136, 66, 5), +(137, 67, 4), +(138, 67, 1), +(139, 67, 2), +(140, 68, 3), +(141, 68, 5), +(142, 68, 2), +(145, 70, 1), +(146, 70, 5), +(147, 70, 7), +(154, 69, 3), +(155, 69, 5), +(156, 69, 7), +(161, 9, 4), +(162, 9, 6), +(163, 9, 7), +(172, 79, 1), +(173, 79, 2), +(174, 80, 1), +(175, 80, 4), +(176, 80, 5); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `roles` +-- + +CREATE TABLE IF NOT EXISTS `roles` ( +`id` int(10) unsigned NOT NULL, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `level` int(11) NOT NULL DEFAULT '1', + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- +-- Dumping data for table `roles` +-- + +INSERT INTO `roles` (`id`, `name`, `slug`, `description`, `level`, `created_at`, `updated_at`) VALUES +(1, 'Admin', 'admin', 'adminrole', 1, '2016-01-03 11:05:22', '2016-01-03 11:05:22'), +(2, 'User', 'user', 'userrole', 2, '2016-01-03 11:07:22', '2016-01-03 11:07:22'), +(3, 'Editor', 'editor', 'editors', 3, '2016-04-25 04:16:31', '2016-04-25 04:16:31'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `role_user` +-- + +CREATE TABLE IF NOT EXISTS `role_user` ( +`id` int(10) unsigned NOT NULL, + `role_id` int(10) unsigned NOT NULL, + `user_id` int(10) unsigned NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- +-- Dumping data for table `role_user` +-- + +INSERT INTO `role_user` (`id`, `role_id`, `user_id`, `created_at`, `updated_at`) VALUES +(1, 1, 1, '2016-01-03 11:05:38', '2016-01-03 11:05:38'), +(2, 2, 2, '2016-01-03 11:07:31', '2016-01-03 11:07:31'), +(3, 2, 4, '2016-04-25 04:17:04', '2016-04-25 04:17:04'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `settings` +-- + +CREATE TABLE IF NOT EXISTS `settings` ( +`id` int(11) NOT NULL, + `title` varchar(32) NOT NULL, + `keyword` longtext NOT NULL, + `description` varchar(32) NOT NULL +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `settings` +-- + +INSERT INTO `settings` (`id`, `title`, `keyword`, `description`) VALUES +(1, 'EShop eCommerce CMS', 'CMS, eCommerce, Bootstrap,Template, Theme, Responsive, Fluid, Retina', 'EShop eCommerce CMS'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `shippings` +-- + +CREATE TABLE IF NOT EXISTS `shippings` ( +`id` int(11) NOT NULL, + `method` varchar(32) NOT NULL, + `img` varchar(32) NOT NULL, + `rate` int(11) NOT NULL +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `shippings` +-- + +INSERT INTO `shippings` (`id`, `method`, `img`, `rate`) VALUES +(1, 'United States Postal Service', 'standart_post.jpg', 15), +(2, 'UPS', 'excluseve_post.jpg', 20), +(3, 'DHL', 'vip_post.jpg', 10), +(4, 'FedEx', 'premium_post.jpg', 35); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `shoppingcart` +-- + +CREATE TABLE IF NOT EXISTS `shoppingcart` ( + `identifier` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `instance` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `content` longtext COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `sizes` +-- + +CREATE TABLE IF NOT EXISTS `sizes` ( +`id` int(11) NOT NULL, + `size_id` int(11) NOT NULL, + `size` varchar(32) NOT NULL +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `sizes` +-- + +INSERT INTO `sizes` (`id`, `size_id`, `size`) VALUES +(1, 1, 'S'), +(2, 2, 'XS'), +(3, 3, 'M'), +(4, 4, 'L'), +(5, 5, 'XL'), +(6, 6, 'XXL'), +(7, 7, 'XXXL'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `taxes` +-- + +CREATE TABLE IF NOT EXISTS `taxes` ( +`id` int(11) NOT NULL, + `name` varchar(32) NOT NULL, + `code` varchar(32) NOT NULL, + `discount` decimal(10,0) NOT NULL +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `taxes` +-- + +INSERT INTO `taxes` (`id`, `name`, `code`, `discount`) VALUES +(1, '20%', 'TAB4680', '20'), +(2, 'VAT', 'VAT', '10'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `users` +-- + +CREATE TABLE IF NOT EXISTS `users` ( +`id` int(10) unsigned NOT NULL, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `avatar` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `password` varchar(60) COLLATE utf8_unicode_ci NOT NULL, + `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- +-- Dumping data for table `users` +-- + +INSERT INTO `users` (`id`, `name`, `avatar`, `email`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES +(1, 'Tihomir', 'ui-zac.jpg', 'raylight75@gmail.com', '$2y$10$b17mr2swLgWrdJ2Mka6Ilegy0.kJPBgE1R/b1Y7Bsnc5VVBCDL.Rq', '7mvUfaX20SkCbwBGOyqOpZyLXSuHz9yLf5bmQM4wnqxnpZYHv2R0AR6x09aS', '2016-01-03 08:48:36', '2016-06-30 17:35:19'), +(2, 'Ivan', 'ui-sherman.jpg', 'tblajev@yahoo.com', '$2y$10$uQSDi6zBHxVU83adaZHjFOHqFAQWHZSPvNl6.R6EuOcRa30HlcUIi', 'tD4CHQVFyVYk0QbOfVN83HP6yPOjmy1ohzhFTfvHmfuk3J59Iw8QpohUYPeg', '2016-01-03 10:58:24', '2016-07-03 06:26:05'), +(4, 'Ana', 'avatar-ani.jpg', 'ana.blajeva@abv.bg', '$2y$10$EDFjGgQ/Q8i00mrbXMU5VOIYeS/pfwI3iZubj4v0yuYJB4NjrdEwi', '5uZYJVLbz63BHLy2ycRQGJ6YQTx1Vcu6aNgq8qlt3GoeHd6eagIn1XsdXKcv', '2016-04-19 06:02:27', '2016-07-03 06:25:30'); + +-- +-- Indexes for dumped tables +-- + +-- +-- Indexes for table `bl_cat` +-- +ALTER TABLE `bl_cat` + ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `id` (`id`); + +-- +-- Indexes for table `bl_tag` +-- +ALTER TABLE `bl_tag` + ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `id` (`id`); + +-- +-- Indexes for table `brands` +-- +ALTER TABLE `brands` + ADD PRIMARY KEY (`brand_id`); + +-- +-- Indexes for table `categories` +-- +ALTER TABLE `categories` + ADD PRIMARY KEY (`cat_id`), ADD KEY `fk_categories_categories_idx` (`parent_id`); + +-- +-- Indexes for table `colors` +-- +ALTER TABLE `colors` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `color_product` +-- +ALTER TABLE `color_product` + ADD PRIMARY KEY (`id`), ADD KEY `fk_productcolour_colour_idx` (`color_id`), ADD KEY `fk_productcolour_products_idx` (`product_id`); + +-- +-- Indexes for table `comments` +-- +ALTER TABLE `comments` + ADD PRIMARY KEY (`comments_id`); + +-- +-- Indexes for table `countries` +-- +ALTER TABLE `countries` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `currencies` +-- +ALTER TABLE `currencies` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `customers` +-- +ALTER TABLE `customers` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `images_tmp` +-- +ALTER TABLE `images_tmp` + ADD PRIMARY KEY (`img_id`); + +-- +-- Indexes for table `orders` +-- +ALTER TABLE `orders` + ADD PRIMARY KEY (`id`), ADD KEY `fk_orders_customers_idx` (`user_id`); + +-- +-- Indexes for table `order_status` +-- +ALTER TABLE `order_status` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `password_resets` +-- +ALTER TABLE `password_resets` + ADD KEY `password_resets_email_index` (`email`), ADD KEY `password_resets_token_index` (`token`); + +-- +-- Indexes for table `payments` +-- +ALTER TABLE `payments` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `permissions` +-- +ALTER TABLE `permissions` + ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `permissions_slug_unique` (`slug`); + +-- +-- Indexes for table `permission_role` +-- +ALTER TABLE `permission_role` + ADD PRIMARY KEY (`id`), ADD KEY `permission_role_permission_id_index` (`permission_id`), ADD KEY `permission_role_role_id_index` (`role_id`); + +-- +-- Indexes for table `permission_user` +-- +ALTER TABLE `permission_user` + ADD PRIMARY KEY (`id`), ADD KEY `permission_user_permission_id_index` (`permission_id`), ADD KEY `permission_user_user_id_index` (`user_id`); + +-- +-- Indexes for table `posts` +-- +ALTER TABLE `posts` + ADD PRIMARY KEY (`post_id`), ADD UNIQUE KEY `post_id` (`post_id`), ADD KEY `fk_posts_users_idx` (`user_id`), ADD KEY `fk_posts_comments_idx` (`post_id`); + +-- +-- Indexes for table `productimg_tmp` +-- +ALTER TABLE `productimg_tmp` + ADD KEY `fk_images_products_idx` (`product_id`); + +-- +-- Indexes for table `products` +-- +ALTER TABLE `products` + ADD PRIMARY KEY (`product_id`), ADD KEY `fk_products_brand_idx` (`brand_id`), ADD KEY `fk_products_categories_idx` (`cat_id`); + +-- +-- Indexes for table `product_size` +-- +ALTER TABLE `product_size` + ADD PRIMARY KEY (`id`), ADD KEY `fk_productsize_size_idx` (`size_id`), ADD KEY `fk_productsize_products1_idx` (`product_id`); + +-- +-- Indexes for table `roles` +-- +ALTER TABLE `roles` + ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `roles_slug_unique` (`slug`); + +-- +-- Indexes for table `role_user` +-- +ALTER TABLE `role_user` + ADD PRIMARY KEY (`id`), ADD KEY `role_user_role_id_index` (`role_id`), ADD KEY `role_user_user_id_index` (`user_id`); + +-- +-- Indexes for table `settings` +-- +ALTER TABLE `settings` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `shippings` +-- +ALTER TABLE `shippings` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `shoppingcart` +-- +ALTER TABLE `shoppingcart` + ADD PRIMARY KEY (`identifier`,`instance`); + +-- +-- Indexes for table `sizes` +-- +ALTER TABLE `sizes` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `taxes` +-- +ALTER TABLE `taxes` + ADD PRIMARY KEY (`id`); + +-- +-- Indexes for table `users` +-- +ALTER TABLE `users` + ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_email_unique` (`email`); + +-- +-- AUTO_INCREMENT for dumped tables +-- + +-- +-- AUTO_INCREMENT for table `brands` +-- +ALTER TABLE `brands` +MODIFY `brand_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `categories` +-- +ALTER TABLE `categories` +MODIFY `cat_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=16; +-- +-- AUTO_INCREMENT for table `colors` +-- +ALTER TABLE `colors` +MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `color_product` +-- +ALTER TABLE `color_product` +MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=93; +-- +-- AUTO_INCREMENT for table `comments` +-- +ALTER TABLE `comments` +MODIFY `comments_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `countries` +-- +ALTER TABLE `countries` +MODIFY `id` int(5) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=251; +-- +-- AUTO_INCREMENT for table `currencies` +-- +ALTER TABLE `currencies` +MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `customers` +-- +ALTER TABLE `customers` +MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=40; +-- +-- AUTO_INCREMENT for table `images_tmp` +-- +ALTER TABLE `images_tmp` +MODIFY `img_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=10; +-- +-- AUTO_INCREMENT for table `orders` +-- +ALTER TABLE `orders` +MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=52; +-- +-- AUTO_INCREMENT for table `order_status` +-- +ALTER TABLE `order_status` +MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=9; +-- +-- AUTO_INCREMENT for table `payments` +-- +ALTER TABLE `payments` +MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `permissions` +-- +ALTER TABLE `permissions` +MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `permission_role` +-- +ALTER TABLE `permission_role` +MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `permission_user` +-- +ALTER TABLE `permission_user` +MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT for table `posts` +-- +ALTER TABLE `posts` +MODIFY `post_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11; +-- +-- AUTO_INCREMENT for table `products` +-- +ALTER TABLE `products` +MODIFY `product_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=81; +-- +-- AUTO_INCREMENT for table `product_size` +-- +ALTER TABLE `product_size` +MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=177; +-- +-- AUTO_INCREMENT for table `roles` +-- +ALTER TABLE `roles` +MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `role_user` +-- +ALTER TABLE `role_user` +MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4; +-- +-- AUTO_INCREMENT for table `settings` +-- +ALTER TABLE `settings` +MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; +-- +-- AUTO_INCREMENT for table `shippings` +-- +ALTER TABLE `shippings` +MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; +-- +-- AUTO_INCREMENT for table `sizes` +-- +ALTER TABLE `sizes` +MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=8; +-- +-- AUTO_INCREMENT for table `taxes` +-- +ALTER TABLE `taxes` +MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT for table `users` +-- +ALTER TABLE `users` +MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; +-- +-- Constraints for dumped tables +-- + +-- +-- Constraints for table `permission_role` +-- +ALTER TABLE `permission_role` +ADD CONSTRAINT `permission_role_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE, +ADD CONSTRAINT `permission_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; + +-- +-- Constraints for table `permission_user` +-- +ALTER TABLE `permission_user` +ADD CONSTRAINT `permission_user_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE, +ADD CONSTRAINT `permission_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; + +-- +-- Constraints for table `productimg_tmp` +-- +ALTER TABLE `productimg_tmp` +ADD CONSTRAINT `fk_images_products` FOREIGN KEY (`product_id`) REFERENCES `products` (`product_id`) ON DELETE CASCADE ON UPDATE CASCADE; + +-- +-- Constraints for table `products` +-- +ALTER TABLE `products` +ADD CONSTRAINT `fk_products_brand` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`brand_id`) ON DELETE CASCADE ON UPDATE CASCADE, +ADD CONSTRAINT `fk_products_categories` FOREIGN KEY (`cat_id`) REFERENCES `categories` (`cat_id`) ON DELETE CASCADE ON UPDATE CASCADE; + +-- +-- Constraints for table `product_size` +-- +ALTER TABLE `product_size` +ADD CONSTRAINT `product_size_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `products` (`product_id`) ON DELETE CASCADE ON UPDATE CASCADE; + +-- +-- Constraints for table `role_user` +-- +ALTER TABLE `role_user` +ADD CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE, +ADD CONSTRAINT `role_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/resources/views/frontend/shop_filter.blade.php b/resources/views/frontend/shop_filter.blade.php index 1be2bdb..8115d64 100644 --- a/resources/views/frontend/shop_filter.blade.php +++ b/resources/views/frontend/shop_filter.blade.php @@ -28,6 +28,7 @@ {{(in_array($row->size_id, $size)) ? 'checked="checked"' : ''}}/> @endforeach @@ -42,7 +43,7 @@ {{(in_array($row->color_id, $color)) ? 'checked="checked"' : ''}}/> + {{$row->color}}({{$row->colorCount->aggregate}})