add frontend changes
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user