SuiteCommerce Standard question: Is there an easy...
# suitecommerce
w
SuiteCommerce Standard question: Is there an easy way to re-arrange the shipping options in the checkout? I'd like to put the Free Shipping option first. Even though it is the default, it shows last on the checkout screen.
p
if easy = codeless then prefixing the display names with numbering might work for you
1. Free Ground Shiping 2. UPS 2 day 3. UPS Next day etc
(i think they are sorted by name but i might be wrong, I'm pretty sure they are not sorted by price, unfortunately, which of course it's what we all expect as e-com customers)
w
That doesn't work, as I can't change the name when UPS is the method. Something to do with trademarks or some-such.
p
OK with code then server side you should be able to do something like Application.on('after:LiveOrder.get', function(Model, responseData) { responseData.shipmethods = _.sort(responseData.shipmethods, 'rate'); }); Not sure if the frontend doesn't re-sort them, though.
The other alternative would be trying to replace the context properties by using addToViewContextDefinition for the OrderWizard.Module.ShipMethod view but not sure if that api is available there.
w
OK... too bad this isn't straight-forward.
p
Agreed, should be sorted by rate out of the box
w
Or at least have the option.