dusticelli Posted February 16, 2016 Share Posted February 16, 2016 Hi folks, it's the first time I am posting here, hoping to find some help. Usually I am at the german board, but unfortunatly sometimes that one is a bit lazy, plenty of posts that don't get any answer and so on. I guess this english board is a bit mor active, probably having more users. So I hope some can help me with the following: I order to hide a message that displays the left amount untill free shipping is available in cart, I need to wrap an if-statement around this message inside the tpl file, because I have 1 product, which triggers free shipping anyway regardless cart amount. So my target is to get an if statement that identifys (let's say my product has the ID = 12=) the following: {If productInCart != 12} this is my message placeholder {/if} How can give me the right syntax/code snippet to realize that? I guess for developers this might be an easy thing, isn't it? Link to comment Share on other sites More sharing options...
Simone Salerno Posted February 18, 2016 Share Posted February 18, 2016 {if !Context::getContext()->cart->containsProduct(12)} your message {/if} 3 Link to comment Share on other sites More sharing options...
dusticelli Posted February 18, 2016 Author Share Posted February 18, 2016 Hello Simone S93 thank you very much. This is exactly what I was looking for. Works like a charm.! Link to comment Share on other sites More sharing options...
Mian Waqas Posted April 12, 2023 Share Posted April 12, 2023 On 2/18/2016 at 6:51 PM, Simone Salerno said: {if !Context::getContext()->cart->containsProduct(12)} your message {/if} Hi , what if i have 2 or more products in cart, and one of them have 0 price and i want to create/remove a button if any of the product price in cart is 0. how i can write the statement? regards 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