customer validation

This commit is contained in:
rahul shukla 2018-10-12 17:09:19 +05:30
commit c857dde9f4
75 changed files with 1576 additions and 913 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@
/public/css
/public/js
/public/vendor
/public/themes/*
/storage/*.key
/vendor
/.idea

View File

@ -18,6 +18,7 @@
"laravel/framework": "5.6.*",
"laravel/tinker": "^1.0",
"nwidart/laravel-modules": "^3.2",
"pragmarx/countries": "^0.5.9",
"prettus/l5-repository": "^2.6",
"propaganistas/laravel-intl": "^2.0"
},
@ -44,13 +45,15 @@
"webkul/laravel-theme": "self.version",
"webkul/laravel-shipping": "self.version",
"webkul/laravel-payment": "self.version",
"webkul/laravel-sales": "self.version"
"webkul/laravel-sales": "self.version",
"webkul/laravel-tax": "self.version"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/",
"Webkul\\User\\": "packages/Webkul/User/src",
@ -67,7 +70,8 @@
"Webkul\\Theme\\": "packages/Webkul/Theme/src",
"Webkul\\Shipping\\": "packages/Webkul/Shipping/src",
"Webkul\\Payment\\": "packages/Webkul/Payment/src",
"Webkul\\Sales\\": "packages/Webkul/Sales/src"
"Webkul\\Sales\\": "packages/Webkul/Sales/src",
"Webkul\\Tax\\": "packages/Webkul/Tax/src"
}
},
"autoload-dev": {

607
composer.lock generated
View File

@ -4,8 +4,72 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "762c5c196d8a9a7814101fd53d60b1cf",
"content-hash": "78d80b8455ca268cc52ce6456fee6ee0",
"packages": [
{
"name": "colinodell/json5",
"version": "v1.0.5",
"source": {
"type": "git",
"url": "https://github.com/colinodell/json5.git",
"reference": "8c73e1a5cd933ed0e29fb5d5997f23902bd9804c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/colinodell/json5/zipball/8c73e1a5cd933ed0e29fb5d5997f23902bd9804c",
"reference": "8c73e1a5cd933ed0e29fb5d5997f23902bd9804c",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-mbstring": "*",
"php": "^5.4.8|^7.0"
},
"require-dev": {
"mikehaertl/php-shellcommand": "^1.2.5",
"phpunit/phpunit": "^4.8.36|^7.3",
"squizlabs/php_codesniffer": "^2.3",
"symfony/finder": "^2.8|^3.4|^4.1"
},
"bin": [
"bin/json5"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"psr-4": {
"ColinODell\\Json5\\": "src"
},
"files": [
"src/global.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Colin O'Dell",
"email": "colinodell@gmail.com",
"homepage": "https://www.colinodell.com",
"role": "Developer"
}
],
"description": "UTF-8 compatible JSON5 parser for PHP",
"homepage": "https://github.com/colinodell/json5",
"keywords": [
"JSON5",
"json",
"json5_decode",
"json_decode"
],
"time": "2018-09-20T15:43:07+00:00"
},
{
"name": "commerceguys/intl",
"version": "v1.0.1",
@ -1506,6 +1570,219 @@
],
"time": "2018-03-19T15:50:49+00:00"
},
{
"name": "nette/caching",
"version": "v2.5.8",
"source": {
"type": "git",
"url": "https://github.com/nette/caching.git",
"reference": "7fba7c7ab2585fafb7b31152f2595e1551120555"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/caching/zipball/7fba7c7ab2585fafb7b31152f2595e1551120555",
"reference": "7fba7c7ab2585fafb7b31152f2595e1551120555",
"shasum": ""
},
"require": {
"nette/finder": "^2.2 || ~3.0.0",
"nette/utils": "^2.4 || ~3.0.0",
"php": ">=5.6.0"
},
"conflict": {
"nette/nette": "<2.2"
},
"require-dev": {
"latte/latte": "^2.4",
"nette/di": "^2.4 || ~3.0.0",
"nette/tester": "^2.0",
"tracy/tracy": "^2.4"
},
"suggest": {
"ext-pdo_sqlite": "to use SQLiteStorage or SQLiteJournal"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause",
"GPL-2.0",
"GPL-3.0"
],
"authors": [
{
"name": "David Grudl",
"homepage": "https://davidgrudl.com"
},
{
"name": "Nette Community",
"homepage": "https://nette.org/contributors"
}
],
"description": "⏱ Nette Caching: library with easy-to-use API and many cache backends.",
"homepage": "https://nette.org",
"keywords": [
"cache",
"journal",
"memcached",
"nette",
"sqlite"
],
"time": "2018-03-21T11:04:32+00:00"
},
{
"name": "nette/finder",
"version": "v2.4.2",
"source": {
"type": "git",
"url": "https://github.com/nette/finder.git",
"reference": "ee951a656cb8ac622e5dd33474a01fd2470505a0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/finder/zipball/ee951a656cb8ac622e5dd33474a01fd2470505a0",
"reference": "ee951a656cb8ac622e5dd33474a01fd2470505a0",
"shasum": ""
},
"require": {
"nette/utils": "~2.4",
"php": ">=5.6.0"
},
"conflict": {
"nette/nette": "<2.2"
},
"require-dev": {
"nette/tester": "~2.0",
"tracy/tracy": "^2.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.4-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause",
"GPL-2.0",
"GPL-3.0"
],
"authors": [
{
"name": "David Grudl",
"homepage": "https://davidgrudl.com"
},
{
"name": "Nette Community",
"homepage": "https://nette.org/contributors"
}
],
"description": "🔍 Nette Finder: find files and directories with an intuitive API.",
"homepage": "https://nette.org",
"keywords": [
"filesystem",
"glob",
"iterator",
"nette"
],
"time": "2018-06-28T11:49:23+00:00"
},
{
"name": "nette/utils",
"version": "v2.5.3",
"source": {
"type": "git",
"url": "https://github.com/nette/utils.git",
"reference": "17b9f76f2abd0c943adfb556e56f2165460b15ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/utils/zipball/17b9f76f2abd0c943adfb556e56f2165460b15ce",
"reference": "17b9f76f2abd0c943adfb556e56f2165460b15ce",
"shasum": ""
},
"require": {
"php": ">=5.6.0"
},
"conflict": {
"nette/nette": "<2.2"
},
"require-dev": {
"nette/tester": "~2.0",
"tracy/tracy": "^2.3"
},
"suggest": {
"ext-gd": "to use Image",
"ext-iconv": "to use Strings::webalize() and toAscii()",
"ext-intl": "for script transliteration in Strings::webalize() and toAscii()",
"ext-json": "to use Nette\\Utils\\Json",
"ext-mbstring": "to use Strings::lower() etc...",
"ext-xml": "to use Strings::length() etc. when mbstring is not available"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"classmap": [
"src/"
],
"files": [
"src/loader.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause",
"GPL-2.0",
"GPL-3.0"
],
"authors": [
{
"name": "David Grudl",
"homepage": "https://davidgrudl.com"
},
{
"name": "Nette Community",
"homepage": "https://nette.org/contributors"
}
],
"description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
"homepage": "https://nette.org",
"keywords": [
"array",
"core",
"datetime",
"images",
"json",
"nette",
"paginator",
"password",
"slugify",
"string",
"unicode",
"utf-8",
"utility",
"validation"
],
"time": "2018-09-18T10:22:16+00:00"
},
{
"name": "nikic/php-parser",
"version": "v4.0.3",
@ -1672,6 +1949,334 @@
],
"time": "2018-07-02T15:55:56+00:00"
},
{
"name": "pragmarx/coollection",
"version": "v0.6.1",
"source": {
"type": "git",
"url": "https://github.com/antonioribeiro/coollection.git",
"reference": "3a155ded3186f723774e65c9ea2d79ab439c4a84"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/antonioribeiro/coollection/zipball/3a155ded3186f723774e65c9ea2d79ab439c4a84",
"reference": "3a155ded3186f723774e65c9ea2d79ab439c4a84",
"shasum": ""
},
"require": {
"php": ">=7.0",
"pragmarx/ia-arr": ">=5.5.33",
"pragmarx/ia-collection": ">=5.5.33",
"pragmarx/ia-str": ">=5.5.33"
},
"require-dev": {
"mockery/mockery": "~1.0",
"phpunit/php-timer": ">=1.0|>=2.0",
"phpunit/phpunit": ">=6.0|>=7.0",
"squizlabs/php_codesniffer": "^2.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"PragmaRX\\Coollection\\Package\\": "src/package",
"PragmaRX\\Coollection\\Tests\\": "tests",
"IlluminateExtracted\\": "src/package/Support/IlluminateExtracted",
"IlluminateExtracted\\Tests\\": "tests/IlluminateExtracted"
},
"files": [
"src/package/Support/helpers.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Antonio Carlos Ribeiro",
"email": "acr@antoniocarlosribeiro.com",
"homepage": "https://antoniocarlosribeiro.com",
"role": "Creator"
}
],
"description": "Laravel Illuminate collection with objectified properties",
"homepage": "https://github.com/antonioribeiro/coollection",
"keywords": [
"collection",
"laravel",
"pragmarx"
],
"time": "2018-09-26T21:11:58+00:00"
},
{
"name": "pragmarx/countries",
"version": "v0.5.9",
"source": {
"type": "git",
"url": "https://github.com/antonioribeiro/countries.git",
"reference": "26290e847ebc7fbed4cf6226ab7ad89a1fe74ccf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/antonioribeiro/countries/zipball/26290e847ebc7fbed4cf6226ab7ad89a1fe74ccf",
"reference": "26290e847ebc7fbed4cf6226ab7ad89a1fe74ccf",
"shasum": ""
},
"require": {
"colinodell/json5": "^1.0",
"nette/caching": "^2.5",
"php": ">=7.0",
"pragmarx/coollection": "^0.6",
"psr/simple-cache": "^1.0"
},
"require-dev": {
"gasparesganga/php-shapefile": "^2.4",
"phpunit/phpunit": "~6.0|~7.0",
"squizlabs/php_codesniffer": "^2.3"
},
"type": "library",
"autoload": {
"psr-4": {
"PragmaRX\\Countries\\Package\\": "src/package",
"PragmaRX\\Countries\\Update\\": "src/update"
},
"files": [
"src/package/Support/helpers.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Antonio Carlos Ribeiro",
"email": "acr@antoniocarlosribeiro.com",
"role": "Creator"
}
],
"description": "PHP Countries and Currencies",
"keywords": [
"borders",
"cities",
"countries",
"currencies",
"flag",
"geometry",
"states",
"taxes",
"timezones",
"topology"
],
"time": "2018-09-28T16:50:37+00:00"
},
{
"name": "pragmarx/ia-arr",
"version": "v5.6.33",
"source": {
"type": "git",
"url": "https://github.com/antonioribeiro/ia-arr.git",
"reference": "4c0fd512616064822b6d50ca0e6bc8aa8eb3c067"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/antonioribeiro/ia-arr/zipball/4c0fd512616064822b6d50ca0e6bc8aa8eb3c067",
"reference": "4c0fd512616064822b6d50ca0e6bc8aa8eb3c067",
"shasum": ""
},
"require": {
"php": ">=7.0",
"symfony/var-dumper": "~3.3|~4.0"
},
"require-dev": {
"mockery/mockery": "~1.0",
"nesbot/carbon": "~1.20",
"phpunit/phpunit": ">=6.0",
"squizlabs/php_codesniffer": "^2.3"
},
"suggest": {
"nesbot/carbon": "Required to use Carbon datetime."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"IlluminateAgnostic\\Arr\\": "src/",
"IlluminateAgnostic\\Arr\\Tests\\": "tests/"
},
"files": [
"src/Support/helpers.php",
"src/Support/alias.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Antonio Carlos Ribeiro",
"email": "acr@antoniocarlosribeiro.com",
"homepage": "https://antoniocarlosribeiro.com",
"role": "Creator"
}
],
"description": "Laravel Illuminate Agnostic Arr",
"homepage": "https://github.com/antonioribeiro/ia-arr",
"keywords": [
"arr",
"array",
"helpers",
"laravel",
"pragmarx"
],
"time": "2018-08-19T20:20:32+00:00"
},
{
"name": "pragmarx/ia-collection",
"version": "v5.7.5",
"source": {
"type": "git",
"url": "https://github.com/antonioribeiro/ia-collection.git",
"reference": "a7bdd40c452e60f55ce81a9af01e12fea0c60a93"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/antonioribeiro/ia-collection/zipball/a7bdd40c452e60f55ce81a9af01e12fea0c60a93",
"reference": "a7bdd40c452e60f55ce81a9af01e12fea0c60a93",
"shasum": ""
},
"require": {
"nesbot/carbon": "~1.22",
"php": ">=7.0",
"ramsey/uuid": "^3.7",
"symfony/var-dumper": "~3.3|~4.0"
},
"require-dev": {
"mockery/mockery": "~1.0",
"moontoast/math": "^1.1",
"phpunit/phpunit": ">=6.0",
"squizlabs/php_codesniffer": "^2.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"IlluminateAgnostic\\Collection\\": "src/",
"IlluminateAgnostic\\Collection\\Tests\\": "tests/"
},
"files": [
"src/Support/helpers.php",
"src/Support/alias.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Antonio Carlos Ribeiro",
"email": "acr@antoniocarlosribeiro.com",
"homepage": "https://antoniocarlosribeiro.com",
"role": "Creator"
}
],
"description": "Laravel Illuminate Agnostic Collection",
"homepage": "https://github.com/antonioribeiro/ia-collection",
"keywords": [
"collection",
"helpers",
"laravel",
"pragmarx"
],
"time": "2018-09-20T18:19:48+00:00"
},
{
"name": "pragmarx/ia-str",
"version": "v5.6.33",
"source": {
"type": "git",
"url": "https://github.com/antonioribeiro/ia-str.git",
"reference": "1572361ef0472404e3f3c53d9448a933fa86e33b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/antonioribeiro/ia-str/zipball/1572361ef0472404e3f3c53d9448a933fa86e33b",
"reference": "1572361ef0472404e3f3c53d9448a933fa86e33b",
"shasum": ""
},
"require": {
"php": ">=7.0"
},
"require-dev": {
"doctrine/inflector": "^1.2",
"mockery/mockery": "~1.0",
"moontoast/math": "^1.1",
"nesbot/carbon": "~1.22",
"phpunit/phpunit": ">=6.0",
"ramsey/uuid": "^3.7",
"squizlabs/php_codesniffer": "^2.3",
"symfony/var-dumper": "~3.3|~4.0"
},
"suggest": {
"doctrine/inflector": "",
"nesbot/carbon": "",
"ramsey/uuid": "",
"symfony/var-dumper": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"IlluminateAgnostic\\Str\\": "src/",
"IlluminateAgnostic\\Str\\Tests\\": "tests/"
},
"files": [
"src/Support/helpers.php",
"src/Support/alias.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Antonio Carlos Ribeiro",
"email": "acr@antoniocarlosribeiro.com",
"homepage": "https://antoniocarlosribeiro.com",
"role": "Creator"
}
],
"description": "Laravel Illuminate Agnostic Str",
"homepage": "https://github.com/antonioribeiro/ia-str",
"keywords": [
"helpers",
"laravel",
"pragmarx",
"str",
"string"
],
"time": "2018-08-19T20:21:49+00:00"
},
{
"name": "prettus/l5-repository",
"version": "2.6.32",

View File

@ -193,6 +193,7 @@ return [
Webkul\Shipping\Providers\ShippingServiceProvider::class,
Webkul\Payment\Providers\PaymentServiceProvider::class,
Webkul\Sales\Providers\SalesServiceProvider::class,
Webkul\Tax\Providers\TaxServiceProvider::class,
],
/*
@ -247,5 +248,4 @@ return [
'Cart' => Webkul\Checkout\Facades\Cart::class,
'Core' => Webkul\Core\Facades\Core::class
],
];

View File

@ -0,0 +1,23 @@
<?php
namespace Webkul\Admin\Database\Seeders;
use Illuminate\Database\Seeder;
use Webkul\Attribute\Database\Seeders\DatabaseSeeder as AttributeSeeder;
use Webkul\Core\Database\Seeders\DatabaseSeeder as CoreSeeder;
use Webkul\User\Database\Seeders\DatabaseSeeder as UserSeeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*
* @return void
*/
public function run()
{
$this->call(AttributeSeeder::class);
$this->call(CoreSeeder::class);
$this->call(UserSeeder::class);
}
}

View File

@ -403,24 +403,24 @@ Route::group(['middleware' => ['web']], function () {
//tax routes
Route::prefix('tax')->group(function () {
Route::get('taxrule', 'Webkul\Core\Http\Controllers\TaxController@index')->defaults('_config', [
Route::get('taxrule', 'Webkul\Tax\Http\Controllers\TaxController@index')->defaults('_config', [
'view' => 'admin::tax.taxrule.index'
])->name('admin.taxrule.index');
// tax rule routes
Route::get('taxrule/create', 'Webkul\Core\Http\Controllers\TaxCategoryController@show')->defaults('_config', [
Route::get('taxrule/create', 'Webkul\Tax\Http\Controllers\TaxCategoryController@show')->defaults('_config', [
'view' => 'admin::tax.taxrule.create.create'
])->name('admin.taxrule.show');
Route::post('taxrule/create', 'Webkul\Core\Http\Controllers\TaxCategoryController@create')->defaults('_config', [
Route::post('taxrule/create', 'Webkul\Tax\Http\Controllers\TaxCategoryController@create')->defaults('_config', [
'redirect' => 'admin.taxrule.index'
])->name('admin.taxrule.create');
Route::get('/taxrule/edit/{id}', 'Webkul\Core\Http\Controllers\TaxCategoryController@edit')->defaults('_config', [
Route::get('/taxrule/edit/{id}', 'Webkul\Tax\Http\Controllers\TaxCategoryController@edit')->defaults('_config', [
'view' => 'admin::tax.taxrule.edit.edit'
])->name('admin.taxrule.edit');
Route::put('/taxrule/edit/{id}', 'Webkul\Core\Http\Controllers\TaxCategoryController@update')->defaults('_config', [
Route::put('/taxrule/edit/{id}', 'Webkul\Tax\Http\Controllers\TaxCategoryController@update')->defaults('_config', [
'redirect' => 'admin.taxrule.index'
])->name('admin.taxrule.update');
@ -428,23 +428,23 @@ Route::group(['middleware' => ['web']], function () {
//tax rate
Route::get('taxrate', 'Webkul\Core\Http\Controllers\TaxRateController@index')->defaults('_config', [
Route::get('taxrate', 'Webkul\Tax\Http\Controllers\TaxRateController@index')->defaults('_config', [
'view' => 'admin::tax.taxrate.index'
])->name('admin.taxrate.index');
Route::get('taxrate/create', 'Webkul\Core\Http\Controllers\TaxRateController@show')->defaults('_config', [
Route::get('taxrate/create', 'Webkul\Tax\Http\Controllers\TaxRateController@show')->defaults('_config', [
'view' => 'admin::tax.taxrate.create.taxrate'
])->name('admin.taxrate.show');
Route::post('taxrate/create', 'Webkul\Core\Http\Controllers\TaxRateController@create')->defaults('_config', [
Route::post('taxrate/create', 'Webkul\Tax\Http\Controllers\TaxRateController@create')->defaults('_config', [
'redirect' => 'admin.taxrate.index'
])->name('admin.taxrate.create');
Route::get('taxrate/edit/{id}', 'Webkul\Core\Http\Controllers\TaxRateController@edit')->defaults('_config', [
Route::get('taxrate/edit/{id}', 'Webkul\Tax\Http\Controllers\TaxRateController@edit')->defaults('_config', [
'view' => 'admin::tax.taxrate.edit.edit'
])->name('admin.taxrate.store');
Route::put('taxrate/update/{id}', 'Webkul\Core\Http\Controllers\TaxRateController@update')->defaults('_config', [
Route::put('taxrate/update/{id}', 'Webkul\Tax\Http\Controllers\TaxRateController@update')->defaults('_config', [
'redirect' => 'admin.taxrate.index'
])->name('admin.taxrate.update');
});

View File

@ -289,7 +289,8 @@ return [
'title' => 'Edit Tax Rate',
'edit-button-title' => 'Edit Rate'
],
'zip_code' => 'Zip Code'
'zip_code' => 'Zip Code',
'is_zip' => 'Enable Zip Range'
],
],

View File

@ -99,13 +99,13 @@
@foreach($configurableFamily->configurable_attributes as $attribute)
<tr>
<td>
{{ $attribute->name }}
{{ $attribute->admin_name }}
</td>
<td>
@foreach($attribute->options as $option)
<span class="label">
<input type="hidden" name="super_attributes[{{$attribute->code}}][]" value="{{ $option->id }}"/>
{{ $option->label }}
{{ $option->admin_name }}
<i class="icon cross-icon"></i>
</span>

View File

@ -63,16 +63,16 @@
<span class="control-error" v-if="errors.has('locales[]')">@{{ errors.first('locales[]') }}</span>
</div>
<div class="control-group" :class="[errors.has('default_locale') ? 'has-error' : '']">
<label for="default_locale" class="required">{{ __('admin::app.settings.channels.default-locale') }}</label>
<select v-validate="'required'" class="control" id="default_locale" name="default_locale">
<div class="control-group" :class="[errors.has('default_locale_id') ? 'has-error' : '']">
<label for="default_locale_id" class="required">{{ __('admin::app.settings.channels.default-locale') }}</label>
<select v-validate="'required'" class="control" id="default_locale_id" name="default_locale_id">
@foreach(core()->getAllLocales() as $locale)
<option value="{{ $locale->id }}" {{ old('default_locale') == $locale->id ? 'selected' : '' }}>
<option value="{{ $locale->id }}" {{ old('default_locale_id') == $locale->id ? 'selected' : '' }}>
{{ $locale->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('default_locale')">@{{ errors.first('default_locale') }}</span>
<span class="control-error" v-if="errors.has('default_locale_id')">@{{ errors.first('default_locale_id') }}</span>
</div>
<div class="control-group" :class="[errors.has('currencies[]') ? 'has-error' : '']">
@ -87,16 +87,16 @@
<span class="control-error" v-if="errors.has('currencies[]')">@{{ errors.first('currencies[]') }}</span>
</div>
<div class="control-group" :class="[errors.has('base_currency') ? 'has-error' : '']">
<label for="base_currency" class="required">{{ __('admin::app.settings.channels.base-currency') }}</label>
<select v-validate="'required'" class="control" id="base_currency" name="base_currency">
<div class="control-group" :class="[errors.has('base_currency_id') ? 'has-error' : '']">
<label for="base_currbase_currency_idency" class="required">{{ __('admin::app.settings.channels.base-currency') }}</label>
<select v-validate="'required'" class="control" id="base_currency_id" name="base_currency_id">
@foreach(core()->getAllCurrencies() as $currency)
<option value="{{ $currency->id }}" {{ old('base_currency') == $currency->id ? 'selected' : '' }}>
<option value="{{ $currency->id }}" {{ old('base_currency_id') == $currency->id ? 'selected' : '' }}>
{{ $currency->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('base_currency')">@{{ errors.first('base_currency') }}</span>
<span class="control-error" v-if="errors.has('base_currency_id')">@{{ errors.first('base_currency_id') }}</span>
</div>
</div>

View File

@ -66,9 +66,9 @@
</div>
<div class="control-group" :class="[errors.has('default_locale_id') ? 'has-error' : '']">
<label for="default_locale" class="required">{{ __('admin::app.settings.channels.default-locale') }}</label>
<?php $selectedOption = old('default_locale') ?: $channel->default_locale_id ?>
<select v-validate="'required'" class="control" id="default_locale" name="default_locale_id">
<label for="default_locale_id" class="required">{{ __('admin::app.settings.channels.default-locale') }}</label>
<?php $selectedOption = old('default_locale_id') ?: $channel->default_locale_id ?>
<select v-validate="'required'" class="control" id="default_locale_id" name="default_locale_id">
@foreach(core()->getAllLocales() as $locale)
<option value="{{ $locale->id }}" {{ $selectedOption == $locale->id ? 'selected' : '' }}>
{{ $locale->name }}
@ -92,9 +92,9 @@
</div>
<div class="control-group" :class="[errors.has('base_currency_id') ? 'has-error' : '']">
<label for="base_currency" class="required">{{ __('admin::app.settings.channels.base-currency') }}</label>
<?php $selectedOption = old('base_currency') ?: $channel->base_currency_id ?>
<select v-validate="'required'" class="control" id="base_currency" name="base_currency_id">
<label for="base_currency_id" class="required">{{ __('admin::app.settings.channels.base-currency') }}</label>
<?php $selectedOption = old('base_currency_id') ?: $channel->base_currency_id ?>
<select v-validate="'required'" class="control" id="base_currency_id" name="base_currency_id">
@foreach(core()->getAllCurrencies() as $currency)
<option value="{{ $currency->id }}" {{ $selectedOption == $currency->id ? 'selected' : '' }}>
{{ $currency->name }}

View File

@ -103,7 +103,7 @@
<div class="control-group">
<label for="country">{{ __('admin::app.settings.inventory_sources.country') }}</label>
<select class="control" id="country" name="country">
@foreach(country()->all() as $countryCoode => $countryName)
@foreach(core()->countries() as $countryCoode => $countryName)
<option value="{{ $countryCoode }}" {{ old('country') == $countryCoode ? 'selected' : '' }}>
{{ $countryName }}
</option>

View File

@ -105,7 +105,7 @@
<?php $selectedCountry = old('country') ?: $inventorySource->country ?>
<label for="country">{{ __('admin::app.settings.inventory_sources.country') }}</label>
<select class="control" id="country" name="country">
@foreach(country()->all() as $countryCoode => $countryName)
@foreach(core()->countries() as $countryCoode => $countryName)
<option value="{{ $countryCoode }}" {{ $selectedCountry == $countryCoode ? 'selected' : '' }}>
{{ $countryName }}
</option>

View File

@ -23,9 +23,6 @@
<div class="form-container">
@csrf()
<accordian :title="'{{ __('admin::app.configuration.taxrate.general') }}'" :active="true">
<div slot="body">
<div class="control-group" :class="[errors.has('identifier') ? 'has-error' : '']">
<label for="identifier" class="required">{{ __('admin::app.configuration.taxrate.identifier') }}</label>
@ -53,7 +50,7 @@
<div class="control-group">
<span class="checkbox">
<input type="checkbox" id="is_zip" name="is_zip" id="is_zip" onclick="myFunction()" value="{{ old('is_zip') }}">
<input type="checkbox" id="is_zip" name="is_zip" onclick="myFunction()">
<label class="checkbox-view" for="is_zip"></label>
Enable Zip Range
@ -61,7 +58,7 @@
</div>
<div class="control-group" :class="[errors.has('zip_code') ? 'has-error' : '']" id="zip_code">
<label for="zip_code" class="required">{{ __('admin::app.configuration.taxrate.zip_code') }}</label>
<label for="zip_code">{{ __('admin::app.configuration.taxrate.zip_code') }}</label>
<input class="control" id="zip_code" name="zip_code" value="{{ old('zip_code') }}"/>
@ -69,17 +66,17 @@
</div>
<div class="control-group" :class="[errors.has('zip_from') ? 'has-error' : '']" id="zip_from">
<label for="zip_from" class="required">{{ __('admin::app.configuration.taxrate.zip_from') }}</label>
<label for="zip_from">{{ __('admin::app.configuration.taxrate.zip_from') }}</label>
<input v-validate="'numeric'" class="control" id="zip_from" name="zip_from" value="{{ old('zip_from') }}"/>
<input v-validate="'numeric'" class="control" name="zip_from" value="{{ old('zip_from') }}"/>
<span class="control-error" v-if="errors.has('zip_from')">@{{ errors.first('zip_from') }}</span>
</div>
<div class="control-group" :class="[errors.has('zip_to') ? 'has-error' : '']" id="zip_to">
<label for="zip_to" class="required">{{ __('admin::app.configuration.taxrate.zip_to') }}</label>
<label for="zip_to">{{ __('admin::app.configuration.taxrate.zip_to') }}</label>
<input v-validate="'numeric'" class="control" id="zip_to" name="zip_to" value="{{ old('zip_to') }}"/>
<input v-validate="'numeric'" class="control" name="zip_to" value="{{ old('zip_to') }}"/>
<span class="control-error" v-if="errors.has('zip_to')">@{{ errors.first('zip_to') }}</span>
</div>
@ -92,8 +89,6 @@
<span class="control-error" v-if="errors.has('tax_rate')">@{{ errors.first('tax_rate') }}</span>
</div>
</div>
</accordian>
</div>
</div>
</form>
@ -110,6 +105,8 @@
function myFunction() {
value = document.getElementById('is_zip').checked;
// console.log(value);
if(value) {
document.getElementById("zip_from").style.display = "";
@ -123,8 +120,6 @@
document.getElementById("zip_code").style.display = "";
}
console.log("Value = ", value);
}
</script>
@endpush

View File

@ -21,10 +21,6 @@
<div class="page-content">
<div class="form-container">
@csrf()
<accordian :title="'{{ __('admin::app.configuration.taxrule.general') }}'" :active="true">
<div slot="body">
<div class="control-group" :class="[errors.has('channel') ? 'has-error' : '']">
<label for="channel" class="required">{{ __('admin::app.configuration.taxrule.select-channel') }}</label>
@ -74,10 +70,9 @@
@endforeach
</select>
<span class="control-error" v-if="errors.has('taxrates')">@{{ errors.first('taxrates') }}</span>
<span class="control-error" v-if="errors.first('taxrates')">@{{ errors.first('taxrates') }}</span>
</div>
</div>
</accordian>
</div>
</div>

View File

@ -31,17 +31,26 @@ class AttributeFamilyTableSeeder extends Seeder
'code' => 'url_key',
'position' => 3
], [
'code' => 'new',
'code' => 'tax_category_id',
'position' => 4
], [
'code' => 'featured',
'code' => 'new',
'position' => 5
], [
'code' => 'visible_individually',
'code' => 'featured',
'position' => 6
], [
'code' => 'status',
'code' => 'visible_individually',
'position' => 7
], [
'code' => 'status',
'position' => 8
], [
'code' => 'color',
'position' => 9
], [
'code' => 'size',
'position' => 10
]
]
], [

View File

@ -55,6 +55,21 @@ class AttributeTableSeeder extends Seeder
'is_filterable' => 0,
'is_configurable' => 0,
'is_user_defined' => 0
], [
'code' => 'tax_category_id',
'admin_name' => 'Tax Category',
'en' => [
'name' => 'Tax Category'
],
'type' => 'text',
'position' => 4,
'is_unique' => 0,
'is_required' => 0,
'value_per_locale' => 0,
'value_per_channel' => 1,
'is_filterable' => 0,
'is_configurable' => 0,
'is_user_defined' => 0
], [
'code' => 'new',
'admin_name' => 'New',
@ -62,7 +77,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'New'
],
'type' => 'boolean',
'position' => 4,
'position' => 5,
'is_required' => 0,
'value_per_locale' => 0,
'value_per_channel' => 0,
@ -76,7 +91,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'Featured'
],
'type' => 'boolean',
'position' => 5,
'position' => 6,
'is_required' => 0,
'value_per_locale' => 0,
'value_per_channel' => 0,
@ -90,7 +105,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'Visible Individually'
],
'type' => 'boolean',
'position' => 6,
'position' => 7,
'is_required' => 1,
'value_per_locale' => 0,
'value_per_channel' => 0,
@ -104,7 +119,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'Status'
],
'type' => 'boolean',
'position' => 7,
'position' => 8,
'is_required' => 1,
'value_per_locale' => 0,
'value_per_channel' => 0,
@ -118,7 +133,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'Short Description'
],
'type' => 'textarea',
'position' => 8,
'position' => 9,
'is_required' => 1,
'value_per_locale' => 1,
'value_per_channel' => 1,
@ -132,7 +147,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'Description'
],
'type' => 'textarea',
'position' => 9,
'position' => 10,
'is_required' => 1,
'value_per_locale' => 1,
'value_per_channel' => 1,
@ -146,7 +161,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'Price'
],
'type' => 'price',
'position' => 10,
'position' => 11,
'is_required' => 1,
'value_per_locale' => 0,
'value_per_channel' => 1,
@ -160,7 +175,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'Cost'
],
'type' => 'price',
'position' => 11,
'position' => 12,
'is_required' => 0,
'value_per_locale' => 0,
'value_per_channel' => 1,
@ -174,7 +189,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'Special Price'
],
'type' => 'price',
'position' => 12,
'position' => 13,
'is_required' => 0,
'value_per_locale' => 0,
'value_per_channel' => 1,
@ -188,7 +203,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'Special Price From'
],
'type' => 'date',
'position' => 13,
'position' => 14,
'is_required' => 0,
'value_per_locale' => 0,
'value_per_channel' => 1,
@ -202,7 +217,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'Special Price To'
],
'type' => 'date',
'position' => 14,
'position' => 15,
'is_required' => 0,
'value_per_locale' => 0,
'value_per_channel' => 1,
@ -216,7 +231,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'Meta Description'
],
'type' => 'textarea',
'position' => 15,
'position' => 16,
'is_required' => 0,
'value_per_locale' => 1,
'value_per_channel' => 1,
@ -230,7 +245,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'Meta Keywords'
],
'type' => 'textarea',
'position' => 16,
'position' => 17,
'is_required' => 0,
'value_per_locale' => 1,
'value_per_channel' => 1,
@ -244,7 +259,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'Meta Description'
],
'type' => 'textarea',
'position' => 17,
'position' => 18,
'is_required' => 0,
'value_per_locale' => 1,
'value_per_channel' => 1,
@ -259,7 +274,7 @@ class AttributeTableSeeder extends Seeder
],
'type' => 'text',
'validation' => 'numeric',
'position' => 18,
'position' => 19,
'is_required' => 0,
'value_per_locale' => 0,
'value_per_channel' => 0,
@ -274,7 +289,7 @@ class AttributeTableSeeder extends Seeder
],
'type' => 'text',
'validation' => 'numeric',
'position' => 19,
'position' => 20,
'is_required' => 0,
'value_per_locale' => 0,
'value_per_channel' => 0,
@ -289,7 +304,7 @@ class AttributeTableSeeder extends Seeder
],
'type' => 'text',
'validation' => 'numeric',
'position' => 20,
'position' => 21,
'is_required' => 0,
'value_per_locale' => 0,
'value_per_channel' => 0,
@ -304,7 +319,7 @@ class AttributeTableSeeder extends Seeder
],
'type' => 'text',
'validation' => 'numeric',
'position' => 21,
'position' => 22,
'is_required' => 1,
'value_per_locale' => 0,
'value_per_channel' => 0,
@ -318,7 +333,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'Color'
],
'type' => 'select',
'position' => 22,
'position' => 23,
'is_required' => 0,
'value_per_locale' => 0,
'value_per_channel' => 0,
@ -327,26 +342,31 @@ class AttributeTableSeeder extends Seeder
'is_user_defined' => 1,
'options' => [
[
'admin_name' => 'Red',
'en' => [
'label' => 'Red'
],
'sort_order' => 1
], [
'admin_name' => 'Green',
'en' => [
'label' => 'Green'
],
'sort_order' => 2
], [
'admin_name' => 'Yellow',
'en' => [
'label' => 'Yellow'
],
'sort_order' => 3
], [
'admin_name' => 'Black',
'en' => [
'label' => 'Black'
],
'sort_order' => 4
], [
'admin_name' => 'White',
'en' => [
'label' => 'White'
],
@ -360,7 +380,7 @@ class AttributeTableSeeder extends Seeder
'name' => 'Size'
],
'type' => 'select',
'position' => 23,
'position' => 24,
'is_required' => 0,
'value_per_locale' => 0,
'value_per_channel' => 0,
@ -369,21 +389,25 @@ class AttributeTableSeeder extends Seeder
'is_user_defined' => 1,
'options' => [
[
'admin_name' => 'S',
'en' => [
'label' => 'S'
],
'sort_order' => 1
], [
'admin_name' => 'M',
'en' => [
'label' => 'M'
],
'sort_order' => 2
], [
'admin_name' => 'L',
'en' => [
'label' => 'L'
],
'sort_order' => 3
], [
'admin_name' => 'XL',
'en' => [
'label' => 'XL'
],
@ -413,6 +437,8 @@ class AttributeTableSeeder extends Seeder
public function run()
{
\Illuminate\Database\Eloquent\Model::reguard();
foreach($this->rawData as $row) {
$this->attribute->create($row);
}

View File

@ -98,7 +98,7 @@ class AttributeFamilyController extends Controller
*/
public function edit(Attribute $attribute, $id)
{
$attributeFamily = $this->attributeFamily->find($id, ['*'], ['attribute_groups.custom_attributes']);
$attributeFamily = $this->attributeFamily->with(['attribute_groups.custom_attributes'])->find($id, ['*']);
$custom_attributes = $attribute->all(['id', 'code', 'admin_name', 'type']);

View File

@ -128,4 +128,30 @@ class AttributeRepository extends Repository
{
return $this->model->filterableAttributes()->get();
}
/**
* @return array
*/
public function getProductDefaultAttributes($codes = null)
{
$attributeColumns = ['id', 'code', 'value_per_channel', 'value_per_locale', 'type', 'is_filterable'];
if(!is_array($codes) && !$codes)
return $this->findWhereIn('code', [
'name',
'description',
'short_description',
'url_key',
'price',
'special_price',
'special_price_from',
'special_price_to',
'status'
], $attributeColumns);
if(in_array('*', $codes))
return $this->all($attributeColumns);
return $this->findWhereIn('code', $codes, $attributeColumns);
}
}

View File

@ -94,27 +94,24 @@ class Cart {
{
$product = $this->product->findOneByField('id', $productId);
unset($data['_token']);
// dd($product);
//Check if the product is saleable
//Check if the product's information is proper or not.
if(!isset($data['product']) || !isset($data['quantity'])) {
session()->flash('error', trans('shop::app.checkout.cart.integrity.missing_fields'));
return redirect()->back();
return false;
} else {
if($product->type == 'configurable' && !isset($data['super_attribute'])) {
session()->flash('error', trans('shop::app.checkout.cart.integrity.missing_options'));
return redirect()->back();
return false;
}
}
$child = $childData = null;
if($product->type == 'configurable') {
//Check if the product is salable
$child = $this->product->findOneByField('id', $data['selected_configurable_option']);
//child row data
$childData = [
'product_id' => $data['selected_configurable_option'],
'sku' => $child->sku,
@ -123,8 +120,8 @@ class Cart {
];
}
$price = ($product->type == 'configurable' ? $child->price : $product->price);
$parentData = [
'sku' => $product->sku,
'product_id' => $productId,
@ -153,14 +150,20 @@ class Cart {
*/
public function add($id, $data)
{
$itemData = $this->prepareItemData($id, $data);
if($itemData == false) {
return false;
}
if($cart = $this->getCart()) {
$product = $this->product->find($id);
$cartItems = $cart->items;
if($cartItems->count()) {
//check the isset conditions as collection empty object will mislead the condition and errorhandling case.
if(isset($cartItems) && $cartItems->count()) {
foreach($cartItems as $cartItem) {
if($product->type == "simple") {
@ -173,7 +176,7 @@ class Cart {
if($canBe == false) {
session()->flash('warning', trans('shop::app.checkout.cart.quantity.inventory_warning'));
return redirect()->back();
return false;
}
$cartItem->update([
@ -186,7 +189,7 @@ class Cart {
session()->flash('success', trans('shop::app.checkout.cart.quantity.success'));
return redirect()->back();
return true;
}
} else if($product->type == "configurable") {
if($cartItem->type == "configurable") {
@ -205,7 +208,7 @@ class Cart {
if($canBe == false) {
session()->flash('warning', trans('shop::app.checkout.cart.quantity.inventory_warning'));
return redirect()->back();
return false;
}
$parent->update([
@ -218,7 +221,7 @@ class Cart {
session()->flash('success', trans('shop::app.checkout.cart.quantity.success'));
return redirect()->back();
return true;
}
}
}
@ -257,12 +260,17 @@ class Cart {
* @param integer $id
* @param array $data
*
* @return Response
* @return Booleans
*/
public function createNewCart($id, $data)
{
$itemData = $this->prepareItemData($id, $data);
//if the item data is not valid to be processed it will be returning false
if($itemData == false) {
return false;
}
$cartData['channel_id'] = core()->getCurrentChannel()->id;
//auth user details else they will be set when the customer is guest
@ -276,9 +284,16 @@ class Cart {
$cartData['is_guest'] = 1;
}
//set the currency column with the respective currency
$cartData['global_currency_code'] = core()->getBaseCurrencyCode();
$cartData['base_currency_code'] = core()->getBaseCurrencyCode();
$cartData['channel_currency_code'] = core()->getBaseCurrencyCode();
$cartData['cart_currency_code'] = core()->getBaseCurrencyCode();
//set the cart items and quantity
$cartData['items_count'] = 1;
$cartData['items_qty'] = $data['quantity'];
//create the cart instance in the database
if($cart = $this->cart->create($cartData)) {
$itemData['parent']['cart_id'] = $cart->id;
$product = $this->product->find($id);
@ -332,14 +347,19 @@ class Cart {
$guestCart = session()->get('cart');
//when the logged in customer is not having any of the cart instance previously and are active.
if(!isset($cart)) {
$guestCart->update(['customer_id' => auth()->guard('customer')->user()->id, 'is_guest' => 0]);
$guestCart->update([
'customer_id' => auth()->guard('customer')->user()->id,
'is_guest' => 0,
'customer_first_name' => auth()->guard('customer')->user()->first_name,
'customer_last_name' => auth()->guard('customer')->user()->last_name,
'customer_email' => auth()->guard('customer')->user()->email
]);
session()->forget('cart');
session()->put('cart', $guestCart);
return redirect()->back();
return true;
}
$cartItems = $cart->items;
@ -360,9 +380,8 @@ class Cart {
$canBe = $this->canAddOrUpdate($cartItem->id, $prevQty + $newQty);
if($canBe == false) {
session()->flash('warning', 'The requested quantity is not available, please try back later.');
return redirect()->back();
$this->cartItem->delete($guestCartItem->id);
continue;
}
$cartItem->update([
@ -388,9 +407,8 @@ class Cart {
$canBe = $this->canAddOrUpdate($cartItem->child->id, $prevQty + $newQty);
if($canBe == false) {
session()->flash('warning', 'The requested quantity is not available, please try back later.');
return redirect()->back();
$this->cartItem->delete($guestCartItem->id);
continue;
}
$cartItem->update([
@ -404,9 +422,9 @@ class Cart {
$guestCartItems->forget($key);
//child will be deleted first
$this->cartItem->delete($guestCartItemChild->id);
// $this->cartItem->delete($guestCartItemChild->id);
//then parent will get deleted
//then parent will also delete the child if any
$this->cartItem->delete($guestCartItem->id);
}
}
@ -486,6 +504,8 @@ class Cart {
if($cart = $this->getCart()) {
$this->cartItem->delete($itemId);
$this->collectTotals();
//delete the cart instance if no items are there
if($cart->items()->get()->count() == 0) {
$this->cart->delete($cart->id);
@ -639,8 +659,6 @@ class Cart {
}
}
$this->calulateTax();
return true;
}

View File

@ -11,6 +11,7 @@ use Webkul\Core\Models\TaxRate as TaxRate;
use Webkul\Core\Repositories\CurrencyRepository;
use Webkul\Core\Repositories\ExchangeRateRepository;
use Illuminate\Support\Facades\Config;
use PragmaRX\Countries\Package\Countries;
class Core
{
@ -35,7 +36,10 @@ class Core
* @param Webkul\Core\Repositories\ExchangeRateRepository $exchangeRateRepository
* @return void
*/
public function __construct(CurrencyRepository $currencyRepository, ExchangeRateRepository $exchangeRateRepository)
public function __construct(
CurrencyRepository $currencyRepository,
ExchangeRateRepository $exchangeRateRepository
)
{
$this->currencyRepository = $currencyRepository;
@ -278,7 +282,7 @@ class Core
public function currency($amount = 0)
{
if(is_null($amount))
$price = 0;
$amount = 0;
$currencyCode = $this->getCurrentCurrency()->code;
@ -439,4 +443,49 @@ class Core
return Config::get($field);
}
/**
* Retrieve all countries
*
* @return Collection
*/
public function countries()
{
$countries = new Countries;
return $countries->all()->pluck('name.common', 'cca2');
}
/**
* Retrieve all country states
*
* @return Collection
*/
public function states($countryCode)
{
$countries = new Countries;
return $countries->where('cca2', $countryCode)
->first()
->hydrateStates()
->states
->sortBy('name')
->pluck('name', 'postal');
}
/**
* Retrieve all grouped states by country code
*
* @return Collection
*/
public function groupedStatesByCountries()
{
$collection = [];
foreach ($this->countries() as $countryCode => $countryName) {
$collection[$countryCode] = $this->states($countryCode)->toArray();
}
return $collection;
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace Webkul\Core\Database\Seeders;
use Illuminate\Database\Seeder;
use Webkul\Core\Models\Currency;
class CurrencyTableSeeder extends Seeder
{
public function run()
{
$currency = new Currency();
$locale->code = 'USD';
$locale->name = 'US Dollar';
$locale->symbol = '$';
$locale->save();
}
}

View File

@ -9,6 +9,8 @@ class LocalesTableSeeder extends Seeder
{
public function run()
{
\Illuminate\Database\Eloquent\Model::reguard();
$locale = new Locale();
$locale->code = 'en';
$locale->name = 'English';

View File

@ -75,11 +75,11 @@ class ChannelController extends Controller
'code' => ['required', 'unique:channels,code', new \Webkul\Core\Contracts\Validations\Code],
'name' => 'required',
'locales' => 'required|array|min:1',
'default_locale' => 'required',
'default_locale_id' => 'required',
'currencies' => 'required|array|min:1',
'base_currency' => 'required'
'base_currency_id' => 'required'
]);
$this->channel->create(request()->all());
session()->flash('success', 'Channel created successfully.');

View File

@ -8,7 +8,7 @@ use Webkul\Core\Models\Currency;
class Channel extends Model
{
protected $fillable = ['code', 'name', 'description', 'default_locale', 'base_currency'];
protected $fillable = ['code', 'name', 'description', 'default_locale_id', 'base_currency_id'];
/**
* Get the channel locales.

View File

@ -51,7 +51,7 @@ class RegistrationController extends Controller
*/
public function create(Request $request)
{
// dd(request()->input());
$request->validate([
'first_name' => 'string|required',
@ -65,8 +65,6 @@ class RegistrationController extends Controller
$data['password'] = bcrypt($data['password']);
// $registrationData = $request->except('_token');
if ($this->customer->create($data)) {
session()->flash('success', 'Account created successfully.');

View File

@ -17,9 +17,9 @@ use Auth;
* @author Prashant Singh <prashant.singh852@webkul.com>
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class WishlistController extends Controller
{
protected $_config;
protected $customer;

View File

@ -60,12 +60,7 @@ class AttributeToSelectCriteria extends AbstractProduct implements CriteriaInter
{
$model = $model->select('products.*');
foreach ($this->attributeToSelect as $code) {
$attribute = $this->attribute->findOneByField('code', $code);
if(!$attribute)
continue;
foreach ($this->attribute->getProductDefaultAttributes() as $attribute) {
$productValueAlias = 'pav_' . $attribute->code;
$model = $model->leftJoin('product_attribute_values as ' . $productValueAlias, function($qb) use($attribute, $productValueAlias) {
@ -76,7 +71,7 @@ class AttributeToSelectCriteria extends AbstractProduct implements CriteriaInter
->where($productValueAlias . '.attribute_id', $attribute->id);
});
$model = $model->addSelect($productValueAlias . '.' . ProductAttributeValue::$attributeTypeFields[$attribute->type] . ' as ' . $code);
$model = $model->addSelect($productValueAlias . '.' . ProductAttributeValue::$attributeTypeFields[$attribute->type] . ' as ' . $attribute->code);
}
return $model;

View File

@ -5,13 +5,14 @@ namespace Webkul\Product\Contracts\Criteria;
use Prettus\Repository\Contracts\CriteriaInterface;
use Prettus\Repository\Contracts\RepositoryInterface;
use Webkul\Attribute\Repositories\AttributeRepository;
use Webkul\Product\Product\AbstractProduct;
/**
* Class MyCriteria.
*
* @package namespace App\Criteria;
*/
class FeaturedProductsCriteria implements CriteriaInterface
class FeaturedProductsCriteria extends AbstractProduct implements CriteriaInterface
{
/**
* @var AttributeRepository
@ -41,6 +42,8 @@ class FeaturedProductsCriteria implements CriteriaInterface
$model = $model->leftJoin('product_attribute_values as filter_featured', 'products.id', '=', 'filter_featured.product_id');
$model = $this->applyChannelLocaleFilter($attribute, $model, 'filter_featured');
$model->where('filter_featured.boolean_value', 1)
->where('filter_featured.attribute_id', $attribute->id);

View File

@ -50,13 +50,8 @@ class FilterByAttributesCriteria extends AbstractProduct implements CriteriaInte
foreach($aliases as $table => $alias) {
$query1 = $query1->orWhere(function($query2) use($model, $table, $alias) {
foreach (request()->input() as $code => $value) {
$aliasTemp = $alias . $code;
$attribute = $this->attribute->findOneByField('code', $code);
if(!$attribute)
continue;
foreach ($this->attribute->getProductDefaultAttributes(array_keys(request()->input())) as $code => $attribute) {
$aliasTemp = $alias . $attribute->code;
$model = $model->leftJoin('product_attribute_values as ' . $aliasTemp, $table . '.id', '=', $aliasTemp . '.product_id');
@ -64,7 +59,7 @@ class FilterByAttributesCriteria extends AbstractProduct implements CriteriaInte
$column = ProductAttributeValue::$attributeTypeFields[$attribute->type];
$temp = explode(',', $value);
$temp = explode(',', request()->get($attribute->code));
if($attribute->type != 'price') {
$query2 = $query2->where($aliasTemp . '.attribute_id', $attribute->id);

View File

@ -5,13 +5,14 @@ namespace Webkul\Product\Contracts\Criteria;
use Prettus\Repository\Contracts\CriteriaInterface;
use Prettus\Repository\Contracts\RepositoryInterface;
use Webkul\Attribute\Repositories\AttributeRepository;
use Webkul\Product\Product\AbstractProduct;
/**
* Class MyCriteria.
*
* @package namespace App\Criteria;
*/
class NewProductsCriteria implements CriteriaInterface
class NewProductsCriteria extends AbstractProduct implements CriteriaInterface
{
/**
* @var AttributeRepository
@ -41,6 +42,8 @@ class NewProductsCriteria implements CriteriaInterface
$model = $model->leftJoin('product_attribute_values as filter_new', 'products.id', '=', 'filter_new.product_id');
$model = $this->applyChannelLocaleFilter($attribute, $model, 'filter_featured');
$model->where('filter_new.boolean_value', 1)
->where('filter_new.attribute_id', $attribute->id);

View File

@ -124,16 +124,6 @@ class Product extends Model
return $this->belongsToMany(self::class, 'product_cross_sells');
}
/**
* @param string $key
*
* @return bool
*/
public function isCustomAttribute($attribute)
{
return $this->attribute_family->custom_attributes->pluck('code')->contains($attribute);
}
/**
* @param string $key
*
@ -180,16 +170,15 @@ class Product extends Model
public function getAttribute($key)
{
if (!method_exists(self::class, $key) && !in_array($key, ['parent_id', 'attribute_family_id']) && !isset($this->attributes[$key])) {
if (isset($this->id) && $this->isCustomAttribute($key)) {
if (isset($this->id)) {
$this->attributes[$key] = '';
$attributeModel = $this->attribute_family->custom_attributes()->where('attributes.code', $key)->first();
$attribute = app(\Webkul\Attribute\Repositories\AttributeRepository::class)->findOneByField('code', $key);
$this->attributes[$key] = $this->getCustomAttributeValue($attributeModel);
$this->attributes[$key] = $this->getCustomAttributeValue($attribute);
return $this->getAttributeValue($key);
}
}
return parent::getAttribute($key);
@ -227,7 +216,7 @@ class Product extends Model
if(!$attribute)
return;
$channel = request()->get('channel') ?: core()->getDefaultChannelCode();
$channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
$locale = request()->get('locale') ?: app()->getLocale();

View File

@ -3,6 +3,7 @@
namespace Webkul\Product\Models;
use Illuminate\Database\Eloquent\Model;
use Webkul\Inventory\Models\InventorySource;
class ProductInventory extends Model
{
@ -21,4 +22,12 @@ class ProductInventory extends Model
// public function checkInventoryStatus() {
// return $this->leftjoin('inventory_sources', 'inventory_sources.id', 'inventory_source_id')->select('status')->where('status', '=','1');
// }
/**
* Get the product attribute family that owns the product.
*/
public function inventory_source()
{
return $this->belongsTo(InventorySource::class);
}
}

View File

@ -16,9 +16,9 @@ abstract class AbstractProduct
*/
public function applyChannelLocaleFilter($attribute, $qb, $alias = 'product_attribute_values')
{
$channel = core()->getCurrentChannelCode();
$channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
$locale = app()->getLocale();
$locale = request()->get('locale') ?: app()->getLocale();
if($attribute->value_per_channel) {
if($attribute->value_per_locale) {

View File

@ -5,6 +5,8 @@ namespace Webkul\Product\Product;
use Webkul\Attribute\Repositories\AttributeOptionRepository as AttributeOption;
use Webkul\Product\Product\ProductImage;
use Webkul\Product\Product\Price;
use Webkul\Product\Models\Product;
use Webkul\Product\Models\ProductAttributeValue;
class ConfigurableOption extends AbstractProduct
{
@ -56,16 +58,19 @@ class ConfigurableOption extends AbstractProduct
* @param Product $product
* @return float
*/
public function getAllowProducts($product)
public function getAllowedProducts($product)
{
$variants = [];
static $variants = [];
if(count($variants))
return $variants;
foreach ($product->variants as $variant) {
if ($variant->isSaleable()) {
$variants[] = $variant;
}
}
return $variants;
}
@ -77,7 +82,7 @@ class ConfigurableOption extends AbstractProduct
*/
public function getConfigurationConfig($product)
{
$options = $this->getOptions($product, $this->getAllowProducts($product));
$options = $this->getOptions($product, $this->getAllowedProducts($product));
$config = [
'attributes' => $this->getAttributesData($product, $options),
@ -203,7 +208,7 @@ class ConfigurableOption extends AbstractProduct
{
$prices = [];
foreach ($this->getAllowProducts($product) as $variant) {
foreach ($this->getAllowedProducts($product) as $variant) {
$prices[$variant->id] = [
'regular_price' => [
'formated_price' => core()->currency($variant->price),
@ -229,20 +234,10 @@ class ConfigurableOption extends AbstractProduct
{
$images = [];
foreach ($this->getAllowProducts($product) as $variant) {
foreach ($this->getAllowedProducts($product) as $variant) {
$images[$variant->id] = $this->productImage->getGalleryImages($variant);
}
return $images;
}
/**
* Get product images for configurable variations
*
* @param Product $product
* @return array
*/
protected function is($product)
{
}
}

View File

@ -409,17 +409,20 @@ class ProductRepository extends Repository
* @param string $slug
* @return mixed
*/
public function findBySlugOrFail($slug)
public function findBySlugOrFail($slug, $columns = null)
{
$attribute = $this->attribute->findOneByField('code', 'url_key');
$attributeValue = $this->attributeValue->findOneWhere([
'attribute_id' => $attribute->id,
ProductAttributeValue::$attributeTypeFields[$attribute->type] => $slug
]);
], ['product_id']);
if($attributeValue && $attributeValue->product)
return $attributeValue->product;
if($attributeValue && $attributeValue->product_id) {
$this->pushCriteria(app(AttributeToSelectCriteria::class)->addAttribueToSelect($columns));
return $this->find($attributeValue->product_id);
}
throw (new ModelNotFoundException)->setModel(
get_class($this->model), $slug
@ -434,15 +437,7 @@ class ProductRepository extends Repository
public function getNewProducts()
{
$this->pushCriteria(app(NewProductsCriteria::class));
$this->pushCriteria(app(AttributeToSelectCriteria::class)->addAttribueToSelect([
'name',
'description',
'short_description',
'price',
'special_price',
'special_price_from',
'special_price_to'
]));
$this->pushCriteria(app(AttributeToSelectCriteria::class));
$params = request()->input();
@ -459,15 +454,7 @@ class ProductRepository extends Repository
public function getFeaturedProducts()
{
$this->pushCriteria(app(FeaturedProductsCriteria::class));
$this->pushCriteria(app(AttributeToSelectCriteria::class)->addAttribueToSelect([
'name',
'description',
'short_description',
'price',
'special_price',
'special_price_from',
'special_price_to'
]));
$this->pushCriteria(app(AttributeToSelectCriteria::class));
$params = request()->input();

View File

@ -88,7 +88,7 @@ class CartController extends Controller
public function add($id) {
$data = request()->input();
// dd($data);
Cart::add($id, $data);
return redirect()->back();
@ -120,12 +120,23 @@ class CartController extends Controller
return redirect()->back();
}
}
Cart::update($data);
return redirect()->back();
}
/**
* Add the configurable product
* to the cart.
*
* @return response
*/
public function addconfigurable($slug) {
session()->flash('warning', trans('shop::app.checkout.cart.add-config-warning'));
return redirect()->route('shop.products.index', $slug);
}
public function test() {
$result = Cart::isConfigurable(9);
}

View File

@ -70,6 +70,8 @@ class OnepageController extends Controller
if(Cart::hasError() || !Cart::saveCustomerAddress(request()->all()) || !$rates = Shipping::collectRates())
return response()->json(['redirect_url' => route('shop.checkout.cart.index')], 403);
Cart::collectTotals();
return response()->json($rates);
}

View File

@ -16,6 +16,8 @@ Route::group(['middleware' => ['web']], function () {
Route::post('checkout/cart/add/{id}', 'Webkul\Shop\Http\Controllers\CartController@add')->name('cart.add');
Route::get('checkout/cart/addconfigurable/{slug}', 'Webkul\Shop\Http\Controllers\CartController@addconfigurable')->name('cart.add.configurable');
Route::get('checkout/cart/remove/{id}', 'Webkul\Shop\Http\Controllers\CartController@remove')->name('cart.remove');
Route::post('/checkout/cart', 'Webkul\Shop\Http\Controllers\CartController@updateBeforeCheckout')->defaults('_config',[

View File

@ -10,7 +10,6 @@ Vue.component("category-nav", require("./components/category-nav.vue"));
Vue.component("category-item", require("./components/category-item.vue"));
Vue.component("image-slider", require("./components/image-slider.vue"));
Vue.component("vue-slider", require("vue-slider-component"));
Vue.component("cart-dropdown", require("./components/cart-dropdown.vue"));
$(document).ready(function () {

View File

@ -1,92 +0,0 @@
<template>
<div>
<ul class="cart-dropdown" @click="dropOrHide">
<li class="cart-summary">
<span class="icon cart-icon"></span>
<span class="cart"><span class="cart-count" v-if="totalitems > 0">{{ totalitems }}</span>Products</span>
<span class="icon arrow-down-icon"></span>
</li>
</ul>
<div class="dropdown-cart" :class="{ show: toggle }">
<div class="dropdown-header">
<p class="heading">Cart Subtotal - $ {{ subtotal }}</p>
<i class="icon icon-menu-close" @click="dropOrHide"></i>
</div>
<div class="dropdown-content">
<div class="item" v-for="(item, index) in items" :key="index">
<div class="item-image" v-if="item[2]!='null'">
<img :src="item[2]"/>
</div>
<div class="item-image" v-else>
<img :src="placeholder"/>
</div>
<div class="item-details">
<div class="item-name">{{item[0]}}</div>
<div class="item-price">$ {{ item[1] }}</div>
<div class="item-qty">Quantity - {{ item[3] }}</div>
</div>
</div>
</div>
<div class="dropdown-footer">
<a href="/">View Shopping Cart</a>
<button class="btn btn-primary btn-lg">CHECKOUT</button>
</div>
</div>
</div>
</template>
<script>
// define the item component
export default {
props: {
items: Object,
},
data(){
return {
toggle: true,
totalitems: parseInt(0),
cart_items: [],
placeholder: "http://localhost/bagisto/public/themes/default/assets/images/product/small-product-placeholder.png",
subtotal : parseInt(0)
};
},
computed: {
makeDropdown() {
}
},
mounted: function() {
if(this.items != undefined) {
this.initializeDropdown();
}
},
methods: {
dropOrHide: function() {
if(this.toggle == false) {
this.toggle = true;
} else {
this.toggle = false;
}
},
initializeDropdown: function() {
this.cart_items = this.items;
var item;
for(item in this.cart_items) {
this.subtotal = this.subtotal + parseInt(this.cart_items[item][1]);
this.totalitems = this.totalitems + 1;
}
}
}
}
</script>

View File

@ -1,6 +1,6 @@
<template>
<li>
<a :href="this.item['translations'][0].slug">{{ this.item['translations'][0].name }}&emsp;<i class="icon expand-icon"
<a :href="url+'/categories/'+this.item['translations'][0].slug">{{ this.item['translations'][0].name }}&emsp;<i class="icon dropdown-right-icon"
v-if="haveChildren && item.parent_id != null"></i></a>
<i :class="[show ? 'icon expand-icon mt-15' : 'icon expand-on-icon mt-15']"
@ -10,6 +10,7 @@
<category-item
v-for="(child, index) in item.children"
:key="index"
:url="url"
:item="child">
{{ child }}

View File

@ -2,15 +2,20 @@
//shop variables
$font-color: #242424;
$border-color: #E8E8E8;
$font-size-base: 16px;
$border-color: #E8E8E8;
$brand-color: #0041FF;
$border-color1: #C7C7C7;
$brand-color: #0031F0;
$font-color-light: #A5A5A5;
$link-color: #2650EF;
$background-color: #F2F2F2;
$dark-background: #121212;
$disc-price: #FF6472;
$disc-price-pro: #A5A5A5;
$other-font-color: #5E5E5E;
//shop variables ends here
//=======>Need to be removed
//customer variables
$profile-content-color: #5e5e5e;
$horizontal-rule-color: #E8E8E8;
//customer variables ends here
//<=======Need to be removed

View File

@ -162,7 +162,7 @@ section.slider-block {
.dark-left-icon {
background-color: #f2f2f2;
background-color: $background-color;
height: 48px;
width: 48px;
max-height: 100%;
@ -170,7 +170,7 @@ section.slider-block {
}
.light-right-icon {
background-color: #000;
background-color: $font-color;
height: 48px;
width: 48px;
max-height: 100%;
@ -279,7 +279,7 @@ section.slider-block {
flex-direction: row;
justify-content: flex-end;
align-items: center;
cursor: pointer;
// cursor: pointer;
ul.account-dropdown-container {
float: right;
@ -290,23 +290,30 @@ section.slider-block {
flex-direction: row;
margin-right: 14px;
.account-icon {
cursor: pointer;
margin-right: 8px;
height: 24px;
width: 24px;
.dropdown-list {
width: 300px;
padding: 25px;
}
.account {
cursor: pointer;
padding-top: 3px;
padding-right: 5px;
margin-left: 8px;
.dropdown-container {
padding: 0px;
overflow: hidden;
}
.icon.arrow-down-icon {
cursor: pointer;
margin-top: 10px;
ul.account-dropdown-list {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
li > a {
color: white;
}
.btn {
min-width: 100px;
text-align: center;
}
}
}
}
@ -341,7 +348,7 @@ section.slider-block {
overflow-y: auto;
.dropdown-cart {
color: #242424;
color: $font-color;
}
.dropdown-cart > .dropdown-header {
width: 100%;
@ -353,7 +360,7 @@ section.slider-block {
}
.dropdown-cart > .dropdown-header i{
cursor: pointer;
// cursor: pointer;
float: right;
height: 22px;
width: 22px;
@ -371,7 +378,7 @@ section.slider-block {
.dropdown-content .item{
display: flex;
flex-direction: row;
border-bottom: 1px solid #E8E8E8;
border-bottom: 1px solid $border-color;
padding-top: 8px;
padding-bottom: 8px;
}
@ -409,9 +416,9 @@ section.slider-block {
margin-bottom: 8px;
}
.dropdown-footer button {
border-radius: 0px;
width: 130px;
.dropdown-footer .btn {
max-width: 170px;
text-align: center;
}
}
}
@ -459,7 +466,7 @@ section.slider-block {
.nav ul {
margin: 0;
padding:0;
border: 1px solid #B1B1B1;
border: 1px solid $border-color;
box-shadow: 1px 1px 1px 0 rgba(0,0,0,0.40);
}
@ -469,7 +476,7 @@ section.slider-block {
text-decoration: none;
padding: 0.8em 0.3em 0.8em 0.5em;
text-transform: uppercase;
letter-spacing: 2px;
letter-spacing: -0.38px;
position: relative;
}
@ -539,15 +546,24 @@ section.slider-block {
.nav ul {
position: absolute;
white-space: nowrap;
border: 1px solid #B1B1B1;
border: 1px solid $border-color;
background-color:white;
z-index: 1;
left: -99999em;
}
.nav > li:hover {
background-color: $background-color;
}
.nav > li:hover > ul {
left: auto;
min-width: 100%;
}
.nav > li li:hover {
background-color: $background-color;
}
.nav > li li:hover > ul {
@ -573,7 +589,7 @@ section.slider-block {
display: none;
.search-content {
border-bottom: 1px solid #e8e8e8;
border-bottom: 1px solid $border-color;
height: 48px;
.search {
@ -596,7 +612,7 @@ section.slider-block {
}
.search-content:first-child {
border-top: 1px solid #e8e8e8;
border-top: 1px solid $border-color;
}
}
@ -674,7 +690,7 @@ section.slider-block {
//footer responsive with out media query.
.footer {
background-color: #f2f2f2;
background-color: $background-color;
padding-left: 10%;
padding-right: 10%;
@ -691,7 +707,7 @@ section.slider-block {
.list-container {
.list-heading {
letter-spacing: -0.26px;
text-transform: uppercase;
color: rgba(165, 165, 165, 1);
}
@ -738,7 +754,7 @@ section.slider-block {
}
.btn-primary {
background-color: #000;
background-color: $font-color;
margin-top: 8px;
border-radius: 0px;
text-align: center;
@ -801,8 +817,8 @@ section.slider-block {
}
select {
background: #FFFFFF;
border: 1px solid #C7C7C7;
background: $background-color;
border: 1px solid $border-color;
border-radius: 3px;
color: $font-color;
padding: 10px;
@ -864,8 +880,8 @@ section.slider-block {
margin-right: auto;
text-align: center;
font-size: 18px;
color: #5e5e5e;
letter-spacing: -0.29px;
color: $font-color-light;
text-align: center;
}
@ -885,8 +901,8 @@ section.slider-block {
.login-text {
font-size: 24px;
font-weight: bold;
color: #3a3a3a;
letter-spacing: -0.23px;
color: $font-color;
margin-top: 5%;
margin-bottom: 3%;
}
@ -902,11 +918,11 @@ section.slider-block {
.forgot-password-link {
font-size: 17px;
color: $brand-color;
letter-spacing: -0.11px;
margin-bottom: 5%;
}
.signup-confirm {
letter-spacing: -0.11px;
margin-bottom: 5%;
}
@ -943,7 +959,7 @@ section.slider-block {
width: 25%;
height: 100%;
text-transform: capitalize;
color: #5e5e5e;
color: $font-color-light;
li {
width: 95%;
@ -991,7 +1007,7 @@ section.slider-block {
font-size: 17px;
margin-top: 1%;
color: $brand-color;
letter-spacing: -0.11px;
float: right;
}
@ -1006,7 +1022,7 @@ section.slider-block {
}
.profile-content {
color: $profile-content-color;
color: $other-font-color;
margin-top: 1.4%;
table {
@ -1041,7 +1057,7 @@ section.slider-block {
font-size: 17px;
margin-top: 1%;
color: $brand-color;
letter-spacing: -0.11px;
float: right;
}
@ -1182,8 +1198,8 @@ section.product-detail {
max-width: 604px;
.loader {
border: 16px solid #f3f3f3;
border-top: 16px solid #3498db;
border: 16px solid $border-color;
border-top: 16px solid $brand-color;
border-radius: 50%;
width: 50px;
height: 50px;
@ -1214,12 +1230,12 @@ section.product-detail {
.thumb-frame {
border: 2px solid transparent;
background: #F2F2F2;
background: $background-color;
width: 120px;
max-height: 120px;
&.active {
border-color: #979797;
border-color: $border-color1;
}
img {
@ -1237,7 +1253,7 @@ section.product-detail {
.overlay {
opacity: 0.3;
background: #000000;
background: $font-color;
width: 100%;
height: 18px;
position: absolute;
@ -1262,7 +1278,7 @@ section.product-detail {
.product-hero-image {
display: block;
position: relative;
background: #F2F2F2;
background: $background-color;
width: 100%;
max-height: 480px;
height: 100%;
@ -1273,19 +1289,7 @@ section.product-detail {
max-height: 480px;
}
.whishlist-icon {
margin-top: -480px;
float: right;
margin-right: 10px;
}
.share-icon {
margin-top: -480px;
float: right;
margin-right: 40px;
}
.wishlist {
.add-to-wishlist {
position: absolute;
top: 10px;
right: 12px;
@ -1299,9 +1303,8 @@ section.product-detail {
}
}
.add-to-buttons {
display: none;
display: flex;
flex-direction: row;
margin-top: 10px;
justify-content: space-between;
@ -1371,7 +1374,7 @@ section.product-detail {
.full-specifications {
td {
padding: 10px 0;
color: #5E5E5E;
color: $font-color-light;
&:first-child {
padding-right: 40px;
@ -1522,7 +1525,7 @@ section.product-detail {
}
.reviewer-details {
color: #5E5E5E;
color: $font-color-light;
}
}
@ -1601,6 +1604,10 @@ section.cart {
font-size: 18px;
margin-bottom: 10px;
font-weight: 600;
a {
color: $font-color;
}
}
.price {
@ -1619,7 +1626,7 @@ section.cart {
justify-content: flex-start;
div.qty-text {
color: #5E5E5E;
color: $font-color-light;
margin-right: 10px;
}
@ -1746,10 +1753,10 @@ section.cart {
}
&.active {
color: #2650EF;
color: $link-color;
.decorator {
border: 1px solid #2650EF;
border: 1px solid $link-color;
}
}
}
@ -1807,14 +1814,14 @@ section.cart {
.card-content {
margin-top: 15px;
color: #121212;
color: $font-color;
line-height: 25px;
.horizontal-rule {
margin: 12px 0;
display: block;
width: 25px;
background: #121212;
background: $dark-background;
}
}
}
@ -1826,7 +1833,7 @@ section.cart {
.title {
width: 100px;
display: inline-block;
color: #5E5E5E;
color: $font-color-light;
font-weight: 500;
margin-bottom: 10px;
}
@ -1942,7 +1949,7 @@ section.cart {
.horizontal-rule {
height: 1px;
background: $horizontal-rule-color;
background: $border-color;
width: 148px;
margin-bottom: 24px;
margin-left:auto;
@ -1979,7 +1986,7 @@ section.review {
span {
font-size: 24px;
letter-spacing: -0.58px;
}
}
@ -1988,19 +1995,19 @@ section.review {
.pro-price {
font-size: 24px;
color: #FF6472;
letter-spacing: -0.58px;
color: $disc-price;
}
.pro-price-not {
margin-left: 10px;
color: #A5A5A5;
letter-spacing: -0.26px;
color: $disc-price-pro;
}
.offer {
margin-left: 10px;
letter-spacing: -0.26px;
}
}
}
@ -2013,7 +2020,7 @@ section.review {
margin-top: 10px;
span {
letter-spacing: -0.26px;
}
.btn.btn-primary.right {
@ -2024,8 +2031,8 @@ section.review {
.rating {
margin-top : 25px;
color: #5E5E5E;
letter-spacing: -0.12px;
color: $font-color-light;
span {
display: inline;
@ -2057,7 +2064,7 @@ section.review {
textarea {
margin-top: 5px;
border: 2px solid #C7C7C7;
border: 2px solid $border-color;
border-radius: 3px;
width: 600px;
height: 120px;
@ -2071,8 +2078,8 @@ section.review {
button {
background: $brand-color;
font-size: 14px;
color: #FFFFFF;
letter-spacing: -0.26px;
color: $background-color;
text-align: center;
width: 120px;
height: 38px;
@ -2096,7 +2103,7 @@ section.review {
span {
font-size: 34px;
letter-spacing: -0.82px;
text-align: center;
}
}

View File

@ -5,7 +5,7 @@ body {
max-width: 100%;
width: auto;
color: $font-color;
font-size: $font-size-base;
font-size: 16px;
}
* {

View File

@ -4,7 +4,11 @@ return [
'home' => [
'page-title' => 'Bagisto - Home',
'featured-products' => 'Featured Products',
'new-products' => 'New Products'
'new-products' => 'New Products',
'product-card' => [
'add-to-cart' => 'ADD TO CART'
]
],
'customer' => [
@ -143,8 +147,8 @@ return [
'integrity' => [
'missing_fields' =>'Cart System Integrity Violation, Some Required Fields Missing',
'missing_options' =>'Cart System Integrity Violation, Configurable product\'s options are missing',
],
'title' => 'Shopping Cart',
'empty' => 'Shopping Cart Is Empty',
'continue-shopping' => 'Continue Shopping',
@ -152,6 +156,7 @@ return [
'remove' => 'Remove',
'remove-link' => 'Remove',
'move-to-wishlist' => 'Move to Wishlist',
'add-config-warning' => 'Please Select Option Before Adding To Cart',
'quantity' => [
'quantity' => 'Quantity',
'success' => 'Quantity successfully updated',

View File

@ -32,13 +32,13 @@
<div class="item">
<div style="margin-right: 15px;">
<img class="item-image" src="{{ $productBaseImage['medium_image_url'] }}" />
<a href="{{ url()->to('/').'/products/'.$product->url_key }}"><img class="item-image" src="{{ $productBaseImage['medium_image_url'] }}" /></a>
</div>
<div class="item-details">
<div class="item-title">
{{ $product->name }}
<a href="{{ url()->to('/').'/products/'.$product->url_key }}">{{ $product->name }}</a>
</div>
<div class="price">
@ -50,14 +50,14 @@
<div class="summary">
{{ Cart::getItemAttributeOptionDetails($item)['html'] }}
</div>
@endif
<div class="misc">
<div class="qty-text" :class="[errors.has('qty') ? 'has-error' : '']">{{ __('shop::app.checkout.cart.quantity.quantity') }}</div>
<input class="box" type="text" v-validate="'required|numeric|min_value:1'" name="qty[{{$item->id}}]" value="{{ $item->quantity }}">
<input class="box" type="text" class="control" v-validate="'required|numeric|min_value:1'" name="qty[{{$item->id}}]" value="{{ $item->quantity }}">
<span class="control-error" v-if="errors.has('qty[{{$item->id}}]')">@{{ errors.first('qty') }}</span>

View File

@ -124,7 +124,7 @@
<select type="text" v-validate="'required'" class="control" id="billing[country]" name="billing[country]" v-model="address.billing.country">
<option value=""></option>
@foreach (country()->all() as $code => $country)
@foreach (core()->countries() as $code => $country)
<option value="{{ $code }}">{{ $country }}</option>
@ -264,7 +264,7 @@
<select type="text" v-validate="'required'" class="control" id="shipping[country]" name="shipping[country]" v-model="address.shipping.country">
<option value=""></option>
@foreach (country()->all() as $code => $country)
@foreach (core()->countries() as $code => $country)
<option value="{{ $code }}">{{ $country }}</option>

View File

@ -50,7 +50,7 @@
<div class="signup-confirm" :class="[errors.has('agreement') ? 'has-error' : '']">
<span class="checkbox">
<input type="checkbox" id="checkbox2" name="agreement" v-validate="'required|confirmed'">
<input type="checkbox" id="checkbox2" name="agreement" v-validate="'required'">
<label class="checkbox-view" for="checkbox2"></label>
<span>{{ __('shop::app.customer.signup-form.agree') }}
<a href="">{{ __('shop::app.customer.signup-form.terms') }}</a> & <a href="">{{ __('shop::app.customer.signup-form.conditions') }}</a> {{ __('shop::app.customer.signup-form.using') }}.

View File

@ -309,6 +309,7 @@
<div class="responsive-nav">
<category-nav categories='@json($categories)' url="{{url()->to('/')}}"></category-nav>
</div>
</div>

View File

@ -1 +1 @@
<button class="btn btn-lg btn-primary addtocart">ADD TO CART</button>
<button class="btn btn-lg btn-primary addtocart">{{ __('shop::app.home.product-card.add-to-cart') }}</button>

View File

@ -13,11 +13,10 @@
<div class="product-information">
<div class="product-name">
{{ $product->id }}
<a href="" title="{{ $product->name }}">
<span>{{ $product->name }}</span>
<a href="{{ url()->to('/').'/products/'.$product->url_key }}" title="{{ $product->name }}">
<span>
{{ $product->name }}
</span>
</a>
</div>
@ -29,8 +28,23 @@
@include ('shop::products.review', ['product' => $product])
@include ('shop::products.add-to', ['product' => $product])
@if(Route::currentRouteName() == "shop.products.index")
@include ('shop::products.add-to', ['product' => $product])
@else
@if($product->type == "configurable")
<a href="{{ route('cart.add.configurable', $product->url_key) }}" class="btn btn-lg btn-primary addtocart">{{ __('shop::app.home.product-card.add-to-cart') }}</a>
@include('shop::products.wishlist')
@else
<form action="{{route('cart.add', $product->id)}}" method="POST">
@csrf
<input type="hidden" name="product" value="{{ $product->id }}">
<input type="hidden" name="quantity" value="1">
<input type="hidden" value="false" name="is_configurable">
<button class="btn btn-lg btn-primary addtocart">{{ __('shop::app.home.product-card.add-to-cart') }}</button>
</form>
@endif
@endif
</div>
</div>

View File

@ -119,7 +119,6 @@
</section>
@endsection
@push('scripts')
<script>
@ -154,11 +153,4 @@
</script>
@endpush
@endpush

View File

@ -65,17 +65,12 @@
</accordian>
@include ('shop::products.view.attributes')
@include ('shop::products.view.reviews')
</div>
</form>
</div>
@include ('shop::products.view.up-sells')
</section>
@endsection

0
packages/Webkul/Tax/.gitignore vendored Normal file
View File

View File

@ -0,0 +1,26 @@
{
"name": "webkul/laravel-tax",
"license": "MIT",
"description" : "Tax package for store front and customers",
"authors": [
{
"name": "Prashant Singh",
"email": "prashant.singh852@webkul.com"
}
],
"require": {},
"autoload": {
"psr-4": {
"Webkul\\Tax\\": "src/"
}
},
"extra": {
"laravel": {
"providers": [
"Webkul\\Tax\\Providers\\TaxServiceProvider"
],
"aliases": {}
}
},
"minimum-stability": "dev"
}

View File

@ -18,7 +18,7 @@ class CreateTaxRatesTable extends Migration
$table->string('identifier')->unique();
$table->boolean('is_zip_from')->default(0);
$table->boolean('is_zip')->default(0);
$table->string('zip_code')->nullable();
@ -30,7 +30,7 @@ class CreateTaxRatesTable extends Migration
$table->string('country');
$table->float('tax_rate', 12, 4);
$table->decimal('tax_rate', 12, 4);
$table->timestamps();
});

View File

@ -0,0 +1,13 @@
<?php
namespace Webkul\Tax\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
}

View File

@ -1,13 +1,13 @@
<?php
namespace Webkul\Core\Http\Controllers;
namespace Webkul\Tax\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Webkul\Channel\Channel as Channel;
use Webkul\Core\Repositories\TaxCategoriesRepository as TaxRule;
use Webkul\Core\Repositories\TaxRatesRepository as TaxRate;
use Webkul\Core\Repositories\TaxMapRepository as TaxMap;
use Webkul\Channel as Channel;
use Webkul\Tax\Repositories\TaxCategoriesRepository as TaxRule;
use Webkul\Tax\Repositories\TaxRatesRepository as TaxRate;
use Webkul\Tax\Repositories\TaxMapRepository as TaxMap;
/**
* Tax controller
@ -34,7 +34,7 @@ class TaxCategoryController extends Controller
/**
* Create a new controller instance.
*
* @param Webkul\Core\Repositories\TaxCategoriesRepository $taxRule
* @param Webkul\Tax\Repositories\TaxCategoriesRepository $taxRule
* @return void
*/
public function __construct(TaxRule $taxRule, TaxRate $taxRate, TaxMap $taxMap)
@ -77,6 +77,8 @@ class TaxCategoryController extends Controller
'description' => 'required|string'
]);
dd($data);
if($currentTaxRule = $this->taxRule->create(request()->input())) {
$allTaxRules = $data['taxrates'];

View File

@ -1,13 +1,13 @@
<?php
namespace Webkul\Core\Http\Controllers;
namespace Webkul\Tax\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Webkul\Core\Repositories\ChannelRepository as Channel;
use Webkul\Core\Repositories\TaxCategoriesRepository as TaxRule;
use Webkul\Core\Repositories\TaxRatesRepository as TaxRate;
use Webkul\Core\Repositories\TaxMapRepository as TaxMap;
use Webkul\Tax\Repositories\TaxCategoriesRepository as TaxRule;
use Webkul\Tax\Repositories\TaxRatesRepository as TaxRate;
use Webkul\Tax\Repositories\TaxMapRepository as TaxMap;
/**
@ -57,9 +57,9 @@ class TaxController extends Controller
* Create a new controller instance.
*
* @param Webkul\Core\Repositories\ChannelRepository $channel
* @param Webkul\Core\Repositories\TaxCategoriesRepository $taxRule
* @param Webkul\Core\Repositories\TaxRatesRepository $taxRate
* @param Webkul\Core\Repositories\TaxMapRepository $taxMap
* @param Webkul\Tax\Repositories\TaxCategoriesRepository $taxRule
* @param Webkul\Tax\Repositories\TaxRatesRepository $taxRate
* @param Webkul\Tax\Repositories\TaxMapRepository $taxMap
* @return void
*/
public function __construct(Channel $channel, TaxRule $taxRule, TaxRate $taxRate, TaxMap $taxMap)

View File

@ -1,10 +1,10 @@
<?php
namespace Webkul\Core\Http\Controllers;
namespace Webkul\Tax\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Webkul\Core\Repositories\TaxRatesRepository as TaxRate;
use Webkul\Tax\Repositories\TaxRatesRepository as TaxRate;
/**
@ -32,7 +32,7 @@ class TaxRateController extends Controller
/**
* Create a new controller instance.
*
* @param Webkul\Core\Repositories\TaxRatesRepository $taxRate
* @param Webkul\Tax\Repositories\TaxRatesRepository $taxRate
* @return void
*/
public function __construct(TaxRate $taxRate)
@ -73,10 +73,11 @@ class TaxRateController extends Controller
* @return mixed
*/
public function create() {
// dd(request()->all());
$this->validate(request(), [
'identifier' => 'required|string|unique:tax_rates,identifier',
'is_zip' => 'sometimes|confirmed',
'is_zip' => 'sometimes',
'zip_code' => 'sometimes|required_without:is_zip',
'zip_from' => 'nullable|numeric|required_with:is_zip',
'zip_to' => 'nullable|numeric|required_with:is_zip,zip_from',
@ -85,7 +86,14 @@ class TaxRateController extends Controller
'tax_rate' => 'required|numeric'
]);
if($this->taxRate->create(request()->input())) {
$data = request()->all();
// dd($data);
if(isset($data['is_zip'])) {
$data['is_zip'] = 1;
unset($data['zip_code']);
}
if($this->taxRate->create($data)) {
session()->flash('success', 'Tax Rate Created Successfully');
return redirect()->route($this->_config['redirect']);
@ -126,7 +134,7 @@ class TaxRateController extends Controller
$this->validate(request(), [
'identifier' => 'required|string|unique:tax_rates,identifier,'.$id,
'is_zip' => 'sometimes|confirmed',
'is_zip' => 'sometimes',
'zip_from' => 'nullable|numeric|required_with:is_zip',
'zip_to' => 'nullable|numeric|required_with:is_zip,zip_from',
'state' => 'required|string',

View File

@ -0,0 +1,27 @@
<?php
namespace Webkul\Tax\Models;
use Illuminate\Database\Eloquent\Model;
use Webkul\Tax\Models\TaxRate;
use Webkul\Tax\Models\TaxMap;
class TaxCategory extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $table = 'tax_categories';
protected $fillable = [
'channel_id' ,'code', 'name' ,'description'
];
//for joining the two way pivot table
public function tax_rates() {
return $this->belongsToMany(TaxRate::class, 'tax_categories_tax_rates', 'tax_category_id')->withPivot('id');
}
}

View File

@ -0,0 +1,23 @@
<?php
namespace Webkul\Tax\Models;
use Illuminate\Database\Eloquent\Model;
use Webkul\Tax\Models\TaxCategory;
use Webkul\Tax\Models\TaxRate;
class TaxMap extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $table = 'tax_categories_tax_rates';
protected $fillable = [
'tax_category_id', 'tax_rate_id'
];
}

View File

@ -0,0 +1,25 @@
<?php
namespace Webkul\Tax\Models;
use Illuminate\Database\Eloquent\Model;
use Webkul\Tax\Models\TaxCategory;
class TaxRate extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $table = 'tax_rates';
protected $fillable = [
'identifier', 'is_zip', 'zip_code', 'zip_code', 'zip_from', 'zip_to', 'state', 'country', 'tax_rate'
];
public function tax_categories() {
return $this->belongsToMany(TaxCategory::class, 'tax_categories_tax_rates', 'tax_rate_id', 'id');
}
}

View File

@ -0,0 +1,51 @@
<?php
namespace Webkul\Tax\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Validator;
use Illuminate\Routing\Router;
class TaxServiceProvider extends ServiceProvider
{
/**
* Bootstrap services.
*
* @return void
*/
public function boot(Router $router)
{
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'core');
$router->aliasMiddleware('locale', Locale::class);
$router->aliasMiddleware('admin', RedirectIfNotAdmin::class);
$router->aliasMiddleware('customer', RedirectIfNotCustomer::class);
}
/**
* Register services.
*
* @return void
*/
public function register()
{
}
/**
* Register Bouncer as a singleton.
*
* @return void
*/
protected function registerFacades()
{
// $loader = AliasLoader::getInstance();
// $loader->alias('core', CoreFacade::class);
// $this->app->singleton('core', function () {
// return app()->make(Core::class);
// });
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace Webkul\Core\Repositories;
namespace Webkul\Tax\Repositories;
use Webkul\Core\Eloquent\Repository;
@ -19,7 +19,7 @@ class TaxCategoriesRepository extends Repository
*/
function model()
{
return 'Webkul\Core\Models\TaxCategory';
return 'Webkul\Tax\Models\TaxCategory';
}
/**

View File

@ -1,6 +1,6 @@
<?php
namespace Webkul\Core\Repositories;
namespace Webkul\Tax\Repositories;
use Webkul\Core\Eloquent\Repository;
@ -19,7 +19,7 @@ class TaxMapRepository extends Repository
*/
function model()
{
return 'Webkul\Core\Models\TaxMap';
return 'Webkul\Tax\Models\TaxMap';
}
/**

View File

@ -1,6 +1,6 @@
<?php
namespace Webkul\Core\Repositories;
namespace Webkul\Tax\Repositories;
use Webkul\Core\Eloquent\Repository;
@ -19,7 +19,7 @@ class TaxRatesRepository extends Repository
*/
function model()
{
return 'Webkul\Core\Models\TaxRate';
return 'Webkul\Tax\Models\TaxRate';
}
/**

View File

@ -4,7 +4,7 @@
let handler = function(e) {
setTimeout(function(){
e.target.value = e.target.value.toString().toLowerCase()
.replace(/[^\w ]+/g,'')
.replace(/[^\w_ ]+/g,'')
.trim()
.replace(/ +/g,'-');
}, 100);

View File

@ -40,6 +40,31 @@ h2 {
color: $font-color;
}
//tool tip
.tooltip {
position: relative;
border-bottom: 1px solid black;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: black;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
/* Position the tooltip */
position: absolute;
z-index: 1;
}
.tooltip:hover .tooltiptext {
visibility: visible;
}
//tooltip ends here
.hide {
display: none !important;
}

View File

@ -2,7 +2,6 @@
%menu-properties {
width: 48px;
height: 48px;
margin-bottom: 10px;
display: inline-block;
background-size: cover;
}

View File

@ -118,6 +118,13 @@
</tr>
</thead>
<tbody class="{{ $css->tbody }}">
@if(count($results) == 0)
<tr>
<td colspan="{{ count($columns)+1 }}" style="text-align: center;">
No Records Found.
</td>
</tr>
@endif
@foreach ($results as $result)
<tr>

View File

@ -484,7 +484,7 @@ body {
.layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title .remove-filter-link, .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title .remove-filter-link {
font-weight: 400;
color: #0041FF;
color: #0031F0;
margin-right: 10px;
}
@ -722,7 +722,7 @@ section.slider-block div.slider-content div.slider-control {
}
section.slider-block div.slider-content div.slider-control .dark-left-icon {
background-color: #f2f2f2;
background-color: #F2F2F2;
height: 48px;
width: 48px;
max-height: 100%;
@ -730,7 +730,7 @@ section.slider-block div.slider-content div.slider-control .dark-left-icon {
}
section.slider-block div.slider-content div.slider-control .light-right-icon {
background-color: #000;
background-color: #242424;
height: 48px;
width: 48px;
max-height: 100%;
@ -864,7 +864,6 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
cursor: pointer;
}
.header .header-top div.right-content ul.account-dropdown-container {
@ -883,23 +882,39 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
margin-right: 14px;
}
.header .header-top div.right-content ul.account-dropdown-container li.account-dropdown .account-icon {
cursor: pointer;
margin-right: 8px;
height: 24px;
width: 24px;
.header .header-top div.right-content ul.account-dropdown-container li.account-dropdown .dropdown-list {
width: 300px;
padding: 25px;
}
.header .header-top div.right-content ul.account-dropdown-container li.account-dropdown .account {
cursor: pointer;
padding-top: 3px;
padding-right: 5px;
margin-left: 8px;
.header .header-top div.right-content ul.account-dropdown-container li.account-dropdown .dropdown-container {
padding: 0px;
overflow: hidden;
}
.header .header-top div.right-content ul.account-dropdown-container li.account-dropdown .icon.arrow-down-icon {
cursor: pointer;
margin-top: 10px;
.header .header-top div.right-content ul.account-dropdown-container li.account-dropdown ul.account-dropdown-list {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.header .header-top div.right-content ul.account-dropdown-container li.account-dropdown ul.account-dropdown-list li > a {
color: white;
}
.header .header-top div.right-content ul.account-dropdown-container li.account-dropdown ul.account-dropdown-list .btn {
min-width: 100px;
text-align: center;
}
.header .header-top div.right-content ul.cart-dropdown-container {
@ -957,7 +972,6 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
}
.header .header-top div.right-content ul.cart-dropdown-container li.cart-dropdown .dropdown-list .dropdown-container .dropdown-cart > .dropdown-header i {
cursor: pointer;
float: right;
height: 22px;
width: 22px;
@ -1027,9 +1041,9 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
margin-bottom: 8px;
}
.header .header-top div.right-content ul.cart-dropdown-container li.cart-dropdown .dropdown-list .dropdown-container .dropdown-footer button {
border-radius: 0px;
width: 130px;
.header .header-top div.right-content ul.cart-dropdown-container li.cart-dropdown .dropdown-list .dropdown-container .dropdown-footer .btn {
max-width: 170px;
text-align: center;
}
.header .header-top ul.right-responsive {
@ -1075,7 +1089,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
.header .header-bottom .nav ul {
margin: 0;
padding: 0;
border: 1px solid #B1B1B1;
border: 1px solid #E8E8E8;
-webkit-box-shadow: 1px 1px 1px 0 rgba(0, 0, 0, 0.4);
box-shadow: 1px 1px 1px 0 rgba(0, 0, 0, 0.4);
}
@ -1086,7 +1100,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
text-decoration: none;
padding: 0.8em 0.3em 0.8em 0.5em;
text-transform: uppercase;
letter-spacing: 2px;
letter-spacing: -0.38px;
position: relative;
}
@ -1158,17 +1172,25 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
.header .header-bottom .nav ul {
position: absolute;
white-space: nowrap;
border: 1px solid #B1B1B1;
border: 1px solid #E8E8E8;
background-color: white;
z-index: 1;
left: -99999em;
}
.header .header-bottom .nav > li:hover {
background-color: #F2F2F2;
}
.header .header-bottom .nav > li:hover > ul {
left: auto;
min-width: 100%;
}
.header .header-bottom .nav > li li:hover {
background-color: #F2F2F2;
}
.header .header-bottom .nav > li li:hover > ul {
left: 100%;
margin-left: 1px;
@ -1192,7 +1214,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
}
.header .search-responsive .search-content {
border-bottom: 1px solid #e8e8e8;
border-bottom: 1px solid #E8E8E8;
height: 48px;
}
@ -1215,7 +1237,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
}
.header .search-responsive .search-content:first-child {
border-top: 1px solid #e8e8e8;
border-top: 1px solid #E8E8E8;
}
.header .responsive-nav {
@ -1278,7 +1300,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
}
.footer {
background-color: #f2f2f2;
background-color: #F2F2F2;
padding-left: 10%;
padding-right: 10%;
}
@ -1295,7 +1317,6 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
}
.footer .footer-content .footer-list-container .list-container .list-heading {
letter-spacing: -0.26px;
text-transform: uppercase;
color: #a5a5a5;
}
@ -1344,7 +1365,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
}
.footer .footer-content .footer-list-container .list-container .form-container .control-group .btn-primary {
background-color: #000;
background-color: #242424;
margin-top: 8px;
border-radius: 0px;
text-align: center;
@ -1406,8 +1427,8 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
}
.main .top-toolbar .pager select {
background: #FFFFFF;
border: 1px solid #C7C7C7;
background: #F2F2F2;
border: 1px solid #E8E8E8;
border-radius: 3px;
color: #242424;
padding: 10px;
@ -1466,8 +1487,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
margin-right: auto;
text-align: center;
font-size: 18px;
color: #5e5e5e;
letter-spacing: -0.29px;
color: #A5A5A5;
text-align: center;
}
@ -1492,8 +1512,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
.content .login-form .login-text {
font-size: 24px;
font-weight: bold;
color: #3a3a3a;
letter-spacing: -0.23px;
color: #242424;
margin-top: 5%;
margin-bottom: 3%;
}
@ -1508,13 +1527,11 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
.content .login-form .forgot-password-link {
font-size: 17px;
color: #0041FF;
letter-spacing: -0.11px;
color: #0031F0;
margin-bottom: 5%;
}
.content .login-form .signup-confirm {
letter-spacing: -0.11px;
margin-bottom: 5%;
}
@ -1560,7 +1577,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
width: 25%;
height: 100%;
text-transform: capitalize;
color: #5e5e5e;
color: #A5A5A5;
}
.account-content .account-side-menu li {
@ -1593,7 +1610,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
}
.account-content .account-side-menu li.active {
color: #0041FF;
color: #0031F0;
}
.account-content .profile {
@ -1616,8 +1633,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
.account-content .profile .section-head .profile-edit {
font-size: 17px;
margin-top: 1%;
color: #0041FF;
letter-spacing: -0.11px;
color: #0031F0;
float: right;
}
@ -1630,7 +1646,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
}
.account-content .profile-content {
color: #5e5e5e;
color: #5E5E5E;
margin-top: 1.4%;
}
@ -1659,8 +1675,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
.account-content .edit-form-content .section-head .profile-edit {
font-size: 17px;
margin-top: 1%;
color: #0041FF;
letter-spacing: -0.11px;
color: #0031F0;
float: right;
}
@ -1791,8 +1806,8 @@ section.product-detail div.layouter form div.product-image-group {
}
section.product-detail div.layouter form div.product-image-group .loader {
border: 16px solid #f3f3f3;
border-top: 16px solid #3498db;
border: 16px solid #E8E8E8;
border-top: 16px solid #0031F0;
border-radius: 50%;
width: 50px;
height: 50px;
@ -1861,7 +1876,7 @@ section.product-detail div.layouter form div.product-image-group div .thumb-list
}
section.product-detail div.layouter form div.product-image-group div .thumb-list .thumb-frame.active {
border-color: #979797;
border-color: #C7C7C7;
}
section.product-detail div.layouter form div.product-image-group div .thumb-list .thumb-frame img {
@ -1879,7 +1894,7 @@ section.product-detail div.layouter form div.product-image-group div .thumb-list
section.product-detail div.layouter form div.product-image-group div .thumb-list .gallery-control .overlay {
opacity: 0.3;
background: #000000;
background: #242424;
width: 100%;
height: 18px;
position: absolute;
@ -1914,19 +1929,7 @@ section.product-detail div.layouter form div.product-image-group div .product-he
max-height: 480px;
}
section.product-detail div.layouter form div.product-image-group div .product-hero-image .whishlist-icon {
margin-top: -480px;
float: right;
margin-right: 10px;
}
section.product-detail div.layouter form div.product-image-group div .product-hero-image .share-icon {
margin-top: -480px;
float: right;
margin-right: 40px;
}
section.product-detail div.layouter form div.product-image-group div .product-hero-image .wishlist {
section.product-detail div.layouter form div.product-image-group div .product-hero-image .add-to-wishlist {
position: absolute;
top: 10px;
right: 12px;
@ -1939,7 +1942,9 @@ section.product-detail div.layouter form div.product-image-group div .product-he
}
section.product-detail div.layouter form div.product-image-group .add-to-buttons {
display: none;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
@ -2013,7 +2018,7 @@ section.product-detail div.layouter form .details .description {
section.product-detail div.layouter form .details .full-specifications td {
padding: 10px 0;
color: #5E5E5E;
color: #A5A5A5;
}
section.product-detail div.layouter form .details .full-specifications td:first-child {
@ -2152,12 +2157,12 @@ section.product-detail div.layouter form .details .attributes {
}
.rating-reviews .reviews .review .reviewer-details {
color: #5E5E5E;
color: #A5A5A5;
}
.rating-reviews .reviews .view-all {
margin-top: 15px;
color: #0041FF;
color: #0031F0;
margin-bottom: 15px;
}
@ -2248,6 +2253,10 @@ section.cart .cart-content .right-side {
font-weight: 600;
}
.cart-item-list .item .item-details .item-title a {
color: #242424;
}
.cart-item-list .item .item-details .price {
margin-bottom: 10px;
font-size: 18px;
@ -2271,7 +2280,7 @@ section.cart .cart-content .right-side {
}
.cart-item-list .item .item-details .misc div.qty-text {
color: #5E5E5E;
color: #A5A5A5;
margin-right: 10px;
}
@ -2288,12 +2297,12 @@ section.cart .cart-content .right-side {
}
.cart-item-list .item .item-details .misc .remove {
color: #0041FF;
color: #0031F0;
margin-right: 30px;
}
.cart-item-list .item .item-details .misc .towishlist {
color: #0041FF;
color: #0031F0;
}
.order-summary h3 {
@ -2463,7 +2472,7 @@ section.cart .cart-content .right-side {
.checkout-process .col-main .step-content .address .address-card .card-content {
margin-top: 15px;
color: #121212;
color: #242424;
line-height: 25px;
}
@ -2477,7 +2486,7 @@ section.cart .cart-content .right-side {
.checkout-process .col-main .step-content .cart-item-list .item .row .title {
width: 100px;
display: inline-block;
color: #5E5E5E;
color: #A5A5A5;
font-weight: 500;
margin-bottom: 10px;
}
@ -2618,7 +2627,6 @@ section.review .review-layouter .product-info .heading {
section.review .review-layouter .product-info .heading span {
font-size: 24px;
letter-spacing: -0.58px;
}
section.review .review-layouter .product-info .price {
@ -2628,18 +2636,15 @@ section.review .review-layouter .product-info .price {
section.review .review-layouter .product-info .price .pro-price {
font-size: 24px;
color: #FF6472;
letter-spacing: -0.58px;
}
section.review .review-layouter .product-info .price .pro-price-not {
margin-left: 10px;
color: #A5A5A5;
letter-spacing: -0.26px;
}
section.review .review-layouter .product-info .price .offer {
margin-left: 10px;
letter-spacing: -0.26px;
}
section.review .review-layouter .review-info {
@ -2651,10 +2656,6 @@ section.review .review-layouter .review-info .heading {
margin-top: 10px;
}
section.review .review-layouter .review-info .heading span {
letter-spacing: -0.26px;
}
section.review .review-layouter .review-info .heading .btn.btn-primary.right {
float: right;
margin-top: -10px;
@ -2662,8 +2663,7 @@ section.review .review-layouter .review-info .heading .btn.btn-primary.right {
section.review .review-layouter .review-info .rating {
margin-top: 25px;
color: #5E5E5E;
letter-spacing: -0.12px;
color: #A5A5A5;
}
section.review .review-layouter .review-info .rating span {
@ -2696,7 +2696,7 @@ section.review .review-layouter .review-info .write-review .control-group {
section.review .review-layouter .review-info .write-review .control-group textarea {
margin-top: 5px;
border: 2px solid #C7C7C7;
border: 2px solid #E8E8E8;
border-radius: 3px;
width: 600px;
height: 120px;
@ -2707,10 +2707,9 @@ section.review .review-layouter .review-info .submit-button {
}
section.review .review-layouter .review-info .submit-button button {
background: #0041FF;
background: #0031F0;
font-size: 14px;
color: #FFFFFF;
letter-spacing: -0.26px;
color: #F2F2F2;
text-align: center;
width: 120px;
height: 38px;
@ -2738,7 +2737,6 @@ section.review .review-layouter .review-info .review-detail .rating-review {
section.review .review-layouter .review-info .review-detail .rating-review .avg-rating-count span {
font-size: 34px;
letter-spacing: -0.82px;
text-align: center;
}
@ -2779,7 +2777,7 @@ section.review .review-layouter .review-info .review-detail .rating-calculate .p
}
.cusomer-section .customer-section-info .pro-discription .title {
color: #0041FF;
color: #0031F0;
margin-top: 15px;
}

View File

@ -377,6 +377,137 @@ module.exports = {
/* 1 */
/***/ (function(module, exports) {
var g;
// This works in non-strict mode
g = (function() {
return this;
})();
try {
// This works if eval is allowed (see CSP)
g = g || Function("return this")() || (1,eval)("this");
} catch(e) {
// This works if the window reference is available
if(typeof window === "object")
g = window;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {
var utils = __webpack_require__(0);
var normalizeHeaderName = __webpack_require__(21);
var DEFAULT_CONTENT_TYPE = {
'Content-Type': 'application/x-www-form-urlencoded'
};
function setContentTypeIfUnset(headers, value) {
if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
headers['Content-Type'] = value;
}
}
function getDefaultAdapter() {
var adapter;
if (typeof XMLHttpRequest !== 'undefined') {
// For browsers use XHR adapter
adapter = __webpack_require__(6);
} else if (typeof process !== 'undefined') {
// For node use HTTP adapter
adapter = __webpack_require__(6);
}
return adapter;
}
var defaults = {
adapter: getDefaultAdapter(),
transformRequest: [function transformRequest(data, headers) {
normalizeHeaderName(headers, 'Content-Type');
if (utils.isFormData(data) ||
utils.isArrayBuffer(data) ||
utils.isBuffer(data) ||
utils.isStream(data) ||
utils.isFile(data) ||
utils.isBlob(data)
) {
return data;
}
if (utils.isArrayBufferView(data)) {
return data.buffer;
}
if (utils.isURLSearchParams(data)) {
setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
return data.toString();
}
if (utils.isObject(data)) {
setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
return JSON.stringify(data);
}
return data;
}],
transformResponse: [function transformResponse(data) {
/*eslint no-param-reassign:0*/
if (typeof data === 'string') {
try {
data = JSON.parse(data);
} catch (e) { /* Ignore */ }
}
return data;
}],
/**
* A timeout in milliseconds to abort a request. If set to 0 (default) a
* timeout is not created.
*/
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: function validateStatus(status) {
return status >= 200 && status < 300;
}
};
defaults.headers = {
common: {
'Accept': 'application/json, text/plain, */*'
}
};
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
defaults.headers[method] = {};
});
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
});
module.exports = defaults;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
/***/ }),
/* 3 */
/***/ (function(module, exports) {
/* globals __VUE_SSR_CONTEXT__ */
// IMPORTANT: Do NOT use ES2015 features in this file.
@ -482,137 +613,6 @@ module.exports = function normalizeComponent (
}
/***/ }),
/* 2 */
/***/ (function(module, exports) {
var g;
// This works in non-strict mode
g = (function() {
return this;
})();
try {
// This works if eval is allowed (see CSP)
g = g || Function("return this")() || (1,eval)("this");
} catch(e) {
// This works if the window reference is available
if(typeof window === "object")
g = window;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {
var utils = __webpack_require__(0);
var normalizeHeaderName = __webpack_require__(21);
var DEFAULT_CONTENT_TYPE = {
'Content-Type': 'application/x-www-form-urlencoded'
};
function setContentTypeIfUnset(headers, value) {
if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
headers['Content-Type'] = value;
}
}
function getDefaultAdapter() {
var adapter;
if (typeof XMLHttpRequest !== 'undefined') {
// For browsers use XHR adapter
adapter = __webpack_require__(6);
} else if (typeof process !== 'undefined') {
// For node use HTTP adapter
adapter = __webpack_require__(6);
}
return adapter;
}
var defaults = {
adapter: getDefaultAdapter(),
transformRequest: [function transformRequest(data, headers) {
normalizeHeaderName(headers, 'Content-Type');
if (utils.isFormData(data) ||
utils.isArrayBuffer(data) ||
utils.isBuffer(data) ||
utils.isStream(data) ||
utils.isFile(data) ||
utils.isBlob(data)
) {
return data;
}
if (utils.isArrayBufferView(data)) {
return data.buffer;
}
if (utils.isURLSearchParams(data)) {
setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
return data.toString();
}
if (utils.isObject(data)) {
setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
return JSON.stringify(data);
}
return data;
}],
transformResponse: [function transformResponse(data) {
/*eslint no-param-reassign:0*/
if (typeof data === 'string') {
try {
data = JSON.parse(data);
} catch (e) { /* Ignore */ }
}
return data;
}],
/**
* A timeout in milliseconds to abort a request. If set to 0 (default) a
* timeout is not created.
*/
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: function validateStatus(status) {
return status >= 200 && status < 300;
}
};
defaults.headers = {
common: {
'Accept': 'application/json, text/plain, */*'
}
};
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
defaults.headers[method] = {};
});
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
});
module.exports = defaults;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
/***/ }),
/* 4 */
/***/ (function(module, exports) {
@ -1076,7 +1076,7 @@ module.exports = Cancel;
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(11);
module.exports = __webpack_require__(54);
module.exports = __webpack_require__(51);
/***/ }),
@ -1095,7 +1095,6 @@ Vue.component("category-nav", __webpack_require__(36));
Vue.component("category-item", __webpack_require__(39));
Vue.component("image-slider", __webpack_require__(42));
Vue.component("vue-slider", __webpack_require__(50));
Vue.component("cart-dropdown", __webpack_require__(51));
$(document).ready(function () {
@ -22494,7 +22493,7 @@ Vue.compile = compileToFunctions;
module.exports = Vue;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2), __webpack_require__(14).setImmediate))
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(14).setImmediate))
/***/ }),
/* 14 */
@ -22564,7 +22563,7 @@ exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
(typeof global !== "undefined" && global.clearImmediate) ||
(this && this.clearImmediate);
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
/***/ }),
/* 15 */
@ -22757,7 +22756,7 @@ exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
attachTo.clearImmediate = clearImmediate;
}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2), __webpack_require__(4)))
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(4)))
/***/ }),
/* 16 */
@ -29757,7 +29756,7 @@ module.exports = __webpack_require__(18);
var utils = __webpack_require__(0);
var bind = __webpack_require__(5);
var Axios = __webpack_require__(20);
var defaults = __webpack_require__(3);
var defaults = __webpack_require__(2);
/**
* Create an instance of Axios
@ -29840,7 +29839,7 @@ function isSlowBuffer (obj) {
"use strict";
var defaults = __webpack_require__(3);
var defaults = __webpack_require__(2);
var utils = __webpack_require__(0);
var InterceptorManager = __webpack_require__(29);
var dispatchRequest = __webpack_require__(30);
@ -30379,7 +30378,7 @@ module.exports = InterceptorManager;
var utils = __webpack_require__(0);
var transformData = __webpack_require__(31);
var isCancel = __webpack_require__(8);
var defaults = __webpack_require__(3);
var defaults = __webpack_require__(2);
var isAbsoluteURL = __webpack_require__(32);
var combineURLs = __webpack_require__(33);
@ -30634,7 +30633,7 @@ module.exports = function spread(callback) {
/***/ (function(module, exports, __webpack_require__) {
var disposed = false
var normalizeComponent = __webpack_require__(1)
var normalizeComponent = __webpack_require__(3)
/* script */
var __vue_script__ = __webpack_require__(37)
/* template */
@ -30780,7 +30779,7 @@ if (false) {
/***/ (function(module, exports, __webpack_require__) {
var disposed = false
var normalizeComponent = __webpack_require__(1)
var normalizeComponent = __webpack_require__(3)
/* script */
var __vue_script__ = __webpack_require__(40)
/* template */
@ -30847,6 +30846,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
//
//
//
//
// define the item component
/* harmony default export */ __webpack_exports__["default"] = ({
@ -30890,12 +30890,20 @@ var render = function() {
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c("li", [
_c("a", { attrs: { href: this.item["translations"][0].slug } }, [
_vm._v(_vm._s(this.item["translations"][0].name) + ""),
_vm.haveChildren && _vm.item.parent_id != null
? _c("i", { staticClass: "icon expand-icon" })
: _vm._e()
]),
_c(
"a",
{
attrs: {
href: _vm.url + "/categories/" + this.item["translations"][0].slug
}
},
[
_vm._v(_vm._s(this.item["translations"][0].name) + ""),
_vm.haveChildren && _vm.item.parent_id != null
? _c("i", { staticClass: "icon dropdown-right-icon" })
: _vm._e()
]
),
_vm._v(" "),
_vm.haveChildren || _vm.item.parent_id == null
? _c("i", {
@ -30910,9 +30918,11 @@ var render = function() {
? _c(
"ul",
_vm._l(_vm.item.children, function(child, index) {
return _c("category-item", { key: index, attrs: { item: child } }, [
_vm._v("\n\n " + _vm._s(child) + "\n ")
])
return _c(
"category-item",
{ key: index, attrs: { url: _vm.url, item: child } },
[_vm._v("\n\n " + _vm._s(child) + "\n ")]
)
})
)
: _vm._e()
@ -30937,7 +30947,7 @@ function injectStyle (ssrContext) {
if (disposed) return
__webpack_require__(43)
}
var normalizeComponent = __webpack_require__(1)
var normalizeComponent = __webpack_require__(3)
/* script */
var __vue_script__ = __webpack_require__(48)
/* template */
@ -31523,245 +31533,6 @@ if (false) {
/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {
var disposed = false
var normalizeComponent = __webpack_require__(1)
/* script */
var __vue_script__ = __webpack_require__(52)
/* template */
var __vue_template__ = __webpack_require__(53)
/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = null
/* scopeId */
var __vue_scopeId__ = null
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
__vue_script__,
__vue_template__,
__vue_template_functional__,
__vue_styles__,
__vue_scopeId__,
__vue_module_identifier__
)
Component.options.__file = "src/Resources/assets/js/components/cart-dropdown.vue"
/* hot reload */
if (false) {(function () {
var hotAPI = require("vue-hot-reload-api")
hotAPI.install(require("vue"), false)
if (!hotAPI.compatible) return
module.hot.accept()
if (!module.hot.data) {
hotAPI.createRecord("data-v-0f947e82", Component.options)
} else {
hotAPI.reload("data-v-0f947e82", Component.options)
}
module.hot.dispose(function (data) {
disposed = true
})
})()}
module.exports = Component.exports
/***/ }),
/* 52 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
// define the item component
/* harmony default export */ __webpack_exports__["default"] = ({
props: {
items: Object
},
data: function data() {
return {
toggle: true,
totalitems: parseInt(0),
cart_items: [],
placeholder: "http://localhost/bagisto/public/themes/default/assets/images/product/small-product-placeholder.png",
subtotal: parseInt(0)
};
},
computed: {
makeDropdown: function makeDropdown() {}
},
mounted: function mounted() {
if (this.items != undefined) {
this.initializeDropdown();
}
},
methods: {
dropOrHide: function dropOrHide() {
if (this.toggle == false) {
this.toggle = true;
} else {
this.toggle = false;
}
},
initializeDropdown: function initializeDropdown() {
this.cart_items = this.items;
var item;
for (item in this.cart_items) {
this.subtotal = this.subtotal + parseInt(this.cart_items[item][1]);
this.totalitems = this.totalitems + 1;
}
}
}
});
/***/ }),
/* 53 */
/***/ (function(module, exports, __webpack_require__) {
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c("div", [
_c("ul", { staticClass: "cart-dropdown", on: { click: _vm.dropOrHide } }, [
_c("li", { staticClass: "cart-summary" }, [
_c("span", { staticClass: "icon cart-icon" }),
_vm._v(" "),
_c("span", { staticClass: "cart" }, [
_vm.totalitems > 0
? _c("span", { staticClass: "cart-count" }, [
_vm._v(_vm._s(_vm.totalitems))
])
: _vm._e(),
_vm._v("Products")
]),
_vm._v(" "),
_c("span", { staticClass: "icon arrow-down-icon" })
])
]),
_vm._v(" "),
_c("div", { staticClass: "dropdown-cart", class: { show: _vm.toggle } }, [
_c("div", { staticClass: "dropdown-header" }, [
_c("p", { staticClass: "heading" }, [
_vm._v("Cart Subtotal - $ " + _vm._s(_vm.subtotal))
]),
_vm._v(" "),
_c("i", {
staticClass: "icon icon-menu-close",
on: { click: _vm.dropOrHide }
})
]),
_vm._v(" "),
_c(
"div",
{ staticClass: "dropdown-content" },
_vm._l(_vm.items, function(item, index) {
return _c("div", { key: index, staticClass: "item" }, [
item[2] != "null"
? _c("div", { staticClass: "item-image" }, [
_c("img", { attrs: { src: item[2] } })
])
: _c("div", { staticClass: "item-image" }, [
_c("img", { attrs: { src: _vm.placeholder } })
]),
_vm._v(" "),
_c("div", { staticClass: "item-details" }, [
_c("div", { staticClass: "item-name" }, [
_vm._v(_vm._s(item[0]))
]),
_vm._v(" "),
_c("div", { staticClass: "item-price" }, [
_vm._v("$ " + _vm._s(item[1]))
]),
_vm._v(" "),
_c("div", { staticClass: "item-qty" }, [
_vm._v("Quantity - " + _vm._s(item[3]))
])
])
])
})
),
_vm._v(" "),
_vm._m(0)
])
])
}
var staticRenderFns = [
function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c("div", { staticClass: "dropdown-footer" }, [
_c("a", { attrs: { href: "/" } }, [_vm._v("View Shopping Cart")]),
_vm._v(" "),
_c("button", { staticClass: "btn btn-primary btn-lg" }, [
_vm._v("CHECKOUT")
])
])
}
]
render._withStripped = true
module.exports = { render: render, staticRenderFns: staticRenderFns }
if (false) {
module.hot.accept()
if (module.hot.data) {
require("vue-hot-reload-api") .rerender("data-v-0f947e82", module.exports)
}
}
/***/ }),
/* 54 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin