add translations for sell product

This commit is contained in:
2015-10-06 11:38:43 +02:00
parent 8fbe963379
commit 48e392b4fd
11 changed files with 251 additions and 19 deletions

View File

@@ -64,6 +64,21 @@ class ProductSaleForm extends Model
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id_product' => Yii::t("frontend/product", "Product"),
'count' => Yii::t("frontend/product", "Count"),
'id_currency' => Yii::t("frontend/product", "Currency"),
'id_account' => Yii::t("frontend/product", "Account"),
'id_discount' => Yii::t("frontend/product", "Discount"),
'comment' => Yii::t("frontend/product", "Comment"),
];
}
public function validateProduct($attribute,$params){
$this->product = Product::findOne($this->id_product);
@@ -104,16 +119,6 @@ class ProductSaleForm extends Model
}
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'verifyCode' => 'Verification Code',
];
}
public function save(){
if ( $this->validate() ){