-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from Paazl/release/1.16.0
Release/1.16.0
- Loading branch information
Showing
13 changed files
with
473 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
/** | ||
* Copyright © Paazl. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Paazl\CheckoutWidget\Model\System\Config\Source; | ||
|
||
use Magento\Framework\Data\OptionSourceInterface; | ||
|
||
/** | ||
* Class CalculateVolume | ||
*/ | ||
class CalculateVolume implements OptionSourceInterface | ||
{ | ||
|
||
public const CALCULATE_VOLUME_NO = 0; | ||
public const CALCULATE_VOLUME_USE_ATTRIBUTE = 1; | ||
public const CALCULATE_VOLUME_CALCULATE = 2; | ||
public const CALCULATE_VOLUME_CALCULATE_IF_MISSED = 3; | ||
|
||
/** | ||
* @var array | ||
*/ | ||
public $options; | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function toOptionArray() | ||
{ | ||
if (!$this->options) { | ||
$this->options = [ | ||
[ | ||
'value' => self::CALCULATE_VOLUME_NO, | ||
'label' => __('No') | ||
], | ||
[ | ||
'value' => self::CALCULATE_VOLUME_USE_ATTRIBUTE, | ||
'label' => __('Yes, use volume attribute') | ||
], | ||
[ | ||
'value' => self::CALCULATE_VOLUME_CALCULATE, | ||
'label' => __('Yes, always calculate using dimensions') | ||
], | ||
[ | ||
'value' => self::CALCULATE_VOLUME_CALCULATE_IF_MISSED, | ||
'label' => __('Yes, calculate using dimensions if volume missed') | ||
] | ||
]; | ||
} | ||
|
||
return $this->options; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
/** | ||
* Copyright © Paazl. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Paazl\CheckoutWidget\Model\System\Config\Source; | ||
|
||
use Magento\Framework\Data\OptionSourceInterface; | ||
|
||
/** | ||
* Class DimensionsMetric | ||
*/ | ||
class DimensionsMetric implements OptionSourceInterface | ||
{ | ||
|
||
public const METRIC_MM = 'mm'; | ||
public const METRIC_CM = 'cm'; | ||
public const METRIC_M = 'm'; | ||
|
||
/** | ||
* @var array | ||
*/ | ||
public $options; | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function toOptionArray() | ||
{ | ||
if (!$this->options) { | ||
$this->options = [ | ||
[ | ||
'value' => self::METRIC_MM, | ||
'label' => __('mm') | ||
], | ||
[ | ||
'value' => self::METRIC_CM, | ||
'label' => __('cm') | ||
], | ||
[ | ||
'value' => self::METRIC_M, | ||
'label' => __('m') | ||
] | ||
]; | ||
} | ||
|
||
return $this->options; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.