Jump to content

specific payment method on selected products


Recommended Posts

is it possible in prestashop 1.6 we can add specific payment method on selected product 



Product A:  buyer can order Product A by choosing any payment method like cash on delivery or advance payment.  ( while ordering customer can see all payment method we offers )


Product B: buy can order only if he agree to pay in advance via bank account. ( customer can see this item required only advance payment ) 


we have some items which we wants customer pay in advance then we will dispatch these products to customer 


can anybody give me the solution?


Thanks in Advance



Share this post

Link to post
Share on other sites

the module above limits payments based on order amount, I don't see it restricting based on products.


the easiest way is to edit the payment modules hookpayment function, and add your logic directly to it.  some pseudo logic


1) define an array of product ids that are allowed


2) in hookpayment, get a list of products in the cart

$products = $cart->getProducts();

3) loop through the products and determine if the module should be displayed

foreach ($products as $product)
    if (in_array($product['id_product'], $allowed_products))
if (!$allowed)
  • Like 1
  • Thanks 1

Share this post

Link to post
Share on other sites


  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More