add frontend changes

This commit is contained in:
2015-10-30 09:28:58 +01:00
parent 4a04c9efa2
commit e34b150d74
41 changed files with 1083 additions and 254 deletions

View File

@@ -184,14 +184,16 @@ class ProductSaleForm extends Model
}
protected function saveTransfer(){
$customer = null;
$status = Transfer::STATUS_PAID;
if ( $this->isAppendToUserCart() ){
$status = Transfer::STATUS_NOT_PAID;
}else if ( $this->isAppendToCustomerCart() ){
$status = Transfer::STATUS_NOT_PAID;
$customer = $this->customer;
}
$this->transfer = Transfer::createProductTransfer($this->sale,$this->account, $this->discount, $this->currency, $this->count, $this->product,$status);
$this->transfer = Transfer::createProductTransfer($this->sale,$this->account, $this->discount, $this->currency, $this->count, $this->product,$status,$customer);
if ( isset($this->comment)){
$this->transfer->comment = $this->comment;
}
@@ -229,8 +231,6 @@ class ProductSaleForm extends Model
}
public function appendToCustomerCart(){
// print_r("cart: ".$this->cart );
// print_r("customer:: ".$this->customer );
if ( $this->isAppendToCustomerCart() && isset($this->customer) ){
$item = new ShoppingCart();
$item->id_customer = $this->customer->id_customer;