Payment method depend on shipping method
Hey
I try to make payment method depend on the shipping method, I follow this article: https://devs.x-cart.com/changing_store_logic/making_payment_method_depend_on_shipping_method.ht ml For some reason $this->getShippingMethodName() does not return any value, Have anyone had same issue? any suggestions?? Thanks |
Re: Payment method depend on shipping method
I can confirm that the module is working fine on my dev store (5.4.1.24)
How does your shipping methods page ( admin.php?target=shipping_methods ) look? |
Re: Payment method depend on shipping method
Thanks for responding.
Yes, I believe it's working fine in standard X-Cart, but I use X-Cart Multivendor, which has the issue. When I dig more, I figured out that Multivendor has no method to get shipping method name as in standard X-Cart. I have tried to add such a method to my one module but I still have an issue getting the ShippingId. Any suggestions?? Thanks |
Re: Payment method depend on shipping method
I am sorry but I don't have Multivendor X-Cart code, so I don't know how things work. However, presumably you should take a look at the code of Model/Order.php, or whichever class that might be overriding it.
|
Re: Payment method depend on shipping method
Solve it :D
it turns out that X-Cart handles orders in Multi-Vendor as Children, where each child represents a vendor. Therefore, to access methods we need first to specify the child (vendor). So instead of: PHP Code:
We need to use: PHP Code:
|
All times are GMT -8. The time now is 07:16 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.