Predefined Product Comparison

This is probably a strange request, but I would like to show customers a predefined comparison list of 3-4 products using the cs-cart product comparison function:


Is there a way to add these product to this url?

So I would like to make a link from the frontpage that says "Compare our best selling xxx here". Then the link leads to the index.php? with the products we would like to compare already "selected".

It can be done as an extenion. But given that these things are part of the user's session, it would have to be done per user.

Is this intended to be one set of product comparisons for all users? Or are you wanting it to be based on some other criteria.

Either way, it's custom development.

In the app/controllers/frontend/product_features.php controller for the "compare" mode you can use the following code

$p_ids = array(123, 312);
foreach ($p_ids as $p_id) {    
    if (!in_array($p_id, Tygh::$app['session']['comparison_list'])) {
        array_unshift(Tygh::$app['session']['comparison_list'], $p_id);
where 123, 312 - required product IDs
(!) Not tested


As per your request, we can develop an add-on based on your requirement. You can send your requirement to us at

We looking forward to assisting you.