From 35b13e82956505db8ee7487d1d111c01ac7b7e25 Mon Sep 17 00:00:00 2001 From: Yarik Date: Fri, 12 May 2017 18:48:45 +0300 Subject: [PATCH] Fixes --- composer.lock | 294 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------------------------------------------------- frontend/controllers/CheckoutController.php | 49 +++++++++++++++++++++++++++++++++---------------- frontend/controllers/SiteController.php | 15 +++++++++++---- frontend/models/Order.php | 3 +++ frontend/views/category/view.php | 6 +----- frontend/views/layouts/main.php | 2 +- frontend/views/product/view.php | 14 +++++++++----- 7 files changed, 203 insertions(+), 180 deletions(-) diff --git a/composer.lock b/composer.lock index 618ff2c..072cbbc 100755 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,6 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "b18802ddb055188c55f12e121f5e14cf", "content-hash": "74adfbddeb0bd9b6f951a699924afa86", "packages": [ { @@ -65,7 +64,7 @@ "yii 2", "yii2" ], - "time": "2015-03-28 21:53:43" + "time": "2015-03-28T21:53:43+00:00" }, { "name": "bower-asset/amcharts", @@ -103,10 +102,7 @@ }, "type": "bower-asset-library", "extra": { - "bower-asset-main": "./dist/amcharts/amcharts.js", - "branch-alias": { - "dev-master": "3.13.0-dev" - } + "bower-asset-main": "./dist/amcharts/amcharts.js" }, "time": "2015-01-28 07:40:20" }, @@ -125,7 +121,7 @@ "shasum": "" }, "require": { - "bower-asset/jquery": ">=1.9.1,<=3" + "bower-asset/jquery": ">=1.9.1,<4.0" }, "type": "bower-asset-library", "extra": { @@ -336,16 +332,16 @@ }, { "name": "bower-asset/jquery.inputmask", - "version": "3.3.5", + "version": "3.3.6", "source": { "type": "git", "url": "https://github.com/RobinHerbots/Inputmask.git", - "reference": "ed27356d1b22366be48c4e7b8d038b9649bd4ab0" + "reference": "e42852f4afa01a80815394a5b2f9ce504c1a8d0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/ed27356d1b22366be48c4e7b8d038b9649bd4ab0", - "reference": "ed27356d1b22366be48c4e7b8d038b9649bd4ab0", + "url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/e42852f4afa01a80815394a5b2f9ce504c1a8d0b", + "reference": "e42852f4afa01a80815394a5b2f9ce504c1a8d0b", "shasum": "" }, "require": { @@ -359,7 +355,6 @@ "./dist/inputmask/inputmask.date.extensions.js", "./dist/inputmask/inputmask.numeric.extensions.js", "./dist/inputmask/inputmask.phone.extensions.js", - "./dist/inputmask/inputmask.regex.extensions.js", "./dist/inputmask/jquery.inputmask.js", "./dist/inputmask/global/document.js", "./dist/inputmask/global/window.js", @@ -384,7 +379,7 @@ "license": [ "http://opensource.org/licenses/mit-license.php" ], - "description": "jquery.inputmask is a jquery plugin which create an input mask.", + "description": "Inputmask is a javascript library which creates an input mask. Inputmask can run against vanilla javascript, jQuery and jqlite.", "keywords": [ "form", "input", @@ -576,7 +571,7 @@ "markdown", "markdown-extra" ], - "time": "2016-09-14 20:40:20" + "time": "2016-09-14T20:40:20+00:00" }, { "name": "ezyang/htmlpurifier", @@ -623,7 +618,7 @@ "keywords": [ "html" ], - "time": "2017-03-13 06:30:53" + "time": "2017-03-13T06:30:53+00:00" }, { "name": "firebase/php-jwt", @@ -666,7 +661,7 @@ ], "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", "homepage": "https://github.com/firebase/php-jwt", - "time": "2016-07-18 04:51:16" + "time": "2016-07-18T04:51:16+00:00" }, { "name": "fortawesome/font-awesome", @@ -714,7 +709,7 @@ "font", "icon" ], - "time": "2016-10-24 15:52:54" + "time": "2016-10-24T15:52:54+00:00" }, { "name": "google/apiclient", @@ -773,7 +768,7 @@ "keywords": [ "google" ], - "time": "2017-03-22 18:32:04" + "time": "2017-03-22T18:32:04+00:00" }, { "name": "google/apiclient-services", @@ -810,7 +805,7 @@ "keywords": [ "google" ], - "time": "2017-03-13 17:40:44" + "time": "2017-03-13T17:40:44+00:00" }, { "name": "google/auth", @@ -858,7 +853,7 @@ "google", "oauth2" ], - "time": "2016-11-02 14:59:14" + "time": "2016-11-02T14:59:14+00:00" }, { "name": "guzzlehttp/guzzle", @@ -920,7 +915,7 @@ "rest", "web service" ], - "time": "2017-02-28 22:50:30" + "time": "2017-02-28T22:50:30+00:00" }, { "name": "guzzlehttp/promises", @@ -971,7 +966,7 @@ "keywords": [ "promise" ], - "time": "2016-12-20 10:07:11" + "time": "2016-12-20T10:07:11+00:00" }, { "name": "guzzlehttp/psr7", @@ -1036,7 +1031,7 @@ "uri", "url" ], - "time": "2017-03-20 17:10:46" + "time": "2017-03-20T17:10:46+00:00" }, { "name": "hiqdev/yii2-asset-icheck", @@ -1108,7 +1103,7 @@ "iCheck", "yii2" ], - "time": "2016-03-30 10:59:26" + "time": "2016-03-30T10:59:26+00:00" }, { "name": "hiqdev/yii2-asset-pnotify", @@ -1170,7 +1165,7 @@ "pnotify", "yii2" ], - "time": "2015-09-09 15:16:38" + "time": "2015-09-09T15:16:38+00:00" }, { "name": "imagine/imagine", @@ -1227,7 +1222,7 @@ "image manipulation", "image processing" ], - "time": "2015-09-19 16:54:05" + "time": "2015-09-19T16:54:05+00:00" }, { "name": "kartik-v/bootstrap-fileinput", @@ -1280,7 +1275,7 @@ "progress", "upload" ], - "time": "2017-04-02 18:38:08" + "time": "2017-04-02T18:38:08+00:00" }, { "name": "kartik-v/yii2-krajee-base", @@ -1331,7 +1326,7 @@ "widget", "yii2" ], - "time": "2017-02-22 05:58:53" + "time": "2017-02-22T05:58:53+00:00" }, { "name": "kartik-v/yii2-widget-colorinput", @@ -1385,7 +1380,7 @@ "widget", "yii2" ], - "time": "2016-01-14 11:15:49" + "time": "2016-01-14T11:15:49+00:00" }, { "name": "kartik-v/yii2-widget-datepicker", @@ -1494,7 +1489,7 @@ "widget", "yii2" ], - "time": "2016-06-16 06:53:01" + "time": "2016-06-16T06:53:01+00:00" }, { "name": "kartik-v/yii2-widget-select2", @@ -1625,20 +1620,20 @@ "logging", "psr-3" ], - "time": "2017-03-13 07:08:03" + "time": "2017-03-13T07:08:03+00:00" }, { "name": "noam148/yii2-image-manager", - "version": "1.2.2", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/noam148/yii2-image-manager.git", - "reference": "4b44a4929661a24e3e133f9e38f409966d313940" + "reference": "82466e453b5b68e2567d3dae6f8af0ab687ae098" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/noam148/yii2-image-manager/zipball/4b44a4929661a24e3e133f9e38f409966d313940", - "reference": "4b44a4929661a24e3e133f9e38f409966d313940", + "url": "https://api.github.com/repos/noam148/yii2-image-manager/zipball/82466e453b5b68e2567d3dae6f8af0ab687ae098", + "reference": "82466e453b5b68e2567d3dae6f8af0ab687ae098", "shasum": "" }, "require": { @@ -1674,7 +1669,7 @@ "widget", "yii2" ], - "time": "2017-04-23 15:41:45" + "time": "2017-05-10T19:29:49+00:00" }, { "name": "noam148/yii2-image-resize", @@ -1720,7 +1715,7 @@ "resize", "yii2" ], - "time": "2016-11-29 18:17:37" + "time": "2016-11-29T18:17:37+00:00" }, { "name": "phpoffice/phpexcel", @@ -1777,20 +1772,20 @@ "xls", "xlsx" ], - "time": "2015-05-01 07:00:55" + "time": "2015-05-01T07:00:55+00:00" }, { "name": "phpseclib/phpseclib", - "version": "2.0.4", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "ab8028c93c03cc8d9c824efa75dc94f1db2369bf" + "reference": "f8dd0e18d2328c447dd4190fecd11ef52680d968" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/ab8028c93c03cc8d9c824efa75dc94f1db2369bf", - "reference": "ab8028c93c03cc8d9c824efa75dc94f1db2369bf", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/f8dd0e18d2328c447dd4190fecd11ef52680d968", + "reference": "f8dd0e18d2328c447dd4190fecd11ef52680d968", "shasum": "" }, "require": { @@ -1869,7 +1864,7 @@ "x.509", "x509" ], - "time": "2016-10-04 00:57:04" + "time": "2017-05-08T05:58:35+00:00" }, { "name": "psr/cache", @@ -1915,7 +1910,7 @@ "psr", "psr-6" ], - "time": "2016-08-06 20:24:11" + "time": "2016-08-06T20:24:11+00:00" }, { "name": "psr/http-message", @@ -1965,7 +1960,7 @@ "request", "response" ], - "time": "2016-08-06 14:39:51" + "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", @@ -2012,7 +2007,7 @@ "psr", "psr-3" ], - "time": "2016-10-10 12:19:37" + "time": "2016-10-10T12:19:37+00:00" }, { "name": "rmrevin/yii2-fontawesome", @@ -2064,7 +2059,7 @@ "font", "yii" ], - "time": "2017-01-11 14:05:47" + "time": "2017-01-11T14:05:47+00:00" }, { "name": "speixoto/yii2-amcharts", @@ -2106,20 +2101,20 @@ "amcharts", "yii" ], - "time": "2016-08-23 13:52:28" + "time": "2016-08-23T13:52:28+00:00" }, { "name": "swiftmailer/swiftmailer", - "version": "v5.4.7", + "version": "v5.4.8", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "56db4ed32a6d5c9824c3ecc1d2e538f663f47eb4" + "reference": "9a06dc570a0367850280eefd3f1dc2da45aef517" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/56db4ed32a6d5c9824c3ecc1d2e538f663f47eb4", - "reference": "56db4ed32a6d5c9824c3ecc1d2e538f663f47eb4", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/9a06dc570a0367850280eefd3f1dc2da45aef517", + "reference": "9a06dc570a0367850280eefd3f1dc2da45aef517", "shasum": "" }, "require": { @@ -2160,20 +2155,20 @@ "mail", "mailer" ], - "time": "2017-04-20 17:32:18" + "time": "2017-05-01T15:54:03+00:00" }, { "name": "tinymce/tinymce", - "version": "4.5.7", + "version": "4.6.1", "source": { "type": "git", "url": "https://github.com/tinymce/tinymce-dist.git", - "reference": "9f00447e1dd5b99d47810c84c66c39950663c129" + "reference": "a4129cbcaea6d4e9c26b103f11e2215dd85b8cb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/9f00447e1dd5b99d47810c84c66c39950663c129", - "reference": "9f00447e1dd5b99d47810c84c66c39950663c129", + "url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/a4129cbcaea6d4e9c26b103f11e2215dd85b8cb7", + "reference": "a4129cbcaea6d4e9c26b103f11e2215dd85b8cb7", "shasum": "" }, "type": "component", @@ -2206,7 +2201,7 @@ "tinymce", "wysiwyg" ], - "time": "2017-04-25 12:41:19" + "time": "2017-05-10T13:42:57+00:00" }, { "name": "yii2tech/filedb", @@ -2254,7 +2249,7 @@ "static", "yii2" ], - "time": "2017-02-06 10:58:30" + "time": "2017-02-06T10:58:30+00:00" }, { "name": "yiisoft/yii2", @@ -2354,7 +2349,7 @@ "framework", "yii2" ], - "time": "2017-02-08 09:04:32" + "time": "2017-02-08T09:04:32+00:00" }, { "name": "yiisoft/yii2-bootstrap", @@ -2404,7 +2399,7 @@ "bootstrap", "yii2" ], - "time": "2016-03-17 03:29:28" + "time": "2016-03-17T03:29:28+00:00" }, { "name": "yiisoft/yii2-composer", @@ -2454,7 +2449,7 @@ "extension installer", "yii2" ], - "time": "2016-12-20 13:26:02" + "time": "2016-12-20T13:26:02+00:00" }, { "name": "yiisoft/yii2-imagine", @@ -2502,20 +2497,20 @@ "imagine", "yii2" ], - "time": "2016-11-03 19:28:39" + "time": "2016-11-03T19:28:39+00:00" }, { "name": "yiisoft/yii2-swiftmailer", - "version": "2.0.6", + "version": "2.0.7", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-swiftmailer.git", - "reference": "26b900767f1031ff3a4668dfa36c10595875f0a5" + "reference": "8a03a62cbcb82e7697d3002eb43a8d2637f566ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/26b900767f1031ff3a4668dfa36c10595875f0a5", - "reference": "26b900767f1031ff3a4668dfa36c10595875f0a5", + "url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/8a03a62cbcb82e7697d3002eb43a8d2637f566ec", + "reference": "8a03a62cbcb82e7697d3002eb43a8d2637f566ec", "shasum": "" }, "require": { @@ -2552,7 +2547,7 @@ "swiftmailer", "yii2" ], - "time": "2016-09-09 11:48:11" + "time": "2017-05-01T08:29:00+00:00" }, { "name": "yiister/yii2-gentelella", @@ -2610,7 +2605,7 @@ "theme", "yii2" ], - "time": "2017-03-21 14:59:58" + "time": "2017-03-21T14:59:58+00:00" } ], "packages-dev": [ @@ -2671,7 +2666,7 @@ "gherkin", "parser" ], - "time": "2016-10-30 11:50:56" + "time": "2016-10-30T11:50:56+00:00" }, { "name": "bower-asset/typeahead.js", @@ -2702,16 +2697,16 @@ }, { "name": "codeception/base", - "version": "2.2.10", + "version": "2.2.11", "source": { "type": "git", "url": "https://github.com/Codeception/base.git", - "reference": "99142344c1c3ea147d2908473ee96bfef81a2349" + "reference": "eea7d29115390772363a4f7744396927b33bf4f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/base/zipball/99142344c1c3ea147d2908473ee96bfef81a2349", - "reference": "99142344c1c3ea147d2908473ee96bfef81a2349", + "url": "https://api.github.com/repos/Codeception/base/zipball/eea7d29115390772363a4f7744396927b33bf4f3", + "reference": "eea7d29115390772363a4f7744396927b33bf4f3", "shasum": "" }, "require": { @@ -2720,9 +2715,10 @@ "ext-mbstring": "*", "guzzlehttp/psr7": "~1.0", "php": ">=5.4.0 <8.0", - "phpunit/php-code-coverage": ">=2.2.4 <5.0", + "phpunit/php-code-coverage": ">=2.2.4 <6.0", "phpunit/phpunit": ">4.8.20 <6.0", - "sebastian/comparator": "~1.1", + "phpunit/phpunit-mock-objects": ">2.3 <5.0", + "sebastian/comparator": ">1.1 <3.0", "sebastian/diff": "^1.4", "stecman/symfony-console-completion": "^0.7.0", "symfony/browser-kit": ">=2.7 <4.0", @@ -2789,7 +2785,7 @@ "functional testing", "unit testing" ], - "time": "2017-03-25 03:34:50" + "time": "2017-05-11T21:58:39+00:00" }, { "name": "codeception/verify", @@ -2825,7 +2821,7 @@ } ], "description": "BDD assertion library for PHPUnit", - "time": "2017-01-09 10:58:51" + "time": "2017-01-09T10:58:51+00:00" }, { "name": "doctrine/instantiator", @@ -2879,7 +2875,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2015-06-14T21:17:01+00:00" }, { "name": "fzaninotto/faker", @@ -2927,7 +2923,7 @@ "faker", "fixtures" ], - "time": "2016-04-29 12:21:54" + "time": "2016-04-29T12:21:54+00:00" }, { "name": "myclabs/deep-copy", @@ -2969,7 +2965,7 @@ "object", "object graph" ], - "time": "2017-04-12 18:52:22" + "time": "2017-04-12T18:52:22+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -3023,7 +3019,7 @@ "reflection", "static analysis" ], - "time": "2015-12-27 11:43:31" + "time": "2015-12-27T11:43:31+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -3068,7 +3064,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30 07:12:33" + "time": "2016-09-30T07:12:33+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -3115,7 +3111,7 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-11-25 06:54:22" + "time": "2016-11-25T06:54:22+00:00" }, { "name": "phpspec/php-diff", @@ -3153,7 +3149,7 @@ } ], "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", - "time": "2016-04-07 12:29:16" + "time": "2016-04-07T12:29:16+00:00" }, { "name": "phpspec/prophecy", @@ -3216,7 +3212,7 @@ "spy", "stub" ], - "time": "2017-03-02 20:05:34" + "time": "2017-03-02T20:05:34+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3279,7 +3275,7 @@ "testing", "xunit" ], - "time": "2017-04-02 07:44:40" + "time": "2017-04-02T07:44:40+00:00" }, { "name": "phpunit/php-file-iterator", @@ -3326,7 +3322,7 @@ "filesystem", "iterator" ], - "time": "2016-10-03 07:40:28" + "time": "2016-10-03T07:40:28+00:00" }, { "name": "phpunit/php-text-template", @@ -3367,7 +3363,7 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", @@ -3416,7 +3412,7 @@ "keywords": [ "timer" ], - "time": "2017-02-26 11:10:40" + "time": "2017-02-26T11:10:40+00:00" }, { "name": "phpunit/php-token-stream", @@ -3465,7 +3461,7 @@ "keywords": [ "tokenizer" ], - "time": "2017-02-27 10:12:30" + "time": "2017-02-27T10:12:30+00:00" }, { "name": "phpunit/phpunit", @@ -3547,7 +3543,7 @@ "testing", "xunit" ], - "time": "2017-04-03 02:22:27" + "time": "2017-04-03T02:22:27+00:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -3606,7 +3602,7 @@ "mock", "xunit" ], - "time": "2016-12-08 20:27:08" + "time": "2016-12-08T20:27:08+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -3651,7 +3647,7 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04 06:30:41" + "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", @@ -3715,7 +3711,7 @@ "compare", "equality" ], - "time": "2017-01-29 09:50:25" + "time": "2017-01-29T09:50:25+00:00" }, { "name": "sebastian/diff", @@ -3767,7 +3763,7 @@ "keywords": [ "diff" ], - "time": "2015-12-08 07:14:41" + "time": "2015-12-08T07:14:41+00:00" }, { "name": "sebastian/environment", @@ -3817,7 +3813,7 @@ "environment", "hhvm" ], - "time": "2016-11-26 07:53:53" + "time": "2016-11-26T07:53:53+00:00" }, { "name": "sebastian/exporter", @@ -3884,7 +3880,7 @@ "export", "exporter" ], - "time": "2016-11-19 08:54:04" + "time": "2016-11-19T08:54:04+00:00" }, { "name": "sebastian/global-state", @@ -3935,7 +3931,7 @@ "keywords": [ "global state" ], - "time": "2015-10-12 03:26:01" + "time": "2015-10-12T03:26:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -3981,7 +3977,7 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-02-18 15:18:39" + "time": "2017-02-18T15:18:39+00:00" }, { "name": "sebastian/recursion-context", @@ -4034,7 +4030,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-11-19 07:33:16" + "time": "2016-11-19T07:33:16+00:00" }, { "name": "sebastian/resource-operations", @@ -4076,7 +4072,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28 20:34:47" + "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", @@ -4119,7 +4115,7 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03 07:35:21" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "stecman/symfony-console-completion", @@ -4164,20 +4160,20 @@ } ], "description": "Automatic BASH completion for Symfony Console Component based applications.", - "time": "2016-02-24 05:08:54" + "time": "2016-02-24T05:08:54+00:00" }, { "name": "symfony/browser-kit", - "version": "v3.2.7", + "version": "v3.2.8", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "2fe0caa60c1a1dfeefd0425741182687a9b382b8" + "reference": "9fab1ab6f77b77f3df5fc5250fc6956811699b57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/2fe0caa60c1a1dfeefd0425741182687a9b382b8", - "reference": "2fe0caa60c1a1dfeefd0425741182687a9b382b8", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/9fab1ab6f77b77f3df5fc5250fc6956811699b57", + "reference": "9fab1ab6f77b77f3df5fc5250fc6956811699b57", "shasum": "" }, "require": { @@ -4221,20 +4217,20 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2017-02-21 09:12:04" + "time": "2017-04-12T14:13:17+00:00" }, { "name": "symfony/console", - "version": "v3.2.7", + "version": "v3.2.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c30243cc51f726812be3551316b109a2f5deaf8d" + "reference": "a7a17e0c6c3c4d70a211f80782e4b90ddadeaa38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c30243cc51f726812be3551316b109a2f5deaf8d", - "reference": "c30243cc51f726812be3551316b109a2f5deaf8d", + "url": "https://api.github.com/repos/symfony/console/zipball/a7a17e0c6c3c4d70a211f80782e4b90ddadeaa38", + "reference": "a7a17e0c6c3c4d70a211f80782e4b90ddadeaa38", "shasum": "" }, "require": { @@ -4284,20 +4280,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-04-04 14:33:42" + "time": "2017-04-26T01:39:17+00:00" }, { "name": "symfony/css-selector", - "version": "v3.2.7", + "version": "v3.2.8", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c" + "reference": "02983c144038e697c959e6b06ef6666de759ccbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/a48f13dc83c168f1253a5d2a5a4fb46c36244c4c", - "reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/02983c144038e697c959e6b06ef6666de759ccbc", + "reference": "02983c144038e697c959e6b06ef6666de759ccbc", "shasum": "" }, "require": { @@ -4337,20 +4333,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2017-02-21 09:12:04" + "time": "2017-05-01T14:55:58+00:00" }, { "name": "symfony/debug", - "version": "v3.2.7", + "version": "v3.2.8", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "56f613406446a4a0a031475cfd0a01751de22659" + "reference": "fd6eeee656a5a7b384d56f1072243fe1c0e81686" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/56f613406446a4a0a031475cfd0a01751de22659", - "reference": "56f613406446a4a0a031475cfd0a01751de22659", + "url": "https://api.github.com/repos/symfony/debug/zipball/fd6eeee656a5a7b384d56f1072243fe1c0e81686", + "reference": "fd6eeee656a5a7b384d56f1072243fe1c0e81686", "shasum": "" }, "require": { @@ -4394,20 +4390,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-03-28 21:38:24" + "time": "2017-04-19T20:17:50+00:00" }, { "name": "symfony/dom-crawler", - "version": "v3.2.7", + "version": "v3.2.8", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "403944e294cf4ceb3b8447f54cbad88ea7b99cee" + "reference": "f1ad34e8af09ed17570e027cf0c58a12eddec286" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/403944e294cf4ceb3b8447f54cbad88ea7b99cee", - "reference": "403944e294cf4ceb3b8447f54cbad88ea7b99cee", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/f1ad34e8af09ed17570e027cf0c58a12eddec286", + "reference": "f1ad34e8af09ed17570e027cf0c58a12eddec286", "shasum": "" }, "require": { @@ -4450,20 +4446,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2017-02-21 09:12:04" + "time": "2017-04-12T14:13:17+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.2.7", + "version": "v3.2.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "154bb1ef7b0e42ccc792bd53edbce18ed73440ca" + "reference": "b8a401f733b43251e1d088c589368b2a94155e40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/154bb1ef7b0e42ccc792bd53edbce18ed73440ca", - "reference": "154bb1ef7b0e42ccc792bd53edbce18ed73440ca", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b8a401f733b43251e1d088c589368b2a94155e40", + "reference": "b8a401f733b43251e1d088c589368b2a94155e40", "shasum": "" }, "require": { @@ -4510,20 +4506,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-04-04 07:26:27" + "time": "2017-05-01T14:58:48+00:00" }, { "name": "symfony/finder", - "version": "v3.2.7", + "version": "v3.2.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "b20900ce5ea164cd9314af52725b0bb5a758217a" + "reference": "9cf076f8f492f4b1ffac40aae9c2d287b4ca6930" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/b20900ce5ea164cd9314af52725b0bb5a758217a", - "reference": "b20900ce5ea164cd9314af52725b0bb5a758217a", + "url": "https://api.github.com/repos/symfony/finder/zipball/9cf076f8f492f4b1ffac40aae9c2d287b4ca6930", + "reference": "9cf076f8f492f4b1ffac40aae9c2d287b4ca6930", "shasum": "" }, "require": { @@ -4559,7 +4555,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-03-20 09:32:19" + "time": "2017-04-12T14:13:17+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -4618,20 +4614,20 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/yaml", - "version": "v3.2.7", + "version": "v3.2.8", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621" + "reference": "acec26fcf7f3031e094e910b94b002fa53d4e4d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/62b4cdb99d52cb1ff253c465eb1532a80cebb621", - "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621", + "url": "https://api.github.com/repos/symfony/yaml/zipball/acec26fcf7f3031e094e910b94b002fa53d4e4d6", + "reference": "acec26fcf7f3031e094e910b94b002fa53d4e4d6", "shasum": "" }, "require": { @@ -4673,7 +4669,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-03-20 09:45:15" + "time": "2017-05-01T14:55:58+00:00" }, { "name": "webmozart/assert", @@ -4723,7 +4719,7 @@ "check", "validate" ], - "time": "2016-11-23 20:04:58" + "time": "2016-11-23T20:04:58+00:00" }, { "name": "yiisoft/yii2-debug", @@ -4770,7 +4766,7 @@ "debugger", "yii2" ], - "time": "2017-02-21 10:30:50" + "time": "2017-02-21T10:30:50+00:00" }, { "name": "yiisoft/yii2-faker", @@ -4817,7 +4813,7 @@ "faker", "yii2" ], - "time": "2015-03-01 06:22:44" + "time": "2015-03-01T06:22:44+00:00" }, { "name": "yiisoft/yii2-gii", @@ -4870,7 +4866,7 @@ "gii", "yii2" ], - "time": "2016-03-18 14:09:46" + "time": "2016-03-18T14:09:46+00:00" } ], "aliases": [], diff --git a/frontend/controllers/CheckoutController.php b/frontend/controllers/CheckoutController.php index 6d921fc..860e8ef 100755 --- a/frontend/controllers/CheckoutController.php +++ b/frontend/controllers/CheckoutController.php @@ -3,6 +3,7 @@ namespace frontend\controllers; use artbox\catalog\models\Product; + use artbox\catalog\models\Variant; use artbox\order\models\Delivery; use artbox\order\models\OrderProduct; use artbox\order\models\Payment; @@ -91,10 +92,10 @@ return $this->redirect([ 'info' ]); } $deliveries = Delivery::find() - ->with('lang') - ->where([ 'status' => true ]) - ->orderBy([ 'sort' => SORT_ASC ]) - ->all(); + ->with('lang') + ->where([ 'status' => true ]) + ->orderBy([ 'sort' => SORT_ASC ]) + ->all(); return $this->render( 'delivery', [ @@ -123,10 +124,10 @@ return $this->redirect('confirm'); } else { $payments = Payment::find() - ->with('lang') - ->where([ 'status' => true ]) - ->orderBy([ 'sort' => SORT_ASC ]) - ->all(); + ->with('lang') + ->where([ 'status' => true ]) + ->orderBy([ 'sort' => SORT_ASC ]) + ->all(); return $this->render( 'payment', [ @@ -192,8 +193,6 @@ public function actionFast() { $this->enableCsrfValidation = false; - $response = \Yii::$app->response; - $response->format = $response::FORMAT_JSON; $model = new Order( [ 'scenario' => Order::SCENARIO_FAST, @@ -204,15 +203,33 @@ $model->delivery_id = 5; $model->payment_id = 3; if ($model->save()) { - return [ - 'success' => true, - 'msg' => \Yii::t( + /** + * @var Variant $variant + */ + $variant = Variant::find() + ->where([ 'id' => $model->variantId ]) + ->one(); + ( new OrderProduct( + [ + 'order_id' => $model->id, + 'variant_id' => $model->variantId, + 'sku' => $variant->sku, + 'price' => $variant->price, + 'count' => 1, + ] + ) )->save(false); + \Yii::$app->session->setFlash( + 'success', + \Yii::t( 'app', - 'Заказ успешно оформлен. Вашему заказу присвоен номер ' . $model->id . '.' - ), - ]; + 'Заказ успешно оформлен. Ваш номер заказ: ' . $model->id . '.' + ) + ); + return $this->redirect($model->returnUrl ? : [ 'site/index' ]); } } + $response = \Yii::$app->response; + $response->format = $response::FORMAT_JSON; return $model->getErrors(); } diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index fecc6f3..1c93637 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -185,15 +185,22 @@ if (empty(Yii::$app->request->post())) { throw new BadRequestHttpException(); } else { - $model = new Feedback(); + $model = new Feedback( + [ + 'scenario' => Feedback::SCENARIO_CALLBACK, + ] + ); if ($model->load(Yii::$app->request->post()) && $model->save()) { return [ 'success' => true, - 'message' => 'Success message', + 'message' => \Yii::t('app', 'Заявка успешно отправлена'), 'alert' => '
-

Success

+

' . \Yii::t('app', 'Заявка успешно отправлена') . '

- Success text + ' . \Yii::t( + 'app', + 'Спасибо, Ваша заявка успешно отправлена. Наши менеджеры свяжутся с Вами в ближайшее время' + ) . 'Success text

', ]; diff --git a/frontend/models/Order.php b/frontend/models/Order.php index 1af6082..6d00822 100644 --- a/frontend/models/Order.php +++ b/frontend/models/Order.php @@ -10,6 +10,7 @@ class Order extends \artbox\order\models\Order { public $variantId; + public $returnUrl; const SCENARIO_INFO = 'info'; const SCENARIO_DELIVERY = 'delivery'; @@ -43,6 +44,7 @@ 'name', 'phone', 'variantId', + 'returnUrl', ], ] ); @@ -89,6 +91,7 @@ [ [ 'comment', + 'returnUrl', ], 'string', ], diff --git a/frontend/views/category/view.php b/frontend/views/category/view.php index 2cf4d51..77c8c11 100755 --- a/frontend/views/category/view.php +++ b/frontend/views/category/view.php @@ -117,7 +117,7 @@ _________________________________________________________ --> 'category' => $model->lang->alias->value, ], [ - 'class' => 'btn btn-xs btn-danger', + 'class' => 'btn btn-xs btn-danger reset-filters', ] ); } @@ -127,10 +127,6 @@ _________________________________________________________ --> $brands = $filterHelper->getBrands($model); if (!empty($brands)) { ?> - - - -

diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index 5749a15..d37fde6 100755 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -392,7 +392,7 @@ _________________________________________________________ --> ->checkbox(); ?>
- is('top')) { ?> -
-
TOP
-
-
- +
+
TOP
+
+
+ @@ -392,6 +392,7 @@ [ 'scenario' => Order::SCENARIO_FAST, 'variantId' => $variant->id, + 'returnUrl' => \Yii::$app->request->absoluteUrl, ] ); $form = ActiveForm::begin( @@ -403,6 +404,9 @@ echo $form->field($order, 'variantId') ->label(false) ->hiddenInput(); + echo $form->field($order, 'returnUrl') + ->label(false) + ->hiddenInput(); echo $form->field($order, 'name') ->label(false) ->textInput( -- libgit2 0.21.4