Shipping price is lost if another payment method or pickup point is selected

  • Posts: 88
  • Thank you received: 19
7 years 10 months ago #258685

-- 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?

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
7 years 10 months ago #258688

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" ?

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

  • Posts: 88
  • Thank you received: 19
7 years 10 months ago #259595

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.

  • Posts: 88
  • Thank you received: 19
7 years 10 months ago #259598

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?

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

  • Posts: 88
  • Thank you received: 19
7 years 10 months ago #259600

Ok, seems I found the issue...

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.

  • Posts: 12953
  • Thank you received: 1778
7 years 10 months ago #259609

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 :

//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: 7 years 10 months ago by Mohamed Thelji.

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

Time to create page: 0.075 seconds
Powered by Kunena Forum