Mark Added To Cart Products In Product List

Hi all,

I tried to find something like this on marketplace and forum, but no results :(

How to mark added to cart products on the product list page (category)?
Some addon or small modification.

Hello badbojo,

This feature can implemented by making small changes in code.

If you want we can customize and prepare a add-on by which you can add this feature in your site.

for quotation please contact support@webkul.com

Thanks-

Himanshu Dangwal

Create the following file

design/themes/YOUR_THEME/templates/addons/my_changes/hooks/products/product_name.post.tpl

with the following content:

{if !$details_page}
    {$amount = 0}
    {foreach from=$smarty.session.cart.products item=p}
        {if $p.product_id == $product.product_id}
            {$amount = $amount + $p.amount}
        {/if}
    {/foreach}
    {if $amount > 0}
        

{__('in_cart')}: {$amount} {__('items')}

{/if} {/if}

Then add the in_cart language variable and clear the cache

http://prntscr.com/bbr2bt

Thank you eComLabs.
How to make this thing works without page reload?
Just add some cs-ajax class?

Thank you eComLabs.
How to make this thing works without page reload?
Just add some cs-ajax class?

Unfortunately, the feature is not related with classes only. Some more complex changes are also required. Feel free to contact us