mehnihma Posted February 16, 2013 Share Posted February 16, 2013 Hi How can I restrict products from being checked out with some payment methods. Like for some products to disable paypal or bankwire on chekout? How can I achieve that? Thanks Link to comment Share on other sites More sharing options...
mehnihma Posted February 17, 2013 Author Share Posted February 17, 2013 Can I edit payment tpl file to chek if the products if from certain supplier then not show it or something? Link to comment Share on other sites More sharing options...
El Patron Posted February 17, 2013 Share Posted February 17, 2013 you would need to modify the actual payment module...so if it's paypal..then you would need to modify the paypal not to diplay the .tpl file when offering the payment options Link to comment Share on other sites More sharing options...
mehnihma Posted February 17, 2013 Author Share Posted February 17, 2013 (edited) But how to check for products in cart in smarty and check if one of the products is from certain supplier then display nothing? I need something like this to get it working I think in payment.tpl: {foreach from=$products item=product name=products} {if $product.id_supplier eq '3'} Display nothing {else} <p class="payment_module"> <a href="{$link->getModuleLink('bankwire', 'payment')}" title="{l s='Pay by bank wire' mod='bankwire'}"> <img src="{$this_path}bankwire.jpg" alt="{l s='Pay by bank wire' mod='bankwire'}" width="86" height="49"/> {l s='Pay by bank wire (order process will be longer)' mod='bankwire'} </a> </p> {/if} {/foreach} Edited February 17, 2013 by mehnihma (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted February 17, 2013 Share Posted February 17, 2013 it's more complicated than that...what happens when you have one product in the cart that can use that payment method..and then one not? and then it would depend on which payment module..and which version of prestashop you are using.... so you would need to be a lot more specific in your posting to get detailed response... Link to comment Share on other sites More sharing options...
El Patron Posted February 17, 2013 Share Posted February 17, 2013 here is a search with pretty much the same question https://www.google.com.co/search?q=prestashop+restrict+payment+by+product&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a#hl=en&client=firefox-a&hs=KbF&tbo=d&rls=org.mozilla:en-US:official&q=+site:prestashop.com+prestashop+restrict+payment+by+product&sa=X&ei=tzkgUeqvLYmK9QTB74GoDA&ved=0CEgQrQIwAg&bav=on.2,or.r_gc.r_pw.r_qf.&bvm=bv.42553238,d.eWU&fp=3131a1694c6ea45c&biw=1366&bih=648 Link to comment Share on other sites More sharing options...
mehnihma Posted February 17, 2013 Author Share Posted February 17, 2013 I use Prestahop 1.5.1 I was thinking to check if one of the products is from that disabled supplier then restrict for whole cart. But I have not find answer to that question yet. Link to comment Share on other sites More sharing options...
Recommended Posts