bsmither Posted December 16, 2017 Share Posted December 16, 2017 CubeCart added the ability to have a shipping module acquire a user-supplied "group name". This group name appears in the shipping selector for the group of related shipping products. The group name is also databased as the 'ship_method'. This has been the shipping module's folder name, but now can be overridden. See this issue in the Github. It seems this group name is also used extensively throughout CubeCart -- emails, order summary, print invoice, etc. These are the edits needed to have the All in One Shipping module (indeed, any shipping module) stop showing the folder name and instead show a user-supplied name. This is the test that decides to use the specified name, if it exists. If not, use the default name. ++++++++ In the file shipping.class.php, near line 293, find: public function calculate() { Add BEFORE that, the following: public function groupName() { return (isset($this->_settings['group_name']) && !empty($this->_settings['group_name'])) ? $this->_settings['group_name'] : $this->_group_name; } This the default name the module will use if there isn't one specified in the module's settings panel. ++++++++ In the file, shipping.class.php, near line 28, find: private $_debug_lines; Add AFTER: private $_group_name = "All In One Shipping"; This adds the text entry field where you may specify the name to show for using this module - the "ship_method'. ++++++++ In the file skin/admin/index.tpl, near line 15, find: <div><label for="status">{$LANG.common.status}</label><span><input type="hidden" name="module[status]" id="status" class="toggle" value="{$MODULE.status}" /></span></div> Add AFTER: <div><label for="group_name">{$LANG.all_in_one_shipping.ship_method_name}</label><span><input type="text" name="module[group_name]" id="group_name" class="textbox" value="{$MODULE.group_name}" /></span></div> This adds the needed language phrase for the module's settings panel. ++++++++ In the file language/module.definitions.xml, near line 3, find: <group name="all_in_one_shipping"> Add AFTER: <string name="ship_method_name"><![CDATA[Name to show as shipping method]]></string> For example, you may want "Ground Shipping via" so that the resulting display, when using the AIOS module, the shipping details could be Ground Shipping via Roadway Express. Link to comment Share on other sites More sharing options...
havenswift-hosting Posted December 16, 2017 Share Posted December 16, 2017 @Al Brookbanks Link to comment Share on other sites More sharing options...
hairydog Posted February 1, 2018 Share Posted February 1, 2018 This works a treat, but why hasn't it been incorporated into a new version of the plugin? Link to comment Share on other sites More sharing options...
Claudia M Posted February 1, 2018 Share Posted February 1, 2018 Along with the other features I mentioned in the other post please! An "Edit All" selection. Each USPS and UPS rate increase you have to change the rates, easier to be able to select all. And the ability to sort the rates - be able, for example, drag the appropriate standard ground below each USPS Parcel (Like you can do with the categories in admin - or something similair): Link to comment Share on other sites More sharing options...
Bryan_TAO Posted May 19, 2019 Share Posted May 19, 2019 Thank you very much for that in-depth reply. Much appreciated! Bryan Link to comment Share on other sites More sharing options...
harrisorganic Posted April 19, 2020 Share Posted April 19, 2020 Good morning, can anyone give an update to AIOS. The current version is 1.0.16. Has any of the above issues mentioned been added? If so which ones please. I am interested in the name change from (All_In_One_Shipping) to a user name as mentioned above. Does the 2018 code by Brian Bsmithers need to be added to version 1.0.16 or has the name change feature been incorportated and I have not found it? Duncan Link to comment Share on other sites More sharing options...
havenswift-hosting Posted July 1, 2020 Share Posted July 1, 2020 @Al Brookbanks can the suggestions here and in https://github.com/cubecart/v6/issues/1362 be added at least to AOIS (as probably the most widely used shipping plugin) - I also get a lot of requests for this Thanks Ian Link to comment Share on other sites More sharing options...
Harvey Posted July 3, 2020 Share Posted July 3, 2020 Hi, I gather the main aim of this thread is to ask whether the description field of the shipping service chosen when a customer's shipping rate is calculated by All In One Shipping could be customisable, or at least simplified. As it stands, the customer is presented with an invoice stating "All_In_One_Shipping:" and then the cost of the service they have chosen. It would be much better if it simply says “Shipping” instead of “All In One Shipping”, which is superfluous information, and potentially confusing to the customer. Link to comment Share on other sites More sharing options...
bsmither Posted August 4, 2020 Author Share Posted August 4, 2020 harris-organic said in the Github #1362: Quote Thanks, Brian, you are correct, the conversation requires updating for CC629. I have edited the three files with your code with no luck. ie the code made no difference to the shipping name on the order form. That's odd. Is the observed result as seen in an existing order, or in a newly created order? Specifically, do you see the name in the list of available shipping choices at checkout when the customer is making a purchase? Link to comment Share on other sites More sharing options...
harrisorganic Posted August 5, 2020 Share Posted August 5, 2020 Before the changes I would get All_In_One_Shipping on the emailed receipt and after the changes in a newly created order, I get AIOS without the "under scores" on the emailed receipt. In the shopping basket, in the drop down menu of Select your shipping method:, the wording after code changes is "All In One Shipping", no underscores. I use this line of code in module.definitions.xml <string name="ship_method_name"><![CDATA[Shipping via]]></string> I have not seen "Shipping via" in the drop down menu or anywhere else. Link to comment Share on other sites More sharing options...
bsmither Posted August 5, 2020 Author Share Posted August 5, 2020 The instructions above say to add this: <string name="ship_method_name"><![CDATA[Name to show as shipping method]]></string> The "Name to show as shipping method" is NOT an instruction for you to change to whatever desired. This actual phrase will appear on the admin's settings screen for AIOS as a label for the nearby text entry field to inform the admin of the purpose for that field. Please check if you have these lines of code: https://github.com/cubecart/v6/commit/30bed42f9bee1e51c5e93fd7c0893a3acfe2cbae Link to comment Share on other sites More sharing options...
harrisorganic Posted August 6, 2020 Share Posted August 6, 2020 Ahhaa... I now find a place in the AIOS admin setting screen to add a name like " via Australia Post:" And this works on new orders. However the lines of code: https://github.com/cubecart/v6/commit/30bed42f9bee1e51c5e93fd7c0893a3acfe2cbae are not the same. My CC629 version of cart.class.php does not have line 936 $shipArray[$module['folder']] = $packages_with_tax; Link to comment Share on other sites More sharing options...
bsmither Posted August 6, 2020 Author Share Posted August 6, 2020 The statement you quoted should be in a red-ish color (as seen in the code changes page in the Github), immediately followed by a replacement statement in a green-ish color. You want to see the green-ish colored statement(s) in your code. Link to comment Share on other sites More sharing options...
havenswift-hosting Posted September 14, 2020 Share Posted September 14, 2020 So to clarify : version 6.2.9 core CubeCart along with version 1.0.19 of the AIOS plugin has this feature built in. I havent checked other shipping plugins, but would expect that these still need the work to be done Link to comment Share on other sites More sharing options...
bsmither Posted September 14, 2020 Author Share Posted September 14, 2020 The core code was changed in CC612, so upgrading past that will have the needed core code. Yes, the other shipping modules could/should implement this, for the sake of continuity. However, for a number of the modules, the folder name would suffice: UPS, USPS, AusPost, etc. Thus, not imperative for these modules. I recall one module that is hard-coded in the core codebase: Per_Category. This poses a problem for translating. Also, an alternate approach could use the module's language files: "module_title". Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.