X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Setting default shipping method? (https://forum.x-cart.com/showthread.php?t=71449)

Hanypa 02-21-2015 09:01 PM

[Solved] Setting default shipping method XC5?
 
I have multiple shipping methods and carriers (3 custom, 2 Fedex, and 10 U.S.P.S.) I would like all orders to default to my custom methods in their set priority. It seems that currently my shipping default is random. Sometimes it defaults to Fedex, sometimes USPS, or my custom methods.

Thanks,
Hany

totaltec 02-22-2015 12:45 PM

Re: Setting default shipping method?
 
Hany, it is related to the position that the methods have assigned. I have played with this before and I agree it is confusing and difficult to work with. But I have been able to achieve what you are describing.

RichieRich 02-22-2015 01:57 PM

Re: Setting default shipping method?
 
That's quite important, because either the seller may have a preferred carrier, or it may show a less desirable option to the customer and force them away

Hanypa 02-22-2015 07:54 PM

Re: Setting default shipping method?
 
I figured it out for my implementation, it's actually pretty ridiculous the way X-Cart 5 handles this.

So, all the shipping methods that use the drag & drop sorting method actually have values assigned to the positions. The problem in creating a sorted hierarchy is that some of them assign the same values to the same positions. For example, the top position of the Custom shipping methods is "10". The problem is that the value of the top position of the Fedex shipping methods is also "10"! So when you have 3 Custom shipping methods in place and Fedex is returning rates for say its second shipping method you end up with the Fedex rate mixed in the middle of your custom methods, whats even more ridiculous is that shipping methods like USPS do not use the same sorting arrangement.

Here's how you make it work, setup any custom methods you may need, then install and setup all the shipping modules you plan on using. Next setup all the applicable methods for each module. Do some testing to make sure they all work as expected, turn off any you don't need, etc. now the fun starts, order your custom shipping methods first keeping note of the value of the last method. You can find out the value by hovering over the four-way arrow icon that you use to sort the methods. If you have 3 like me, the last one should have a value of "30". Now go through all of your other shipping methods and hover over the first one in the list and make note of it's value. I tested custom methods, UPS, Fedex, and USPS. I found that both Custom Methods and Fedex start at "10" and increment by 10 for each method weather they are active or not. UPS starts at "400" This is important to know! This means that UPS can never come before Fedex! USPS is different from the other methods because it starts at "700" BUT you can change the value to anything you want! This is where the ridiculousness comes in because every method should be like this! Then you'd be able to order the shipping methods as you see fit, but that's not how it currently works. Anyways back on track. So you have 3 custom methods in place in spots 1, 2, and 3. 30 being the value of you last method. Move to your second method keep in mind that your second method if it uses drag & drop has to have a value lower then any of the other that follow it. So in my case UPS can not come before Fedex because the lowest UPS value is "400", and Fedex ends at "220". For Fedex take your first active shipping method and move it to the 4th position. Doing this will assign it a value of "40" making it the first shipping method to be listed after your last custom method. sort the rest of your Fedex methods under your first active one, make note of the last active value. Now with UPS the lowest possible value is "400" this means that you can sort them top to bottom starting with your first active method in the first position giving it a value of "400". Finally USPS activate and sort them based on what you need. Keep in mind with USPS you can assign them any value, so starting at 600 made it easier for me to keep track and sort them by increments of 10 for each position, but also keep them sorted under UPS!

Hope this helps, it would be more helpful if this information found its way into the wiki!

X-Cart 5 is a wonderful product, but the lack of documentation like this makes it harder to use then it needs to be.


All times are GMT -8. The time now is 08:40 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.