| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Payment method depend on shipping method | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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
__________________
Hakim Elkharbash |
|||||||
#2
|
|||||||
|
|||||||
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?
__________________
X-cart 5.2.12, php 5.6 Ed from Grenoble, France |
|||||||
#3
|
|||||||
|
|||||||
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
__________________
Hakim Elkharbash |
|||||||
#4
|
|||||||
|
|||||||
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.
__________________
X-cart 5.2.12, php 5.6 Ed from Grenoble, France |
|||||||
#5
|
|||||||
|
|||||||
Re: Payment method depend on shipping method
Solve it
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:
__________________
Hakim Elkharbash |
|||||||
|
|
|||
X-Cart forums © 2001-2020
|