I want that a product have a different payment method information on checkout.

When the customer choose that product, when he goes to checkout, the payment method will appear, but in the backend, it will go to another paypal account.

I thought about making a new store view, then I can change the informations on the payment method. I think I could disable the product for one view and enable to another.

But how would it change the store view automatically?

  • Did you wanto to change the method information (name description) or want to change the whole method (different paypal account). What happen if in the cart there are two different product that require different payment method ? – Giuseppe Jul 15 '14 at 15:20
  • It is not paypal, it was an example, but yes, I want to change name description and other information on the payment method. If get two products, maybe a message disabling the payment method and asking to separate order. – Cae Vecchi Jul 15 '14 at 17:38

1) check what's inside the cart

you can add in cart.phtml a loop on the cart items and verify that they all have the same payment information. If not you can disable the "proceed to checkout" button and/or replace it with a proper message.

2) changing payment method infos

you can follow two different approach.

first one duplicate the payment method creating a new payment module (ie. bank_transfer and bank_transfer2) set in the admin the proper information and then in the module function


you can check che cart items and let the module be available or not.

second one

the payment method show information to the user with few functions like getTitle() and using two phtml block info.phtml and form.phtml. You can ovverride the function and check the cart and you can modify the phtmls in order to display the proper information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.