bissio Posted October 22, 2013 Share Posted October 22, 2013 Hi all, i'm trying to hide the cod payment module if someone puts in the cart a customized product. I think i can put an if statement smarty code into payment.tpl (inside the cod module directory), but how can i identify the customization_id, if it is present or not)? Thanks Link to comment Share on other sites More sharing options...
vekia Posted October 22, 2013 Share Posted October 22, 2013 you can do it in module .php file there is a code to check if product is a virtual product. you can add there also checker for id_customization like this one: foreach ($params['cart']->getProducts() AS $product) { $pd = ProductDownload::getIdFromIdProduct((int)($product['id_product'])); if ($pd AND Validate::isUnsignedInt($pd)) return false; if (isset($product['id_customization'])) return false; } Link to comment Share on other sites More sharing options...
bissio Posted October 22, 2013 Author Share Posted October 22, 2013 Thanks Vekia, where i have to put this code? I mean i have to create a new module or just add your posted code to a php existing file? I use PS 1.5.6 Thanks again Link to comment Share on other sites More sharing options...
bissio Posted October 22, 2013 Author Share Posted October 22, 2013 forget my stupid question... just a little drunk :-) Thanks for your support. i added you code to cashondelivery.php (just after the virtual product check) and solved the problem Bye Link to comment Share on other sites More sharing options...
vekia Posted October 22, 2013 Share Posted October 22, 2013 you're welcome glad to hear that it works for you im going to mark this topic as [solved] with regards, Milos 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