UPS Shipping Options Not Sorted by Price

  • Posts: 248
  • Thank you received: 7
  • Hikamarket Frontedition Hikamarket Multivendor Hikaserial Standard Hikashop Business
7 years 8 months ago #246630

Hi Mohamed,
Trying to accomplish the same thing as p3.chuck but the file shipping.php no longer has the lines that indicate where to put the code changes. How can I sort the UPS services and have the lowest price selected as default?
Thanks

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

  • Posts: 12953
  • Thank you received: 1778
7 years 8 months ago #246646

Hello,

I just checked it and you should still have the following line on your "shipping.php" file :

uasort($usable_methods, array($this, "sortShipping"));

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

  • Posts: 104
  • Thank you received: 5
7 years 8 months ago #246699

The link is here to resolve that issue:

www.hikashop.com/forum/shipping-methods/...sorted-by-price.html

It requires changes to the ups.php file and the shipping.php files.

BE AWARE: if you see other 'fixes' for things like 'Number of Packages' being wrong that those ups.php files will undo the changes unless you manually modify the files posted in links of that nature. So be VERY careful when downloading and install 'fixes'.

It would be great if they just incorporated changes like these into the software as an option in the UPS module so you don't have to hack the core files and worry about updates blowing them up.

The following user(s) said Thank You: Mohamed Thelji

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

  • Posts: 248
  • Thank you received: 7
  • Hikamarket Frontedition Hikamarket Multivendor Hikaserial Standard Hikashop Business
6 years 11 months ago #268173

Works great, thanks.

Attachments:
Last edit: 6 years 11 months ago by a2zcs. Reason: At first it wasnt working, must have been due to caching. Seems good now. Thanks!

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

  • Posts: 104
  • Thank you received: 5
6 years 4 months ago #283247

Is there a way to insert these changes so they are not overwritten each time a HikaShop update is installed?

It would actually be very nice if it was simply an option within HikaShop. I can't believe that we're the only company that wants to list UPS options in order and have the cheapest method selected by default.

Please advise on how I can do this so it will not be overwritten by updates as it's time that I need to do this yet again.

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

  • Posts: 12953
  • Thank you received: 1778
6 years 4 months ago #283285

Hello,

We can eventually create an UPS "sort by price" option so we'll add it on our TODO list.

Please advise on how I can do this so it will not be overwritten by updates as it's time that I need to do this yet again.


In that case, the solution will be to directly recreate a copy of the UPS shipping plugin but with a different name, so that it won't be overwritten after every Hikashop Update.

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

  • Posts: 104
  • Thank you received: 5
6 years 4 months ago #283330

By doing an overwrite, any other upgrades to the UPS Plugin would be missed.

I know that with things that are template related, you can create an override in the template that does not change the core Joomla or template. It is simply overwrites those functionalities at run time. Is there anything similar for plugins?

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 4 months ago #283334

Hello,

Please note that there is an hidden HikaShop option called "sort_shipping_by_price" ; which allow to sort all shipping methods by price.
But because it's an hidden option, you have to activate it manually in the hikashop_config table, by creating a new entry for it (and use "1" for the value).

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: p3.chuck

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

  • Posts: 104
  • Thank you received: 5
6 years 4 months ago #283414

Now that's what I'm talking about... That worked AWESOME !! It sorts as expected and picks the first item as the default. EXACTLY what I needed. Thanks again as the support for Hikashop is great....

The following user(s) said Thank You: Mohamed Thelji

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

Time to create page: 0.101 seconds
Powered by Kunena Forum