Jump to content

Restrict Products From Being Checked Out With Some Payment Methods


Recommended Posts

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 by mehnihma (see edit history)
Link to comment
Share on other sites

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

×
×
  • Create New...