Jump to content

[SOLVED] Hide payment method


Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...