Add addtional page parameter before loading the page

Set a variable

$product_view=isset($_GET['product_view']) ? $_GET['product_view'] : 'grid'; 

Now, how to keep it like this with pagination URL’s.

echo paginate_links(array(
    'base' => add_query_arg('product_view', $product_view),
    'format' => '',
    'prev_text' => __('«'),
    'next_text' => __('»'),
    'total' => ceil($total / $items_per_page),
    'current' => $page,
    'add_args' => array(
        'category' => 'fruit',
        'color' => 'red'
    )
));

I hope this will help you to solve your problem.

Thank You,

tech