Jump to content

[SOLVED] Checking if downloadable in paypal redirect.tpl


MrBaseball34

Recommended Posts

You could use $cart->isVirtualCart() in modules/paypal/redirect.php to check whether there are any downloadable products in the cart. To check whether an individual product is a downloadable product, use the following:

ProductDownload::getIdFromIdProduct($id_product);



If it returns false, then you know it isn't a downloadable product. If it returns an ID, then you know the product is a downloadable product. You could add a new array element to the $products array with a true or false value so you can check in redirect.tpl whether the product is downloadable.

Link to comment
Share on other sites

I'm not sure. If $cart is a global variable, then it should work. If it isn't, then it won't. You should add the following to the list of $smarty->assigns in modules/paypal/redirect.php to pass in the value:

$isVirtualCart => $cart->isVirtualCart(),



then you can use the following in redirect.tpl:

{if $isVirtualCart}

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...