multiple payment method for one product

  • Posts: 168
  • Thank you received: 7
3 years 10 months ago #320318

hi
i want use multi payment method for one product. for example some product has two payment method,one is online pay and other is use manual pay and give me tracing pay code to accept his sell. i see some thing in this link:
www.hikashop.com/forum/payment-methods/8...ne-product-only.html
but it is not possible for me to use weight or volume to restrict payment method.my product has not these feature . my product is Online Course. is there any other way?

Please Log in or Create an account to join the conversation.

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
3 years 10 months ago #320326

Hi,

Why not ? You could set a fake volume for your product (even if there is no need for it), and then use the volume restrictions on the payment methods to only display some payment methods based on whether the product is in the cart or not.
For example, if you have other products that have weight between 0 and 20 kg, you can safely set a weight of 1000Kg in the product.
Then, you configure your payment methods for that product to have a minimum weight of 999kg, and the payment methods for the other products you have a maximum weight of 999kg.
Is there a reason why this wouldn't work on your website ?

Please Log in or Create an account to join the conversation.

  • Posts: 168
  • Thank you received: 7
3 years 10 months ago #320361

it seems in the past you have some restriction as a product, but not now.
is there any other logical way? if i want write php code to do that (add product field in restriction to select that) have you any advise?
i want get to my shop seller a clearer way to add this payment methods to any product.

Please Log in or Create an account to join the conversation.

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
3 years 10 months ago #320386

We never had restriction of the payment methods to the products. That's because HikaShop is a shopping cart system.
And thus, the customer can pay for several products at the same type.
If he has products with payment methods restricted to different payment methods, then it would mean that we would have to block the user from paying carts with products with different payment methods as you can only have one payment method for one order at the end of the checkout. So usually, you don't want that.

Now if you still want to do that, that's possible. You'll have to modify the payment plugins you want to use to add to them an extra option to select the products / categories in the backend, and check on that option's restriction during the checkout in the onPaymentDisplay function of the plugin.
The payment plugins code is located in the plugins/hikashoppayment/ of your website.

Note that if you modify directly the payment plugins and that these are payment plugins included by default in HikaShop, you'll loose your changes when you update HikaShop. So it's better to change the name of the plugin (in the xml, the filenames, the class name, the code, etc). That way, you can use your modified payment plugin instead of the default one and you won't have issues with updates.

Please Log in or Create an account to join the conversation.

Time to create page: 0.060 seconds
Powered by Kunena Forum