Remove shipping cost

  • kaya
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
5 years 6 months ago #57960 by kaya
Remove shipping cost was created by kaya
Hi,

I have 2 Items in shopping cart, one has shipping cost, another has no. If I remove the item from the shopping cart, which has shipping cost, on the total cost is still the shipping cost.

Can you give me some point where I can update/remove the shipping cost?

The version of EShop: 1.1.5 and 1.3.1 (mixed)

Thanks & Best Regards,

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

  • kaya
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
5 years 6 months ago - 5 years 6 months ago #57976 by kaya
Replied by kaya on topic Remove shipping cost
I fixed the bug, thank you.
if someone need, the solution:

function updateShippingCost()
{
<?php
$isShipping = false;
if(count($this->cartData) > 0)
{
foreach ($this->cartData as $key => $product)
{
if($product["product_shipping"] == 1):
$isShipping = true;
break;
endif;
}
}
if(!$isShipping):
$session = JFactory::getSession();
$session->set('shipping_method');
endif;
?>
}

and call the function after removing item.
Last edit: 5 years 6 months ago by kaya. Reason: sharing the solution.

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

  • Giang Dinh Truong
  • Giang Dinh Truong's Avatar
  • Offline
  • Administrator
  • Administrator
More
5 years 5 months ago #58026 by Giang Dinh Truong
Replied by Giang Dinh Truong on topic Remove shipping cost
OK Kaya,
I think this was small bug from old version. Seem I also fixed it in the latest version of EShop.
Anyway, thank you for fixing it and showing here.
Sincerely, Giang

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

Moderators: Giang Dinh Truong