Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #2440 Массовое редактирование свойств товаров
- Loading branch information
Showing
8 changed files
with
551 additions
and
31 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
55 changes: 55 additions & 0 deletions
55
protected/modules/store/components/helpers/ProductBatchHelper.php
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 | ||
|
||
/** | ||
* Class ProductBatchHelper | ||
*/ | ||
class ProductBatchHelper | ||
{ | ||
/** | ||
* | ||
*/ | ||
const PRICE_EQUAL = 0; | ||
|
||
/** | ||
* | ||
*/ | ||
const PRICE_ADD = 1; | ||
|
||
/** | ||
* | ||
*/ | ||
const PRICE_SUB = 2; | ||
|
||
/** | ||
* | ||
*/ | ||
const OP_UNIT = 0; | ||
|
||
/** | ||
* | ||
*/ | ||
const OP_PERCENT = 1; | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public static function getPericeOpList() | ||
{ | ||
return [ | ||
self::PRICE_EQUAL => Yii::t('StoreModule.store', 'equal'), | ||
self::PRICE_ADD => Yii::t('StoreModule.store', 'increase'), | ||
self::PRICE_SUB => Yii::t('StoreModule.store', 'decrease'), | ||
]; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public static function getOpUnits() | ||
{ | ||
return [ | ||
self::OP_UNIT => Yii::t('StoreModule.store', 'unit'), | ||
self::OP_PERCENT => Yii::t('StoreModule.store', '%'), | ||
]; | ||
} | ||
} |
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
Oops, something went wrong.