bloggus Posted October 15, 2022 Share Posted October 15, 2022 With the code below it is possible to check in tpl-file, if the products is already in cart, BUT this code do not take into the account variants of the products, like size or color. {if $product.quantity <= 0} {$in_cart = 0} {foreach from=$cart['products'] item='cart_product' } {if $cart_product['id_product'] == $product.id} {$in_cart = 1} {break} {/if} {/foreach} {/if} Is is possible to alter the code so it also check if the size and color is in the cart? Not only check the product id? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now