common/components/CartFunctionality.php
/*
     * save added promotion code to temporary table
     */
save added promotion code to temporary table
save added promotion code to temporary table
public static function SaveTemp($type_id, $value, $promotion_discount) {
        $temp_promotion = new \common\models\TempSession;
        $temp_promotion->user_id = Yii::$app->user->identity->id;
        $temp_promotion->type_id = $type_id;
        $temp_promotion->value = $value;
        $temp_promotion->amount = $promotion_discount;
        $temp_promotion->save();
        return $temp_promotion;
    }
public static function SaveTemp ( $ type_id , $ value , $ promotion_discount ) { $ temp_promotion = new \ common \ models \ TempSession ; $ temp_promotion -> user_id = Yii :: $ app -> user -> identity -> id ; $ temp_promotion -> type_id = $ type_id ; $ temp_promotion -> value = $ value ; $ temp_promotion -> amount = $ promotion_discount ; $ temp_promotion -> save ( ) ; return $ temp_promotion ; }
save added promotion code to temporary table
save added promotion code to temporary table