- Posts: 88
- Thank you received: 20
Shipping price is lost if another payment method or pickup point is selected
9 years 8 months ago #258685
by dyvel
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.6
Hi
I have created a custom shipping plugin for a customer of mine who is a hikashop enterprise user. The shipping plugin lists parcel pickup shops that the user can select.
My problem is, if I select another pickup point or select another payment method, then hikashop no longer adds the shipping price to the total.
the table td with class hikashop_cart_shipping_value is empty (see attached).
If I update item total or deletes an item from the cart, then shipping total is added again.
Do you have any idea, what could be the issue?
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.6
Hi
I have created a custom shipping plugin for a customer of mine who is a hikashop enterprise user. The shipping plugin lists parcel pickup shops that the user can select.
My problem is, if I select another pickup point or select another payment method, then hikashop no longer adds the shipping price to the total.
the table td with class hikashop_cart_shipping_value is empty (see attached).
If I update item total or deletes an item from the cart, then shipping total is added again.
Do you have any idea, what could be the issue?
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
9 years 8 months ago #258688
by Mohamed Thelji
Replied by Mohamed Thelji on topic Shipping price is lost if another payment method or pickup point is selected
Hello,
Firstly, does it work worrectly if you set the "Auto submit shipping and payment methods selection" option to YES through the page "Hikashop->System->Configuration->Checkout" ?
Firstly, does it work worrectly if you set the "Auto submit shipping and payment methods selection" option to YES through the page "Hikashop->System->Configuration->Checkout" ?
Please Log in or Create an account to join the conversation.
9 years 8 months ago #259595
by dyvel
Replied by dyvel on topic Shipping price is lost if another payment method or pickup point is selected
Sorry for the late reply. Auto submit shipping and payment methods selection is already set to yes, so that is not the issue...
Please Log in or Create an account to join the conversation.
9 years 8 months ago #259598
by dyvel
Replied by dyvel on topic Shipping price is lost if another payment method or pickup point is selected
Debugged some more - if I use a manual shipping plugin, then I don't see the issue. But if I activate a GLS shipping plugin that I've developed instead, then the issue is present. So the issue seems to be related to the shipping plugin somehow.
Any ideas?
Any ideas?
Please Log in or Create an account to join the conversation.
9 years 8 months ago #259600
by dyvel
Replied by dyvel on topic Shipping price is lost if another payment method or pickup point is selected
Ok, seems I found the issue...
unset($usable_methods[$key]);
in my onShippingDisplay - removed it, and everything seems fine now
unset($usable_methods[$key]);
in my onShippingDisplay - removed it, and everything seems fine now
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
9 years 8 months ago - 9 years 8 months ago #259609
by Mohamed Thelji
Replied by Mohamed Thelji on topic Shipping price is lost if another payment method or pickup point is selected
Hello,
Thank you for your feedback !
For more information, the "unset'($usable_methods[$key]" is only used to unset shipping services that are disabled by the owner of the shop through the configuration page of that shipping method, here is an example of how we do it through the UPS shipping plugin :
Thank you for your feedback !
For more information, the "unset'($usable_methods[$key]" is only used to unset shipping services that are disabled by the owner of the shop through the configuration page of that shipping method, here is an example of how we do it through the UPS shipping plugin :
Code:
//Comparing method received by UPS and allowed method
foreach($warehouse->methods as $i => $method){
if(!in_array($method['code'], $rate->shipping_params->methods)){
unset($usableWarehouses[$k]->methods[$i]);
}
}
Last edit: 9 years 8 months ago by Mohamed Thelji.
Please Log in or Create an account to join the conversation.
Time to create page: 0.231 seconds