[Skip to main content](#vessel-content)

#   Auto select default shipping method

##

- **[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")**
- [![gpraceman's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37240.png)](/forum/user/37240-gpraceman "View gpraceman's Profile") Topic Author
- [ Offline](/forum/user/37240-gpraceman)

Less More

- Posts: 166
- Thank you received: 11
-
- [](http://grandprix-software-central.com)
-

11 years 5 months ago [\#202201](#202201) by [gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")  *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#202201 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")* was created by *[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")*

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4.39

If I set "Auto select default shipping and payment methods" to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14276
-
-

11 years 5 months ago [\#202211](#202211) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#202211 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

Hi,

When you set it to yes, it selects the first one of the list.
If USPS is less expensive than FedEx, then swap their ordering via the menu System&gt;Shipping methods and that should do it.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")**
- [![gpraceman's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37240.png)](/forum/user/37240-gpraceman "View gpraceman's Profile") Topic Author
- [ Offline](/forum/user/37240-gpraceman)

Less More

- Posts: 166
- Thank you received: 11
-
- [](http://grandprix-software-central.com)
-

11 years 5 months ago [\#202313](#202313) by [gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")  Replied by *[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#202313 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

If that is the case, then it is not working correctly. I have USPS ordered to display before FedEx.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 5 months ago [\#202321](#202321) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#202321 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

Hi,

Please provide screenshots of the shipping methods listing and the settings of FedEx and USPS.
This way we will be able to reproduce the issue on our end and debug that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")**
- [![gpraceman's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37240.png)](/forum/user/37240-gpraceman "View gpraceman's Profile") Topic Author
- [ Offline](/forum/user/37240-gpraceman)

Less More

- Posts: 166
- Thank you received: 11
-
- [](http://grandprix-software-central.com)
-

11 years 5 months ago -  11 years 5 months ago [\#202384](#202384) by [gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")  Replied by *[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#202384 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

Here's the screenshots.

- [ ![checkout.png](/forum/attachment/24518) ](/forum/attachment/24518 "checkout.png") [ ](/forum/attachment/24518?download=1 "checkout.png")
- [ ![fedex1.png](/forum/attachment/24519) ](/forum/attachment/24519 "fedex1.png") [ ](/forum/attachment/24519?download=1 "fedex1.png")
- [ ![fedex3.png](/forum/attachment/24521) ](/forum/attachment/24521 "fedex3.png") [ ](/forum/attachment/24521?download=1 "fedex3.png")
- [ ![fedex4.png](/forum/attachment/24522) ](/forum/attachment/24522 "fedex4.png") [ ](/forum/attachment/24522?download=1 "fedex4.png")
- [ ![fedex5.png](/forum/attachment/24523) ](/forum/attachment/24523 "fedex5.png") [ ](/forum/attachment/24523?download=1 "fedex5.png")
- [ ![usps1.png](/forum/attachment/24524) ](/forum/attachment/24524 "usps1.png") [ ](/forum/attachment/24524?download=1 "usps1.png")
- [ ![usps2.png](/forum/attachment/24525) ](/forum/attachment/24525 "usps2.png") [ ](/forum/attachment/24525?download=1 "usps2.png")
- [ ![fedex2.png](/forum/attachment/24526) ](/forum/attachment/24526 "fedex2.png") [ ](/forum/attachment/24526?download=1 "fedex2.png")

Last edit: 11 years 5 months ago by [gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")**
- [![gpraceman's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37240.png)](/forum/user/37240-gpraceman "View gpraceman's Profile") Topic Author
- [ Offline](/forum/user/37240-gpraceman)

Less More

- Posts: 166
- Thank you received: 11
-
- [](http://grandprix-software-central.com)
-

11 years 5 months ago [\#202386](#202386) by [gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")  Replied by *[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#202386 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

Here's one more.

- [ ![plugins.png](/forum/attachment/24527) ](/forum/attachment/24527 "plugins.png") [ ](/forum/attachment/24527?download=1 "plugins.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

11 years 5 months ago [\#202431](#202431) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#202431 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

Hello,
Can you clear your browser cache and try it again to be sure that it's not coming from it ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")**
- [![gpraceman's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37240.png)](/forum/user/37240-gpraceman "View gpraceman's Profile") Topic Author
- [ Offline](/forum/user/37240-gpraceman)

Less More

- Posts: 166
- Thank you received: 11
-
- [](http://grandprix-software-central.com)
-

11 years 5 months ago [\#202510](#202510) by [gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")  Replied by *[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#202510 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

I tried it on a different browser and deleting out the browser cache. It still selects the cheapest FedEx option, which is more expensive than the cheapest USPS option.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

11 years 5 months ago -  11 years 5 months ago [\#202564](#202564) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#202564 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

Hello,
I succeed to reproduce your issue, the solution will be to edit the code of the "components\com_hikashop\views\checkout\view.html.php" file and change these lines : Code:

foreach($shipping_groups as $key =&gt; $shipping_group) { $p = reset($shipping_group-&gt;shippings); foreach($usable_rates as $rate) { if($rate-&gt;shipping_id == $p) { $rates[] = $rate; $shipping_id[] = $rate-&gt;shipping_id.'@'.$key; $shipping_method[] = $rate-&gt;shipping_type.'@'.$key; break; } } }

To : Code:

foreach($shipping_groups as $key =&gt; $shipping_group) { foreach($usable_rates as $rate) { if(in_array($rate-&gt;shipping_id, $shipping_group-&gt;shippings)) { $rates[] = $rate; $shipping_id[] = $rate-&gt;shipping_id.'@'.$key; $shipping_method[] = $rate-&gt;shipping_type.'@'.$key; break; } } }

Be sure to clear your cache before testing it.

Last edit: 11 years 5 months ago by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")**
- [![gpraceman's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37240.png)](/forum/user/37240-gpraceman "View gpraceman's Profile") Topic Author
- [ Offline](/forum/user/37240-gpraceman)

Less More

- Posts: 166
- Thank you received: 11
-
- [](http://grandprix-software-central.com)
-

11 years 5 months ago -  11 years 5 months ago [\#202592](#202592) by [gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")  Replied by *[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#202592 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

I made that change, cleared the site cache, cleared the browser cache, cleared out the shopping cart, and still have the same problem.

I do notice a similar block of code in the &amp;initCart() function that may also need changing.

Code:

foreach($shipping_groups as $key =&gt; $shipping_group) { $p = reset($shipping_group-&gt;shippings); foreach($usable_rates as $rate) { if($rate-&gt;shipping_id == $p &amp;&amp; (!isset($rate-&gt;shipping_warehouse_id) &#124;&#124; $rate-&gt;shipping_warehouse_id === $key)) { $rates[] = $rate; $shipping_ids[] = $rate-&gt;shipping_id.'@'.$key; $shipping_methods[] = $rate-&gt;shipping_type.'@'.$key; break; } } }

Last edit: 11 years 5 months ago by [gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 5 months ago [\#202636](#202636) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#202636 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

Hi,

The code you're currently mentioned has been tested and validated ; it does not require modification.
The code that Mohamed mentioned might need a modification but we still need to review it in order to be sure.

Because the code line: Code:

if($rate-&gt;shipping_id == $p &amp;&amp; (!isset($rate-&gt;shipping_warehouse_id) &#124;&#124; $rate-&gt;shipping_warehouse_id === $key)) {

is working and has been highly tested. And if we change that line, it will break several features (including warehouses) and a lot of working stores in the same time.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")**
- [![gpraceman's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37240.png)](/forum/user/37240-gpraceman "View gpraceman's Profile") Topic Author
- [ Offline](/forum/user/37240-gpraceman)

Less More

- Posts: 166
- Thank you received: 11
-
- [](http://grandprix-software-central.com)
-

11 years 5 months ago [\#202659](#202659) by [gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")  Replied by *[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#202659 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

I was just pointing out another similar chunk of code. This is obviously a bug and as such, each place where the problem could be occurring should be examined.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 5 months ago [\#202661](#202661) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#202661 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

Hi,

That's right ; and we will examine it with Mohamed who has reproduce the issue in his website.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")**
- [![gpraceman's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37240.png)](/forum/user/37240-gpraceman "View gpraceman's Profile") Topic Author
- [ Offline](/forum/user/37240-gpraceman)

Less More

- Posts: 166
- Thank you received: 11
-
- [](http://grandprix-software-central.com)
-

11 years 4 months ago [\#204386](#204386) by [gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")  Replied by *[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#204386 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

Any update on this issue?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

11 years 4 months ago [\#204512](#204512) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#204512 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

Hello,
Yes, I made a fix regarding that issue which will be available within few hours, so you'll just have to download the last Hikashop version through our website, install it and test it again.
Don't forget to clear your browser cache/session before testing it.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")**
- [![gpraceman's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37240.png)](/forum/user/37240-gpraceman "View gpraceman's Profile") Topic Author
- [ Offline](/forum/user/37240-gpraceman)

Less More

- Posts: 166
- Thank you received: 11
-
- [](http://grandprix-software-central.com)
-

11 years 4 months ago [\#204619](#204619) by [gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")  Replied by *[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#204619 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

I downloaded and installed the latest package today and I am still having the same problem. I tried on two different browsers, even after clearing the browser cache.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

11 years 4 months ago -  11 years 4 months ago [\#204827](#204827) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#204827 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

That's weird, the patch fixed that issue on my end, can you give me a temporary FTP access (through our contact form) to your website so that I can see if the patch was correctly applied.
If you're still having that issue despite the new patch, I'll be able to test it and to fix it on your end.
Thanks.

Last edit: 11 years 4 months ago by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")**
- [![gpraceman's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37240.png)](/forum/user/37240-gpraceman "View gpraceman's Profile") Topic Author
- [ Offline](/forum/user/37240-gpraceman)

Less More

- Posts: 166
- Thank you received: 11
-
- [](http://grandprix-software-central.com)
-

11 years 4 months ago [\#205081](#205081) by [gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")  Replied by *[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#205081 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

PM sent

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

11 years 4 months ago [\#205138](#205138) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#205138 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

The patch wasn't applied on the "administrator\components\com_hikashop\classes\shipping.php" file, I just added it manually, can you test it again ?
Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")**
- [![gpraceman's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37240.png)](/forum/user/37240-gpraceman "View gpraceman's Profile") Topic Author
- [ Offline](/forum/user/37240-gpraceman)

Less More

- Posts: 166
- Thank you received: 11
-
- [](http://grandprix-software-central.com)
-

11 years 4 months ago [\#205202](#205202) by [gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")  Replied by *[gpraceman](/forum/user/37240-gpraceman "View gpraceman's Profile")* on topic *[Auto select default shipping method](/forum/28-shipping-methods/877059-auto-select-default-shipping-method#205202 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.39  If I set &quot;Auto select default shipping and payment methods&quot; to Yes, it is not selecting the least expensive shipping option. I have USPS and FedEx shipping enabled, but it always selects the least expensive FedEx option, even if there is a less expensive USPS option.")*

That fixed the problem. Though, I would have thought that installing the latest package would have had the updated file in it.

I was going to add a free shipping option for those that wish to pickup their order in person. However, this does end up defaulting to that option, even though the vast majority of our customers are not local. I assume that there isn't a way to get this to default to the lowest rate that isn't zero, or is there?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvODc3MDU5LWF1dG8tc2VsZWN0LWRlZmF1bHQtc2hpcHBpbmctbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.147 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
