-
Notifications
You must be signed in to change notification settings - Fork 4
/
m2-one-step-checkout-v2.4.5-v2.5.0-patch.sh
3936 lines (3772 loc) · 153 KB
/
m2-one-step-checkout-v2.4.5-v2.5.0-patch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff --git a/Api/CheckoutManagementInterface.php b/Api/CheckoutManagementInterface.php
index 61bec82..55100a3 100644
--- a/Api/CheckoutManagementInterface.php
+++ b/Api/CheckoutManagementInterface.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Api/Data/OscDetailsInterface.php b/Api/Data/OscDetailsInterface.php
index 8f2d83d..fe45c9b 100644
--- a/Api/Data/OscDetailsInterface.php
+++ b/Api/Data/OscDetailsInterface.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Api/GuestCheckoutManagementInterface.php b/Api/GuestCheckoutManagementInterface.php
index 7e11059..1083b38 100644
--- a/Api/GuestCheckoutManagementInterface.php
+++ b/Api/GuestCheckoutManagementInterface.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Block/Adminhtml/Config/Backend/StaticBlock.php b/Block/Adminhtml/Config/Backend/StaticBlock.php
deleted file mode 100644
index 7c7395e..0000000
--- a/Block/Adminhtml/Config/Backend/StaticBlock.php
+++ /dev/null
@@ -1,124 +0,0 @@
-<?php
-/**
- * Mageplaza
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Mageplaza.com license that is
- * available through the world-wide-web at this URL:
- * https://www.mageplaza.com/LICENSE.txt
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade this extension to newer
- * version in the future.
- *
- * @category Mageplaza
- * @package Mageplaza_AbandonedCart
- * @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
- * @license https://www.mageplaza.com/LICENSE.txt
- */
-
-namespace Mageplaza\Osc\Block\Adminhtml\Config\Backend;
-
-use Magento\Backend\Block\Template\Context;
-use Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray;
-use Magento\Framework\Data\Form\Element\Factory;
-
-/**
- * Class StaticBlock
- * @package Mageplaza\AbandonedCart\Block\Adminhtml\Config\Backend
- */
-class StaticBlock extends AbstractFieldArray
-{
- /**
- * @var \Magento\Framework\Data\Form\Element\Factory
- */
- protected $elementFactory;
-
- /**
- * @var \Mageplaza\Osc\Model\System\Config\Source\StaticBlockPosition
- */
- protected $blockPosition;
-
- /**
- * @var \Magento\Cms\Model\ResourceModel\Block\CollectionFactory
- */
- protected $blockFactory;
-
- /**
- * StaticBlock constructor.
- * @param Context $context
- * @param Factory $elementFactory
- * @param \Mageplaza\Osc\Model\System\Config\Source\StaticBlockPosition $blockPosition
- * @param \Magento\Cms\Model\ResourceModel\Block\CollectionFactory $blockFactory
- * @param array $data
- */
- public function __construct(
- Context $context,
- Factory $elementFactory,
- \Mageplaza\Osc\Model\System\Config\Source\StaticBlockPosition $blockPosition,
- \Magento\Cms\Model\ResourceModel\Block\CollectionFactory $blockFactory,
- array $data = []
- )
- {
- $this->elementFactory = $elementFactory;
- $this->blockPosition = $blockPosition;
- $this->blockFactory = $blockFactory;
-
- parent::__construct($context, $data);
- }
-
- /**
- * Initialise form fields
- *
- * @return void
- */
- public function _construct()
- {
- $this->addColumn('block', ['label' => __('Block')]);
- $this->addColumn('position', ['label' => __('Position')]);
- $this->addColumn('sort_order', ['label' => __('Sort Order'), 'style' => 'width: 100px']);
-
- $this->_addAfter = false;
- $this->_addButtonLabel = __('More');
-
- parent::_construct();
- }
-
- /**
- * Render array cell for prototypeJS template
- *
- * @param string $columnName
- * @return mixed|string
- * @throws \Exception
- */
- public function renderCellTemplate($columnName)
- {
- if (!empty($this->_columns[$columnName])) {
- switch ($columnName) {
- case 'block':
- $options = $this->blockFactory->create()->toOptionArray();
- break;
- case 'position':
- $options = $this->blockPosition->toOptionArray();
- break;
- default:
- $options = '';
- break;
- }
- if ($options) {
- $element = $this->elementFactory->create('select');
- $element->setForm($this->getForm())
- ->setName($this->_getCellInputElementName($columnName))
- ->setHtmlId($this->_getCellInputElementId('<%- _id %>', $columnName))
- ->setValues($options)
- ->setStyle('width: 200px');
-
- return str_replace("\n", '', $element->getElementHtml());
- }
- }
-
- return parent::renderCellTemplate($columnName);
- }
-}
diff --git a/Block/Adminhtml/Field/Position.php b/Block/Adminhtml/Field/Position.php
index 3ccd3bf..4dca4e1 100644
--- a/Block/Adminhtml/Field/Position.php
+++ b/Block/Adminhtml/Field/Position.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Block/Adminhtml/Plugin/OrderViewTabInfo.php b/Block/Adminhtml/Plugin/OrderViewTabInfo.php
index ce8e1ac..2953837 100644
--- a/Block/Adminhtml/Plugin/OrderViewTabInfo.php
+++ b/Block/Adminhtml/Plugin/OrderViewTabInfo.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Block/Adminhtml/System/Config/Geoip.php b/Block/Adminhtml/System/Config/Geoip.php
index ada90e4..e2e8954 100644
--- a/Block/Adminhtml/System/Config/Geoip.php
+++ b/Block/Adminhtml/System/Config/Geoip.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Block/Checkout/CompatibleConfig.php b/Block/Checkout/CompatibleConfig.php
index 64f3e94..b34fb6f 100644
--- a/Block/Checkout/CompatibleConfig.php
+++ b/Block/Checkout/CompatibleConfig.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Block/Checkout/LayoutProcessor.php b/Block/Checkout/LayoutProcessor.php
index 0c96989..6aeaede 100644
--- a/Block/Checkout/LayoutProcessor.php
+++ b/Block/Checkout/LayoutProcessor.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
@@ -203,14 +203,12 @@ class LayoutProcessor implements LayoutProcessorInterface
$addressElements[$attribute->getAttributeCode()] = $this->attributeMapper->map($attribute);
}
- if (sizeof($addressElements)) {
- $fields = $this->merger->merge(
- $addressElements,
- 'checkoutProvider',
- $type . '.custom_attributes',
- $fields
- );
- }
+ $fields = $this->merger->merge(
+ $addressElements,
+ 'checkoutProvider',
+ $type . '.custom_attributes',
+ $fields
+ );
foreach ($fields as $code => &$field) {
if(isset($field['label'])) {
@@ -229,14 +227,6 @@ class LayoutProcessor implements LayoutProcessorInterface
{
$fieldPosition = $this->_oscHelper->getAddressHelper()->getAddressFieldPosition();
- $oscField = [];
- $allFieldSection = $this->_oscHelper->getAddressHelper()->getSortedField(false);
- foreach ($allFieldSection as $allfield) {
- foreach ($allfield as $field) {
- $oscField[] = $field->getAttributeCode();
- }
- }
-
$this->rewriteFieldStreet($fields);
foreach ($fields as $code => &$field) {
@@ -245,13 +235,13 @@ class LayoutProcessor implements LayoutProcessorInterface
if (in_array($code, ['country_id'])) {
$field['config']['additionalClasses'] = "mp-hidden";
continue;
- } else if (in_array($code, $oscField)) {
+ } else {
unset($fields[$code]);
}
} else {
$oriClasses = isset($field['config']['additionalClasses']) ? $field['config']['additionalClasses'] : '';
$field['config']['additionalClasses'] = "{$oriClasses} col-mp mp-{$fieldConfig['colspan']}" . ($fieldConfig['isNewRow'] ? ' mp-clear' : '');
- $field['sortOrder'] = (isset($field['sortOrder']) && !in_array($code, $oscField)) ? $field['sortOrder'] : $fieldConfig['sortOrder'];
+ $field['sortOrder'] = $fieldConfig['sortOrder'];
if ($code == 'dob') {
$field['options'] = ['yearRange' => '-120y:c+nn', 'maxDate' => '-1d', 'changeMonth' => true, 'changeYear' => true];
}
diff --git a/Block/Container.php b/Block/Container.php
index fd74058..46719fd 100644
--- a/Block/Container.php
+++ b/Block/Container.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Block/Design.php b/Block/Design.php
index 4def4fd..f873dd6 100644
--- a/Block/Design.php
+++ b/Block/Design.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Block/Order/Totals.php b/Block/Order/Totals.php
index 518d21e..5e084e0 100644
--- a/Block/Order/Totals.php
+++ b/Block/Order/Totals.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Block/Order/View/Comment.php b/Block/Order/View/Comment.php
index 80fa715..3bb302e 100644
--- a/Block/Order/View/Comment.php
+++ b/Block/Order/View/Comment.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Block/Order/View/DeliveryTime.php b/Block/Order/View/DeliveryTime.php
index 847ffb5..677dbbb 100644
--- a/Block/Order/View/DeliveryTime.php
+++ b/Block/Order/View/DeliveryTime.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Block/Order/View/Survey.php b/Block/Order/View/Survey.php
index adb29a9..ef86a94 100644
--- a/Block/Order/View/Survey.php
+++ b/Block/Order/View/Survey.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Block/Plugin/Link.php b/Block/Plugin/Link.php
index 483a71d..0556c3a 100644
--- a/Block/Plugin/Link.php
+++ b/Block/Plugin/Link.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Block/StaticBlock.php b/Block/StaticBlock.php
deleted file mode 100644
index 40647c3..0000000
--- a/Block/StaticBlock.php
+++ /dev/null
@@ -1,104 +0,0 @@
-<?php
-/**
- * Mageplaza
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Mageplaza.com license that is
- * available through the world-wide-web at this URL:
- * https://www.mageplaza.com/LICENSE.txt
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade this extension to newer
- * version in the future.
- *
- * @category Mageplaza
- * @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
- * @license https://www.mageplaza.com/LICENSE.txt
- */
-
-namespace Mageplaza\Osc\Block;
-
-use Magento\Checkout\Model\Session as CheckoutSession;
-use Magento\Framework\View\Element\Template;
-use Magento\Framework\View\Element\Template\Context;
-use Mageplaza\Osc\Helper\Data as OscHelper;
-use Mageplaza\Osc\Model\System\Config\Source\StaticBlockPosition;
-use Magento\Cms\Api\BlockRepositoryInterface;
-
-/**
- * Class StaticBlock
- * @package Mageplaza\Osc\Block
- */
-class StaticBlock extends Template
-{
- /**
- * @var OscHelper
- */
- protected $_oscHelper;
-
- /**
- * @type CheckoutSession
- */
- private $checkoutSession;
-
- /**
- * @var BlockRepositoryInterface
- */
- protected $blockRepository;
-
- /**
- * StaticBlock constructor.
- * @param Context $context
- * @param OscHelper $oscHelper
- * @param CheckoutSession $checkoutSession
- * @param BlockRepositoryInterface $blockRepository
- * @param array $data
- */
- public function __construct(
- Context $context,
- OscHelper $oscHelper,
- CheckoutSession $checkoutSession,
- BlockRepositoryInterface $blockRepository,
- array $data = []
- )
- {
- parent::__construct($context, $data);
-
- $this->_oscHelper = $oscHelper;
- $this->checkoutSession = $checkoutSession;
- $this->blockRepository = $blockRepository;
- }
-
- /**
- * @return array
- * @throws \Magento\Framework\Exception\LocalizedException
- * @throws \Zend_Serializer_Exception
- */
- public function getStaticBlock()
- {
- $result = [];
-
- $config = $this->_oscHelper->isEnableStaticBlock() ? $this->_oscHelper->getStaticBlockList() : [];
- foreach ($config as $key => $row) {
- /** @var \Magento\Cms\Block\Block $block */
- $block = $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId($row['block'])->toHtml();
- if (($row['position'] == StaticBlockPosition::SHOW_IN_SUCCESS_PAGE && $this->getNameInLayout() == 'osc.static-block.success')
- || ($row['position'] == StaticBlockPosition::SHOW_AT_TOP_CHECKOUT_PAGE && $this->getNameInLayout() == 'osc.static-block.top')
- || ($row['position'] == StaticBlockPosition::SHOW_AT_BOTTOM_CHECKOUT_PAGE && $this->getNameInLayout() == 'osc.static-block.bottom')) {
- $result[] = [
- 'content' => $block,
- 'sortOrder' => $row['sort_order']
- ];
- }
- }
-
- usort($result, function ($a, $b) {
- return ($a['sortOrder'] <= $b['sortOrder']) ? -1 : 1;
- });
-
- return $result;
- }
-}
diff --git a/Block/Survey.php b/Block/Survey.php
index d3b5f5a..36f6cdd 100644
--- a/Block/Survey.php
+++ b/Block/Survey.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Controller/Add/Index.php b/Controller/Add/Index.php
index fe7036b..ebf6622 100644
--- a/Controller/Add/Index.php
+++ b/Controller/Add/Index.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Controller/Adminhtml/Field/Position.php b/Controller/Adminhtml/Field/Position.php
index d87ad89..f733dba 100644
--- a/Controller/Adminhtml/Field/Position.php
+++ b/Controller/Adminhtml/Field/Position.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Controller/Adminhtml/Field/Save.php b/Controller/Adminhtml/Field/Save.php
index 0bba444..cebba66 100644
--- a/Controller/Adminhtml/Field/Save.php
+++ b/Controller/Adminhtml/Field/Save.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Controller/Adminhtml/System/Config/Geoip.php b/Controller/Adminhtml/System/Config/Geoip.php
index 24fb72c..4248886 100644
--- a/Controller/Adminhtml/System/Config/Geoip.php
+++ b/Controller/Adminhtml/System/Config/Geoip.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Controller/Index/Index.php b/Controller/Index/Index.php
index d5dcfb3..6bfb8cc 100644
--- a/Controller/Index/Index.php
+++ b/Controller/Index/Index.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Controller/Survey/Save.php b/Controller/Survey/Save.php
index bfb4e7d..c9d448f 100644
--- a/Controller/Survey/Save.php
+++ b/Controller/Survey/Save.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Helper/Address.php b/Helper/Address.php
index 76ae393..542c13f 100644
--- a/Helper/Address.php
+++ b/Helper/Address.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Helper/Data.php b/Helper/Data.php
index 5399196..921f35e 100644
--- a/Helper/Data.php
+++ b/Helper/Data.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
@@ -38,9 +38,6 @@ class Data extends AbstractData
/** Design configuration path */
const CONFIG_PATH_DESIGN = 'design_configuration';
- /** CMS Static Block configuration path */
- const CONFIG_PATH_BLOCK = 'block_configuration';
-
/** Geo configuration path */
const CONFIG_PATH_GEOIP = 'geoip_configuration';
@@ -300,17 +297,6 @@ class Data extends AbstractData
}
/**
- * Item list toggle will be shown if this function return 'true'
- *
- * @param null $store
- * @return bool
- */
- public function isShowItemListToggle($store = null)
- {
- return !!$this->getDisplayConfig('is_show_item_list_toggle', $store);
- }
-
- /**
* Product image will be hided if this function return 'true'
*
* @param null $store
@@ -621,38 +607,6 @@ class Data extends AbstractData
return $this->getDesignConfig('page_design') == 'material' ? true : false;
}
- /***************************** CMS Static Block Configuration *****************************
- *
- * @param string $code
- * @param null $store
- * @return mixed
- */
- public function getStaticBlockConfig($code = '', $store = null)
- {
- $code = $code ? self::CONFIG_PATH_BLOCK . '/' . $code : self::CONFIG_PATH_BLOCK;
-
- return $this->getModuleConfig($code, $store);
- }
-
- /**
- * @param null $store
- * @return bool
- */
- public function isEnableStaticBlock($store = null)
- {
- return !!$this->getStaticBlockConfig('is_enabled_block', $store);
- }
-
- /**
- * @param null $stores
- * @return mixed
- * @throws \Zend_Serializer_Exception
- */
- public function getStaticBlockList($stores = null)
- {
- return $this->unserialize($this->getStaticBlockConfig('list', $stores));
- }
-
/***************************** GeoIP Configuration *****************************
*
* @param null $store
diff --git a/LICENSE b/LICENSE
index 87b119f..dec3ab0 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright © 2016-present Mageplaza Co. Ltd.
+Mageplaza Co. Ltd.
This License is entered by Mageplaza to govern the usage or redistribution of Mageplaza software. This is a legal agreement between you (either an individual or a single entity) and Mageplaza for Mageplaza software product(s) which may include extensions, templates and services.
@@ -30,4 +30,4 @@ The Agreement becomes effective at the moment when you acquire software from our
6. LIMITATION OF LIABILITY: In no event shall Mageplaza be liable for any damages (including, without limitation, lost profits, business interruption, or lost information) rising out of ‘Authorized Users’ use of or inability to use the Mageplaza products, even if Mageplaza has been advised of the possibility of such damages. In no event will Mageplaza be liable for prosecution arising from use of the Software against law or for any illegal use.
-The latest License: https://www.mageplaza.com/LICENSE.txt
\ No newline at end of file
+The latest License : https://www.mageplaza.com/LICENSE.txt
\ No newline at end of file
diff --git a/Model/AgreementsValidator.php b/Model/AgreementsValidator.php
index d58cb74..44294cf 100644
--- a/Model/AgreementsValidator.php
+++ b/Model/AgreementsValidator.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Model/CheckoutManagement.php b/Model/CheckoutManagement.php
index e9da7d1..df70a5c 100644
--- a/Model/CheckoutManagement.php
+++ b/Model/CheckoutManagement.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Model/CheckoutRegister.php b/Model/CheckoutRegister.php
index a42bb1e..f2330f7 100644
--- a/Model/CheckoutRegister.php
+++ b/Model/CheckoutRegister.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Model/DefaultConfigProvider.php b/Model/DefaultConfigProvider.php
index f377bbd..b9345bd 100644
--- a/Model/DefaultConfigProvider.php
+++ b/Model/DefaultConfigProvider.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
@@ -32,7 +32,6 @@ use Magento\Quote\Api\PaymentMethodManagementInterface;
use Magento\Quote\Api\ShippingMethodManagementInterface;
use Magento\Quote\Model\Quote\Item;
use Mageplaza\Osc\Helper\Data as OscHelper;
-use Magento\Cms\Block\Block;
/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -81,11 +80,6 @@ class DefaultConfigProvider implements ConfigProviderInterface
protected $stockRegistry;
/**
- * @var Block
- */
- protected $cmsBlock;
-
- /**
* DefaultConfigProvider constructor.
* @param CheckoutSession $checkoutSession
* @param PaymentMethodManagementInterface $paymentMethodManagement
@@ -95,7 +89,6 @@ class DefaultConfigProvider implements ConfigProviderInterface
* @param StockRegistryInterface $stockRegistry
* @param ModuleManager $moduleManager
* @param OscHelper $oscHelper
- * @param Block $cmsBlock
*/
public function __construct(
CheckoutSession $checkoutSession,
@@ -105,8 +98,7 @@ class DefaultConfigProvider implements ConfigProviderInterface
QuoteItemRepository $quoteItemRepository,
StockRegistryInterface $stockRegistry,
ModuleManager $moduleManager,
- OscHelper $oscHelper,
- Block $cmsBlock
+ OscHelper $oscHelper
)
{
$this->checkoutSession = $checkoutSession;
@@ -117,7 +109,6 @@ class DefaultConfigProvider implements ConfigProviderInterface
$this->stockRegistry = $stockRegistry;
$this->moduleManager = $moduleManager;
$this->_oscHelper = $oscHelper;
- $this->cmsBlock = $cmsBlock;
}
/**
@@ -143,8 +134,6 @@ class DefaultConfigProvider implements ConfigProviderInterface
/**
* @return array
- * @throws \Magento\Framework\Exception\LocalizedException
- * @throws \Zend_Serializer_Exception
*/
private function getOscConfig()
{
@@ -181,43 +170,11 @@ class DefaultConfigProvider implements ConfigProviderInterface
'isEnableModulePostNL' => $this->_oscHelper->isEnableModulePostNL(),
],
'show_toc' => $this->_oscHelper->getShowTOC(),
- 'qtyIncrements' => $this->getItemQtyIncrement(),
- 'staticBlock' => $this->getStaticBlock(),
- 'isShowItemListToggle' => $this->_oscHelper->isShowItemListToggle()
+ 'qtyIncrements' => $this->getItemQtyIncrement()
];
}
/**
- * Return array of static blocks
- *
- * @return array
- * @throws \Magento\Framework\Exception\LocalizedException
- * @throws \Zend_Serializer_Exception
- */
- public function getStaticBlock()
- {
- $result = [];
-
- $config = $this->_oscHelper->isEnableStaticBlock() ? $this->_oscHelper->getStaticBlockList() : [];
- foreach ($config as $key => $row) {
- /** @var \Magento\Cms\Block\Block $block */
- $block = $this->cmsBlock->setBlockId($row['block'])->toHtml();
- if ($row['position'] == \Mageplaza\Osc\Model\System\Config\Source\StaticBlockPosition::SHOW_UNDER_CHECKOUT_BUTTON) {
- $result[] = [
- 'content' => $block,
- 'sortOrder' => $row['sort_order']
- ];
- }
- }
-
- usort($result, function ($a, $b) {
- return ($a['sortOrder'] <= $b['sortOrder']) ? -1 : 1;
- });
-
- return $result;
- }
-
- /**
* Returns array of payment methods
*
* @return array
diff --git a/Model/GuestCheckoutManagement.php b/Model/GuestCheckoutManagement.php
index 1fc0cbf..aade427 100644
--- a/Model/GuestCheckoutManagement.php
+++ b/Model/GuestCheckoutManagement.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Model/OscDetails.php b/Model/OscDetails.php
index 4653c0f..4becddb 100644
--- a/Model/OscDetails.php
+++ b/Model/OscDetails.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Model/Plugin/Authorization/UserContext.php b/Model/Plugin/Authorization/UserContext.php
index c487c2a..2d53a2c 100644
--- a/Model/Plugin/Authorization/UserContext.php
+++ b/Model/Plugin/Authorization/UserContext.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Model/Plugin/Checkout/ShippingMethodManagement.php b/Model/Plugin/Checkout/ShippingMethodManagement.php
index 75d89d9..fd778df 100644
--- a/Model/Plugin/Checkout/ShippingMethodManagement.php
+++ b/Model/Plugin/Checkout/ShippingMethodManagement.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Model/Plugin/Customer/AccountManagement.php b/Model/Plugin/Customer/AccountManagement.php
index 5775527..1656828 100644
--- a/Model/Plugin/Customer/AccountManagement.php
+++ b/Model/Plugin/Customer/AccountManagement.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Model/Plugin/Customer/Address.php b/Model/Plugin/Customer/Address.php
index c894748..5f632ef 100644
--- a/Model/Plugin/Customer/Address.php
+++ b/Model/Plugin/Customer/Address.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Model/Plugin/Eav/Model/Validator/Attribute/Data.php b/Model/Plugin/Eav/Model/Validator/Attribute/Data.php
index e6adc42..a637712 100644
--- a/Model/Plugin/Eav/Model/Validator/Attribute/Data.php
+++ b/Model/Plugin/Eav/Model/Validator/Attribute/Data.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Model/Plugin/Paypal/Model/Express.php b/Model/Plugin/Paypal/Model/Express.php
index fd48443..3e5930e 100644
--- a/Model/Plugin/Paypal/Model/Express.php
+++ b/Model/Plugin/Paypal/Model/Express.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Model/Plugin/Quote/GiftWrap.php b/Model/Plugin/Quote/GiftWrap.php
index 72da5fd..10fbeef 100644
--- a/Model/Plugin/Quote/GiftWrap.php
+++ b/Model/Plugin/Quote/GiftWrap.php
@@ -15,7 +15,7 @@
*
* @category Mageplaza
* @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
+ * @copyright Copyright (c) 2017-2018 Mageplaza (http://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
diff --git a/Model/Plugin/Quote/Processor.php b/Model/Plugin/Quote/Processor.php
deleted file mode 100644
index 96ec0d1..0000000
--- a/Model/Plugin/Quote/Processor.php
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-/**
- * Mageplaza
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Mageplaza.com license that is
- * available through the world-wide-web at this URL:
- * https://www.mageplaza.com/LICENSE.txt
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade this extension to newer
- * version in the future.
- *
- * @category Mageplaza
- * @package Mageplaza_Osc
- * @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
- * @license https://www.mageplaza.com/LICENSE.txt
- */
-
-namespace Mageplaza\Osc\Model\Plugin\Quote;
-
-use \Magento\Catalog\Model\Product;
-use Magento\Quote\Model\Quote\ItemFactory;
-use Magento\Quote\Model\Quote\Item;
-use Magento\Framework\DataObject;
-use Magento\Quote\Api\Data\CartItemInterface;
-
-/**
- * Class Address
- * @package Mageplaza\Osc\Model\Plugin\Customer
- */
-class Processor
-{
- /**