Usually you will see... £1.xx (Royal Mail) or similar and it's the last part (Royal Mail) that this hack deals with...
The actual code used is in the "includes/classes/class.shipping.quote.php" file
This function:
Code: Select all
function getdesc($include_shipper_name=false)
{
// Hack for Intershipper and FedEx
$this->_desc = str_replace("FedEx FedEx", "FedEx", $this->_desc);
$this->_desc = str_replace("FedEx FDX", "FedEx", $this->_desc);
if($this->_desc != "") {
if($include_shipper_name) {
return sprintf("%s (%s)", $this->_shippername, $this->_desc);
}
else {
return $this->_desc;
}
}
else {
return $this->_shippername;
}
}
Code: Select all
if($include_shipper_name) {
return sprintf("%s (%s)", $this->_shippername, $this->_desc);
}
Code: Select all
return sprintf("%s (%s)", $this->_shippername, $this->_desc);
Code: Select all
return sprintf("%s: %s", $this->_shippername, $this->_desc);
Alternatively if you wanted to reduce "Royal Mail" down to "RM" you would need to edit the whole code nugget from this:
Code: Select all
// Hack for Intershipper and FedEx
$this->_desc = str_replace("FedEx FedEx", "FedEx", $this->_desc);
$this->_desc = str_replace("FedEx FDX", "FedEx", $this->_desc);
if($this->_desc != "") {
if($include_shipper_name) {
return sprintf("%s (%s)", $this->_shippername, $this->_desc);
}
Code: Select all
// Hack for Intershipper and FedEx
$this->_desc = str_replace("FedEx FedEx", "FedEx", $this->_desc);
$this->_desc = str_replace("FedEx FDX", "FedEx", $this->_desc);
// Hack for RoyalMail
$this->_desc = str_replace("Royal Mail", "RM", $this->_desc);
if($this->_desc != "") {
if($include_shipper_name) {
return sprintf("%s: %s", $this->_shippername, $this->_desc);
}
.. instead of:RM: First Class £1.62
Royal Mail (First Class) £1.62
Hopefully that makes sense...