Jump to content
Sign in to follow this  
bsmither

All in One Shipping Module Gets a Custom Name

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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):

Sort.PNG.0b820b840c8184796138b4575321d4a5.PNG

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...