♥Moxamint Posted August 17, 2017 Share Posted August 17, 2017 Hi All, If shipping method has not yet been selected, how do I make the method with least sort order of display (the first shipping method) automatically selected? Currently the system would use the cheapest method. Thank you in advance if you can give me a hint. Cheers, Eddy Link to comment Share on other sites More sharing options...
Harald Ponce de Leon Posted August 17, 2017 Share Posted August 17, 2017 Try and adapt this: https://github.com/osCommerce/oscommerce2/commit/83df1abfdb5f5df0b4e69fc56d65b4b52c92e091 , osCommerce Link to comment Share on other sites More sharing options...
Harald Ponce de Leon Posted August 17, 2017 Share Posted August 17, 2017 The same commit that will go in v2.3.6: https://github.com/haraldpdl/oscommerce2/commit/2bb09c92eb3738057fb5f5473fad196825bc47bf , osCommerce Link to comment Share on other sites More sharing options...
♥Moxamint Posted August 17, 2017 Author Share Posted August 17, 2017 The new code works as expected. Thank you very much! Since get_first() will replace cheapest() in the core checout_shipping.php, does it means you do not consider cheapest() being a reasonable default? Cheers, Eddy Link to comment Share on other sites More sharing options...
Harald Ponce de Leon Posted August 17, 2017 Share Posted August 17, 2017 cheapest() will stay in there as Apps may need to access the cheapest rate (eg, to show "Shipping from $x"). , osCommerce Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.