Merge remote-tracking branch 'upstream/master' into issue-4588

This commit is contained in:
devansh bawari 2021-02-11 17:04:56 +05:30
commit f8f432058e
23 changed files with 283 additions and 158 deletions

211
composer.lock generated
View File

@ -167,16 +167,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.172.2",
"version": "3.173.6",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "47a4f005e51ffe158526f7ef7b5723b4313f823c"
"reference": "439a161e46895cd1f7b93b4c0295f95d6a17385e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/47a4f005e51ffe158526f7ef7b5723b4313f823c",
"reference": "47a4f005e51ffe158526f7ef7b5723b4313f823c",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/439a161e46895cd1f7b93b4c0295f95d6a17385e",
"reference": "439a161e46895cd1f7b93b4c0295f95d6a17385e",
"shasum": ""
},
"require": {
@ -251,22 +251,22 @@
"support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.172.2"
"source": "https://github.com/aws/aws-sdk-php/tree/3.173.6"
},
"time": "2021-01-27T19:14:10+00:00"
"time": "2021-02-09T19:14:22+00:00"
},
{
"name": "babenkoivan/elastic-adapter",
"version": "v1.11.0",
"version": "v1.12.0",
"source": {
"type": "git",
"url": "https://github.com/babenkoivan/elastic-adapter.git",
"reference": "49c471dab207ce57512d2fb1f346cc13529a2ba5"
"reference": "e89e5dbda88de881f531add3ceed2658c6455eea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/babenkoivan/elastic-adapter/zipball/49c471dab207ce57512d2fb1f346cc13529a2ba5",
"reference": "49c471dab207ce57512d2fb1f346cc13529a2ba5",
"url": "https://api.github.com/repos/babenkoivan/elastic-adapter/zipball/e89e5dbda88de881f531add3ceed2658c6455eea",
"reference": "e89e5dbda88de881f531add3ceed2658c6455eea",
"shasum": ""
},
"require": {
@ -304,9 +304,19 @@
],
"support": {
"issues": "https://github.com/babenkoivan/elastic-adapter/issues",
"source": "https://github.com/babenkoivan/elastic-adapter/tree/v1.11.0"
"source": "https://github.com/babenkoivan/elastic-adapter/tree/v1.12.0"
},
"time": "2021-01-23T15:54:32+00:00"
"funding": [
{
"url": "https://www.buymeacoffee.com/ivanbabenko",
"type": "buymeacoffee"
},
{
"url": "https://paypal.me/babenkoi",
"type": "paypal"
}
],
"time": "2021-02-01T12:44:21+00:00"
},
{
"name": "babenkoivan/elastic-client",
@ -482,16 +492,16 @@
},
{
"name": "bagistobrasil/bagisto-product-social-share",
"version": "0.1.2",
"version": "0.1.3",
"source": {
"type": "git",
"url": "https://github.com/bagistobrasil/bagisto-product-social-share.git",
"reference": "a81c4f29a3e79ce911a9e419cc83ccf513c0ab38"
"reference": "ebc80456b68db409fe53a9adff74d00d72593797"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bagistobrasil/bagisto-product-social-share/zipball/a81c4f29a3e79ce911a9e419cc83ccf513c0ab38",
"reference": "a81c4f29a3e79ce911a9e419cc83ccf513c0ab38",
"url": "https://api.github.com/repos/bagistobrasil/bagisto-product-social-share/zipball/ebc80456b68db409fe53a9adff74d00d72593797",
"reference": "ebc80456b68db409fe53a9adff74d00d72593797",
"shasum": ""
},
"type": "library",
@ -520,9 +530,9 @@
],
"support": {
"issues": "https://github.com/bagistobrasil/bagisto-product-social-share/issues",
"source": "https://github.com/bagistobrasil/bagisto-product-social-share/tree/0.1.2"
"source": "https://github.com/bagistobrasil/bagisto-product-social-share/tree/0.1.3"
},
"time": "2020-08-04T12:36:28+00:00"
"time": "2021-02-10T11:42:52+00:00"
},
{
"name": "barryvdh/laravel-debugbar",
@ -3948,16 +3958,16 @@
},
{
"name": "nesbot/carbon",
"version": "2.43.0",
"version": "2.45.0",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "d32c57d8389113742f4a88725a170236470012e2"
"reference": "e2ba3174ce869da1713c38340dbb36572dfacd5a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d32c57d8389113742f4a88725a170236470012e2",
"reference": "d32c57d8389113742f4a88725a170236470012e2",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e2ba3174ce869da1713c38340dbb36572dfacd5a",
"reference": "e2ba3174ce869da1713c38340dbb36572dfacd5a",
"shasum": ""
},
"require": {
@ -3973,7 +3983,7 @@
"phpmd/phpmd": "^2.9",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12.54",
"phpunit/phpunit": "^7.5 || ^8.0",
"phpunit/phpunit": "^7.5.20 || ^8.5.14",
"squizlabs/php_codesniffer": "^3.4"
},
"bin": [
@ -4037,7 +4047,7 @@
"type": "tidelift"
}
],
"time": "2020-12-17T20:55:32+00:00"
"time": "2021-02-07T21:35:59+00:00"
},
{
"name": "nikic/php-parser",
@ -5463,16 +5473,16 @@
},
{
"name": "symfony/console",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "d62ec79478b55036f65e2602e282822b8eaaff0a"
"reference": "89d4b176d12a2946a1ae4e34906a025b7b6b135a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/d62ec79478b55036f65e2602e282822b8eaaff0a",
"reference": "d62ec79478b55036f65e2602e282822b8eaaff0a",
"url": "https://api.github.com/repos/symfony/console/zipball/89d4b176d12a2946a1ae4e34906a025b7b6b135a",
"reference": "89d4b176d12a2946a1ae4e34906a025b7b6b135a",
"shasum": ""
},
"require": {
@ -5540,7 +5550,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v5.2.2"
"source": "https://github.com/symfony/console/tree/v5.2.3"
},
"funding": [
{
@ -5556,11 +5566,11 @@
"type": "tidelift"
}
],
"time": "2021-01-27T10:15:41+00:00"
"time": "2021-01-28T22:06:19+00:00"
},
{
"name": "symfony/css-selector",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
@ -5605,7 +5615,7 @@
"description": "Converts CSS selectors to XPath expressions",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/css-selector/tree/v5.2.2"
"source": "https://github.com/symfony/css-selector/tree/v5.2.3"
},
"funding": [
{
@ -5761,16 +5771,16 @@
},
{
"name": "symfony/error-handler",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/error-handler.git",
"reference": "4fd4a377f7b7ec7c3f3b40346a1411e0a83f9d40"
"reference": "48f18b3609e120ea66d59142c23dc53e9562c26d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/4fd4a377f7b7ec7c3f3b40346a1411e0a83f9d40",
"reference": "4fd4a377f7b7ec7c3f3b40346a1411e0a83f9d40",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/48f18b3609e120ea66d59142c23dc53e9562c26d",
"reference": "48f18b3609e120ea66d59142c23dc53e9562c26d",
"shasum": ""
},
"require": {
@ -5810,7 +5820,7 @@
"description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/error-handler/tree/v5.2.2"
"source": "https://github.com/symfony/error-handler/tree/v5.2.3"
},
"funding": [
{
@ -5826,11 +5836,11 @@
"type": "tidelift"
}
],
"time": "2021-01-27T10:15:41+00:00"
"time": "2021-01-28T22:06:19+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
@ -5895,7 +5905,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v5.2.2"
"source": "https://github.com/symfony/event-dispatcher/tree/v5.2.3"
},
"funding": [
{
@ -5994,16 +6004,16 @@
},
{
"name": "symfony/finder",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "196f45723b5e618bf0e23b97e96d11652696ea9e"
"reference": "4adc8d172d602008c204c2e16956f99257248e03"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/196f45723b5e618bf0e23b97e96d11652696ea9e",
"reference": "196f45723b5e618bf0e23b97e96d11652696ea9e",
"url": "https://api.github.com/repos/symfony/finder/zipball/4adc8d172d602008c204c2e16956f99257248e03",
"reference": "4adc8d172d602008c204c2e16956f99257248e03",
"shasum": ""
},
"require": {
@ -6035,7 +6045,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/finder/tree/v5.2.2"
"source": "https://github.com/symfony/finder/tree/v5.2.3"
},
"funding": [
{
@ -6051,7 +6061,7 @@
"type": "tidelift"
}
],
"time": "2021-01-27T10:01:46+00:00"
"time": "2021-01-28T22:06:19+00:00"
},
{
"name": "symfony/http-client-contracts",
@ -6134,16 +6144,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "16dfa5acf8103f0394d447f8eea3ea49f9e50855"
"reference": "20c554c0f03f7cde5ce230ed248470cccbc34c36"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/16dfa5acf8103f0394d447f8eea3ea49f9e50855",
"reference": "16dfa5acf8103f0394d447f8eea3ea49f9e50855",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/20c554c0f03f7cde5ce230ed248470cccbc34c36",
"reference": "20c554c0f03f7cde5ce230ed248470cccbc34c36",
"shasum": ""
},
"require": {
@ -6187,7 +6197,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v5.2.2"
"source": "https://github.com/symfony/http-foundation/tree/v5.2.3"
},
"funding": [
{
@ -6203,20 +6213,20 @@
"type": "tidelift"
}
],
"time": "2021-01-27T11:19:04+00:00"
"time": "2021-02-03T04:42:09+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "831b51e9370ece0febd0950dd819c63f996721c7"
"reference": "89bac04f29e7b0b52f9fa6a4288ca7a8f90a1a05"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/831b51e9370ece0febd0950dd819c63f996721c7",
"reference": "831b51e9370ece0febd0950dd819c63f996721c7",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/89bac04f29e7b0b52f9fa6a4288ca7a8f90a1a05",
"reference": "89bac04f29e7b0b52f9fa6a4288ca7a8f90a1a05",
"shasum": ""
},
"require": {
@ -6299,7 +6309,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v5.2.2"
"source": "https://github.com/symfony/http-kernel/tree/v5.2.3"
},
"funding": [
{
@ -6315,20 +6325,20 @@
"type": "tidelift"
}
],
"time": "2021-01-27T14:45:46+00:00"
"time": "2021-02-03T04:51:58+00:00"
},
{
"name": "symfony/mime",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/mime.git",
"reference": "37bade585ea100d235c031b258eff93b5b6bb9a9"
"reference": "7dee6a43493f39b51ff6c5bb2bd576fe40a76c86"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/mime/zipball/37bade585ea100d235c031b258eff93b5b6bb9a9",
"reference": "37bade585ea100d235c031b258eff93b5b6bb9a9",
"url": "https://api.github.com/repos/symfony/mime/zipball/7dee6a43493f39b51ff6c5bb2bd576fe40a76c86",
"reference": "7dee6a43493f39b51ff6c5bb2bd576fe40a76c86",
"shasum": ""
},
"require": {
@ -6381,7 +6391,7 @@
"mime-type"
],
"support": {
"source": "https://github.com/symfony/mime/tree/v5.2.2"
"source": "https://github.com/symfony/mime/tree/v5.2.3"
},
"funding": [
{
@ -6397,7 +6407,7 @@
"type": "tidelift"
}
],
"time": "2021-01-25T14:08:25+00:00"
"time": "2021-02-02T06:10:15+00:00"
},
{
"name": "symfony/polyfill-ctype",
@ -7198,7 +7208,7 @@
},
{
"name": "symfony/process",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
@ -7240,7 +7250,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/process/tree/v5.2.2"
"source": "https://github.com/symfony/process/tree/v5.2.3"
},
"funding": [
{
@ -7260,7 +7270,7 @@
},
{
"name": "symfony/routing",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
@ -7330,7 +7340,7 @@
"url"
],
"support": {
"source": "https://github.com/symfony/routing/tree/v5.2.2"
"source": "https://github.com/symfony/routing/tree/v5.2.3"
},
"funding": [
{
@ -7429,7 +7439,7 @@
},
{
"name": "symfony/string",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
@ -7492,7 +7502,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v5.2.2"
"source": "https://github.com/symfony/string/tree/v5.2.3"
},
"funding": [
{
@ -7512,7 +7522,7 @@
},
{
"name": "symfony/translation",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
@ -7585,7 +7595,7 @@
"description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/translation/tree/v5.2.2"
"source": "https://github.com/symfony/translation/tree/v5.2.3"
},
"funding": [
{
@ -7683,7 +7693,7 @@
},
{
"name": "symfony/var-dumper",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
@ -7751,7 +7761,7 @@
"dump"
],
"support": {
"source": "https://github.com/symfony/var-dumper/tree/v5.2.2"
"source": "https://github.com/symfony/var-dumper/tree/v5.2.3"
},
"funding": [
{
@ -8062,25 +8072,26 @@
"packages-dev": [
{
"name": "behat/gherkin",
"version": "v4.7.1",
"version": "v4.8.0",
"source": {
"type": "git",
"url": "https://github.com/Behat/Gherkin.git",
"reference": "987bcdc3d29ba433e6bd4b1db4ae59737ba3dacd"
"reference": "2391482cd003dfdc36b679b27e9f5326bd656acd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Behat/Gherkin/zipball/987bcdc3d29ba433e6bd4b1db4ae59737ba3dacd",
"reference": "987bcdc3d29ba433e6bd4b1db4ae59737ba3dacd",
"url": "https://api.github.com/repos/Behat/Gherkin/zipball/2391482cd003dfdc36b679b27e9f5326bd656acd",
"reference": "2391482cd003dfdc36b679b27e9f5326bd656acd",
"shasum": ""
},
"require": {
"php": ">=5.6"
"php": "~7.2|~8.0"
},
"require-dev": {
"phpunit/phpunit": "~5.7|~6|~7",
"symfony/phpunit-bridge": "~2.7|~3|~4",
"symfony/yaml": "~2.3|~3|~4"
"cucumber/cucumber": "dev-gherkin-16.0.0",
"phpunit/phpunit": "~8|~9",
"symfony/phpunit-bridge": "~3|~4|~5",
"symfony/yaml": "~3|~4|~5"
},
"suggest": {
"symfony/yaml": "If you want to parse features, represented in YAML files"
@ -8119,9 +8130,9 @@
],
"support": {
"issues": "https://github.com/Behat/Gherkin/issues",
"source": "https://github.com/Behat/Gherkin/tree/v4.7.1"
"source": "https://github.com/Behat/Gherkin/tree/v4.8.0"
},
"time": "2021-01-26T16:24:32+00:00"
"time": "2021-02-04T12:44:21+00:00"
},
{
"name": "codeception/codeception",
@ -8268,16 +8279,16 @@
},
{
"name": "codeception/lib-innerbrowser",
"version": "1.3.6",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/Codeception/lib-innerbrowser.git",
"reference": "41b79ba6761001bdb1f373a347400180693ad4e7"
"reference": "b7406c710684c255d9b067d7795269a5585a0406"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeception/lib-innerbrowser/zipball/41b79ba6761001bdb1f373a347400180693ad4e7",
"reference": "41b79ba6761001bdb1f373a347400180693ad4e7",
"url": "https://api.github.com/repos/Codeception/lib-innerbrowser/zipball/b7406c710684c255d9b067d7795269a5585a0406",
"reference": "b7406c710684c255d9b067d7795269a5585a0406",
"shasum": ""
},
"require": {
@ -8322,9 +8333,9 @@
],
"support": {
"issues": "https://github.com/Codeception/lib-innerbrowser/issues",
"source": "https://github.com/Codeception/lib-innerbrowser/tree/1.3.6"
"source": "https://github.com/Codeception/lib-innerbrowser/tree/1.4.0"
},
"time": "2021-01-17T11:21:09+00:00"
"time": "2021-01-29T18:17:25+00:00"
},
{
"name": "codeception/module-asserts",
@ -10620,7 +10631,7 @@
},
{
"name": "symfony/browser-kit",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
@ -10671,7 +10682,7 @@
"description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/browser-kit/tree/v5.2.2"
"source": "https://github.com/symfony/browser-kit/tree/v5.2.3"
},
"funding": [
{
@ -10691,7 +10702,7 @@
},
{
"name": "symfony/dom-crawler",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
@ -10745,7 +10756,7 @@
"description": "Eases DOM navigation for HTML and XML documents",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/dom-crawler/tree/v5.2.2"
"source": "https://github.com/symfony/dom-crawler/tree/v5.2.3"
},
"funding": [
{
@ -10765,16 +10776,16 @@
},
{
"name": "symfony/yaml",
"version": "v5.2.2",
"version": "v5.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "6bb8b36c6dea8100268512bf46e858c8eb5c545e"
"reference": "338cddc6d74929f6adf19ca5682ac4b8e109cdb0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/6bb8b36c6dea8100268512bf46e858c8eb5c545e",
"reference": "6bb8b36c6dea8100268512bf46e858c8eb5c545e",
"url": "https://api.github.com/repos/symfony/yaml/zipball/338cddc6d74929f6adf19ca5682ac4b8e109cdb0",
"reference": "338cddc6d74929f6adf19ca5682ac4b8e109cdb0",
"shasum": ""
},
"require": {
@ -10820,7 +10831,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v5.2.2"
"source": "https://github.com/symfony/yaml/tree/v5.2.3"
},
"funding": [
{
@ -10836,7 +10847,7 @@
"type": "tidelift"
}
],
"time": "2021-01-27T10:01:46+00:00"
"time": "2021-02-03T04:42:09+00:00"
},
{
"name": "theseer/tokenizer",

View File

@ -278,7 +278,7 @@ class SmartButtonController extends Controller
{
$cart = Cart::getCart();
$minimumOrderAmount = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
$minimumOrderAmount = (float) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
if (! $cart->checkMinimumOrder()) {
throw new \Exception(trans('shop::app.checkout.cart.minimum-order-message', ['amount' => core()->currency($minimumOrderAmount)]));

View File

@ -5,6 +5,7 @@ namespace Webkul\Product\Helpers;
use Webkul\Product\Models\Product;
use Webkul\Product\Models\ProductAttributeValue;
use Webkul\Product\Facades\ProductImage;
use Webkul\Product\Facades\ProductVideo;
class ConfigurableOption extends AbstractProduct
{
@ -50,6 +51,7 @@ class ConfigurableOption extends AbstractProduct
],
'variant_prices' => $this->getVariantPrices($product),
'variant_images' => $this->getVariantImages($product),
'variant_videos' => $this->getVariantVideos($product),
'chooseText' => trans('shop::app.products.choose-option'),
];
@ -211,4 +213,27 @@ class ConfigurableOption extends AbstractProduct
return $images;
}
/**
* Get product videos for configurable variations
*
* @param \Webkul\Product\Contracts\Product|\Webkul\Product\Contracts\ProductFlat $product
* @return array
*/
protected function getVariantVideos($product)
{
$videos = [];
foreach ($this->getAllowedProducts($product) as $variant) {
if ($variant instanceof \Webkul\Product\Models\ProductFlat) {
$variantId = $variant->product_id;
} else {
$variantId = $variant->id;
}
$videos[$variantId] = ProductVideo::getVideos($variant);
}
return $videos;
}
}

View File

@ -37,43 +37,67 @@ class ProductFlatRepository extends Repository
*/
public function getCategoryProductAttribute($categoryId)
{
$qb = $this->model
->leftJoin('product_categories', 'product_flat.product_id', 'product_categories.product_id')
->where('product_categories.category_id', $categoryId)
->where('product_flat.channel', core()->getCurrentChannelCode())
->where('product_flat.locale', app()->getLocale());
$qb = $this->categoryProductQuerybuilder($categoryId);
$productArrributes = $qb->distinct()
->leftJoin('product_attribute_values as pa', 'product_flat.product_id', 'pa.product_id')
->leftJoin('attributes as at', 'pa.attribute_id', 'at.id')
->where('is_filterable', 1);
$productFlatIds = $qb->pluck('id')->toArray();
$productIds = $qb->pluck('product_flat.product_id')->toArray();
$productArrributesIds = $productArrributes->pluck('pa.attribute_id')->toArray();
$childProductIds = $this->model->distinct()
->whereIn('parent_id', $productFlatIds)
->pluck('product_id')->toArray();
$productSelectArrributes = $productArrributes
->pluck('integer_value')
->toArray();
$productIds = array_merge($productIds, $childProductIds);
$productmultiSelectArrributes = $productArrributes
->pluck('text_value')
->toArray();
$attributeValues = $this->model
->distinct()
->leftJoin('product_attribute_values as pa', 'product_flat.product_id', 'pa.product_id')
->leftJoin('attributes as at', 'pa.attribute_id', 'at.id')
->leftJoin('product_super_attributes as ps', 'product_flat.product_id', 'ps.product_id')
->select('pa.integer_value', 'pa.text_value', 'pa.attribute_id', 'ps.attribute_id as attributeId')
->where('is_filterable', 1)
->WhereIn('pa.product_id', $productIds)
->get();
$multiSelectArrributes = [];
foreach ($productmultiSelectArrributes as $multi) {
if ($multi) {
$multiSelectArrributes = explode(",", $multi);
$attributeInfo['attributeOptions'] = $attributeInfo['attributes'] = [];
foreach ($attributeValues as $attribute) {
$attributeKeys = array_keys($attribute->toArray());
foreach ($attributeKeys as $key) {
if (! is_null($attribute[$key])) {
if ($key == 'integer_value' && ! in_array($attribute[$key], $attributeInfo['attributeOptions'])) {
array_push($attributeInfo['attributeOptions'], $attribute[$key]);
} else if ($key == 'text_value' && ! in_array($attribute[$key], $attributeInfo['attributeOptions'])) {
$multiSelectArrributes = explode(",", $attribute[$key]);
foreach ($multiSelectArrributes as $multi) {
if (! in_array($multi, $attributeInfo['attributeOptions'])) {
array_push($attributeInfo['attributeOptions'], $multi);
}
}
} else if (($key == 'attribute_id' || $key == 'attributeId') && ! in_array($attribute[$key], $attributeInfo['attributes'])) {
array_push($attributeInfo['attributes'], $attribute[$key]);
}
}
}
}
$productSuperArrributesIds = $qb->leftJoin('product_super_attributes as ps', 'product_flat.product_id', 'ps.product_id')
->pluck('ps.attribute_id')
->toArray();
return $attributeInfo;
}
$productCategoryArrributes['attributeOptions'] = array_filter(array_unique(array_merge($productSelectArrributes, $multiSelectArrributes)));
/**
* get Category Product Model
*
* @param int $categoryId
* @return \Illuminate\Support\Querybuilder
*/
public function categoryProductQuerybuilder($categoryId) {
$productCategoryArrributes['attributes'] = array_filter(array_unique(array_merge($productArrributesIds, $productSuperArrributesIds)));
return $productCategoryArrributes;
return $this->model
->leftJoin('product_categories', 'product_flat.product_id', 'product_categories.product_id')
->where('product_categories.category_id', $categoryId)
->where('product_flat.channel', core()->getCurrentChannelCode())
->where('product_flat.locale', app()->getLocale());
}
/**
@ -84,18 +108,25 @@ class ProductFlatRepository extends Repository
*/
public function getProductsRelatedFilterableAttributes($category)
{
$categoryFilterableAttributes = $category->filterableAttributes->pluck('id')->toArray();
$productsCount = $this->categoryProductQuerybuilder($category->id)->count();
$productCategoryArrributes = $this->getCategoryProductAttribute($category->id);
if ($productsCount > 0) {
$categoryFilterableAttributes = $category->filterableAttributes->pluck('id')->toArray();
$allFilterableAttributes = array_filter(array_unique(array_merge($categoryFilterableAttributes, $productCategoryArrributes['attributes'])));
$productCategoryArrributes = $this->getCategoryProductAttribute($category->id);
$attributes = app('Webkul\Attribute\Repositories\AttributeRepository')->getModel()::with(['options' => function($query) use ($productCategoryArrributes) {
return $query->whereIn('id', $productCategoryArrributes['attributeOptions']);
}
])->whereIn('id', $allFilterableAttributes)->get();
$allFilterableAttributes = array_filter(array_unique(array_intersect($categoryFilterableAttributes, $productCategoryArrributes['attributes'])));
return $attributes;
$attributes = app('Webkul\Attribute\Repositories\AttributeRepository')->getModel()::with(['options' => function($query) use ($productCategoryArrributes) {
return $query->whereIn('id', $productCategoryArrributes['attributeOptions']);
}
])->whereIn('id', $allFilterableAttributes)->get();
return $attributes;
} else {
return $category->filterableAttributes;
}
}
/**

View File

@ -6,10 +6,10 @@ use Webkul\Customer\Contracts\CartItem;
use Webkul\Product\Datatypes\CartItemValidationResult;
use Webkul\Product\Models\ProductAttributeValue;
use Webkul\Product\Models\ProductFlat;
use Webkul\Product\Facades\ProductImage;
use Illuminate\Support\Str;
use Webkul\Checkout\Models\CartItem as CartItemModel;
use Illuminate\Support\Facades\DB;
use Webkul\Product\Facades\ProductImage;
class Configurable extends AbstractType
{

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,17 +1,17 @@
/*!
* Sizzle CSS Selector Engine v2.3.5
* Sizzle CSS Selector Engine v2.3.4
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://js.foundation/
*
* Date: 2020-03-14
* Date: 2019-04-08
*/
/*!
* Vue.js v2.6.12
* (c) 2014-2020 Evan You
* Vue.js v2.6.11
* (c) 2014-2019 Evan You
* Released under the MIT License.
*/
@ -27,7 +27,7 @@
*/
/*!
* jQuery JavaScript Library v3.5.1
* jQuery JavaScript Library v3.4.1
* https://jquery.com/
*
* Includes Sizzle.js
@ -37,7 +37,7 @@
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2020-05-04T22:49Z
* Date: 2019-05-01T21:04Z
*/
/**

View File

@ -1,4 +1,4 @@
{
"/js/shop.js": "/js/shop.js?id=83c93b077da401f7b709",
"/css/shop.css": "/css/shop.css?id=6f4a4f8fad1b25e05e33"
"/js/shop.js": "/js/shop.js?id=f1380c0210d5af3612b5",
"/css/shop.css": "/css/shop.css?id=9eda91883c592e62fe40"
}

View File

@ -74,7 +74,7 @@ class OnepageController extends Controller
return redirect()->route('customer.session.index');
}
$minimumOrderAmount = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
$minimumOrderAmount = (float) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
if (! $cart->checkMinimumOrder()) {
session()->flash('warning', trans('shop::app.checkout.cart.minimum-order-message', ['amount' => core()->currency($minimumOrderAmount)]));

View File

@ -17,7 +17,7 @@ export default {
checkMinimumOrder: function (e) {
if (! this.isMinimumOrderCompleted) {
e.preventDefault();
window.flashMessages = [{'type': 'alert-warning', 'message': this.minimumOrderMessage}];
window.flashMessages = [{'type': 'alert-warning', 'message': this.minimumOrderMessage.replace(/\ /g, ' ') }];
this.$root.addFlashMessages();
}
}

View File

@ -409,6 +409,7 @@ input {
}
.product-card {
height: 480px;
position: relative;
padding: 15px;
@ -448,6 +449,30 @@ input {
}
.cart-wish-wrap {
position: absolute;
display: inline-flex;
justify-content: flex-start;
align-items: center;
bottom: 5px;
height: 40px;
.addtocart {
margin-right: 10px;
text-transform: uppercase;
text-align: left;
box-shadow: 1px 1px 0px $shadow-color;
}
.add-to-wishlist {
margin-top: 5px;
background: transparent;
border: 0;
cursor: pointer;
padding: 0;
}
}
.default-wrap {
display: inline-flex;
justify-content: flex-start;
align-items: center;
@ -4724,10 +4749,14 @@ td {
.cart-wish-wrap {
display: flex;
}
.default-wrap {
display: flex;
}
.white-cross-sm-icon {
width: 24px;
height:24px;
}
.add-to-wishlist {
margin-top: auto;
margin-left: 15px;
}

View File

@ -129,7 +129,7 @@
@if (! cart()->hasError())
@php
$minimumOrderAmount = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
$minimumOrderAmount = (float) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
@endphp
<proceed-to-checkout

View File

@ -87,7 +87,7 @@
<a href="{{ route('shop.checkout.cart.index') }}">{{ __('shop::app.minicart.view-cart') }}</a>
@php
$minimumOrderAmount = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
$minimumOrderAmount = (float) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
@endphp
<proceed-to-checkout

View File

@ -1,5 +1,5 @@
@if ($logo = core()->getCurrentChannel()->logo_url)
<img src="{{ $logo }}" alt="{{ config('app.name') }}" style="height: 40px; width: 110px;"/>
@else
<img src="{{ bagisto_asset('images/logo.svg') }}" alt="">
<img src="{{ asset('themes/default/assets/images/logo.svg') }}" alt="{{ config('app.name') }}"/>
@endif

View File

@ -1,10 +1,12 @@
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
@php
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false;
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
@endphp
<div class="cart-wish-wrap">
<div class="{{ $toolbarHelper->isModeActive('grid') ? 'cart-wish-wrap' : 'default-wrap' }}">
<form action="{{ route('cart.add', $product->product_id) }}" method="POST">
@csrf
<input type="hidden" name="product_id" value="{{ $product->product_id }}">

View File

@ -50,7 +50,7 @@
<span v-if="attribute.swatch_type == 'color'" :style="{ background: option.swatch_value }"></span>
<img v-if="attribute.swatch_type == 'image'" :src="option.swatch_value" alt="" />
<img v-if="attribute.swatch_type == 'image'" :src="option.swatch_value" :title="option.label" alt="" />
<span v-if="attribute.swatch_type == 'text'">
@{{ option.label }}
@ -307,6 +307,10 @@
this.config.variant_images[this.simpleProduct].forEach(function(image) {
galleryImages.unshift(image)
});
this.config.variant_videos[this.simpleProduct].forEach(function(video) {
galleryImages.unshift(video)
});
}
},

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
{
"/js/velocity.js": "/js/velocity.js?id=a45dba1beb5c6f79193d",
"/css/velocity-admin.css": "/css/velocity-admin.css?id=4322502d80a0e4a0affd",
"/css/velocity.css": "/css/velocity.css?id=562e19f8c4e4916566d7"
"/css/velocity.css": "/css/velocity.css?id=a0d4320e35797371f8f0"
}

View File

@ -801,6 +801,10 @@
content: "\e93e";
}
&.compare::before {
content: "\e93b";
}
&.orders::before {
content: "\e931";
}

View File

@ -113,6 +113,15 @@
</li>
@endif
@if (core()->getConfigData('general.content.shop.compare_option'))
<li>
<a href="{{ route('velocity.customer.product.compare') }}" class="unset">
<i class="icon compare text-down-3"></i>
<span>{{ __('shop::app.customer.compare.text') }}</span>
</a>
</li>
@endif
<li>
<a href="{{ route('customer.orders.index') }}" class="unset">
<i class="icon orders text-down-3"></i>

View File

@ -46,7 +46,7 @@
<div class="row">
@php
$minimumOrderAmount = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
$minimumOrderAmount = (float) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
@endphp
<proceed-to-checkout

View File

@ -76,7 +76,7 @@
<span v-if="attribute.swatch_type == 'color'" :style="{ background: option.swatch_value }"></span>
<img v-if="attribute.swatch_type == 'image'" :src="option.swatch_value" alt="" />
<img v-if="attribute.swatch_type == 'image'" :src="option.swatch_value" :title="option.label" alt="" />
<span v-if="attribute.swatch_type == 'text'">
@{{ option.label }}
@ -321,8 +321,18 @@
this.config.variant_images[this.simpleProduct].forEach(function(image) {
galleryImages.unshift(image)
});
this.config.variant_videos[this.simpleProduct].forEach(function(video) {
galleryImages.unshift(video)
});
}
galleryImages.forEach(function(image){
if (image.type == 'video') {
image.small_image_url = image.medium_image_url = image.large_image_url = image.original_image_url= image.video_url;
}
});
eventBus.$emit('configurable-variant-update-images-event', galleryImages);
},