common/components/CartFunctionality.php
/*
     * this function add products to cart from wishlist list
     */
this function add products to cart from wishlist list
this function add products to cart from wishlist list
public static function add_to_cart($user_id, $temp_session, $product_id, $qty) {
        $model = new cart;
        $model->user_id = $user_id;
        $model->session_id = $temp_session;
        $model->product_id = $product_id;
        $model->quantity = $qty;
        $model->date = date('Y-m-d H:i:s');
        if ($model->save()) {
            return TRUE;
        }
    }
public static function add_to_cart ( $ user_id , $ temp_session , $ product_id , $ qty ) { $ model = new cart ; $ model -> user_id = $ user_id ; $ model -> session_id = $ temp_session ; $ model -> product_id = $ product_id ; $ model -> quantity = $ qty ; $ model -> date = date ( 'Y-m-d H:i:s' ) ; if ( $ model -> save ( ) ) { return TRUE ; } }
this function add products to cart from wishlist list
this function add products to cart from wishlist list