View Issue Details

IDProjectCategoryView StatusLast Update
0003492OXID eShop (all versions)1.03. Basket, checkout processpublic2012-12-10 13:23
Reporterjuergen_busch Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.6.0_beta2 
Fixed in Version4.6.0_beta3 
Summary0003492: No tracking code in "Ship Now" mail
Description"Ship Now" mail should contain the tracking code or the special tracking URL.

Example: OXID eFire sets the value of order field "Shipment Tracking Code" via shop call. If shop admin sends "Ship Now" mail to the customer, the mail should contain the tracking code or the special tracking URL.

Problem: the field "Shipment Tracking Code" can be used not only for DHL tracking. Should customer edit the mail template? Should we offer a separat mail template showing the DHL tracking code?
TagsOrder
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

ray

2012-01-16 08:18

reporter   ~0005606

Last edited: 2012-01-16 08:23

related to this one: https://bugs.oxid-esales.com/view.php?id=2164

Would be better to have at least one (better 3) additional field in backend where the user can put in the basic tracking link for his shipping carrier(s).

Please check this snippet in forums, which offers the possibility to use a bunch of different carriers:
http://www.oxid-esales.com/forum/showthread.php?t=12866#top
http://www.oxid-esales.com/forum/showthread.php?t=12866#post78777

By the way, it is not the worst alternative to set the basic tracking link within the delivery sets as suggested from dominik_ziegler in the other bug-entry, as normally a particular set is related to one carrier only.

arvydas_vapsva

2012-01-23 12:57

reporter   ~0005622

We would like not to include suggested solution in code, because it does not look universal and may not be accepted by all customers, also this makes us responsible for tracking delivery url changes. That is why we implemented nice getter in oxOrder::getShipmentTrackingUrl() and any module written by third party developer may solve problem.

Some notices

- suggested smarty solution is working, but most dirty - no possible way to override code and fix possible issues in future;
- someone disliked php solution, because it looks hard for them to program module, but in this case, especially when you see solution in forum its just..:

 - create file "modorder.php"
 - copy and paste this:
 
<?php
class modOrder extends modOrder_parent
{
    /**
     * Returns DPD shipment tracking url if oxorder__oxtrackcode is supplied
     *
     * @return string
     */
    public function getShipmentTrackingUrl()
    {
        if ( $this->_sShipTrackUrl === null && $this->oxorder__oxtrackcode->value ) {
            $sCarrier = substr($this->oxorder__oxtrackcode->value, 0, 3);
            $sTrackId = substr($this->oxorder__oxtrackcode->value, 3);
             
            switch ($sCarrier) {
                case "DHL":
                    $this->_sShipTrackUrl = "http://nolp.dhl.de/nextt-online-public/track.do?zip=".$this->oxorder__oxbillzip->value."&idc=".$sTrackId."&lang=de";
                    break;
             
                case "ILX":
                    $this->_sShipTrackUrl = "https://www.iloxx.de/net/popup/trackpop.aspx?id=".$sTrackId;
                    break;
             
                case "DPD":
                    $this->_sShipTrackUrl = "http://extranet.dpd.de/cgi-bin/delistrack?typ=1&lang=de&pknr=".$sTrackId;
                    break;
             
                case "GLS":
                    $this->_sShipTrackUrl = "http://www.gls-group.eu/276-I-PORTAL-WEB/content/GLS/DE03/DE/5004.htm?txtRefNo=".$sTrackId;
                    break;
             
                case "HMS":
                    $this->_sShipTrackUrl = "http://tracking.hlg.de/Tracking.jsp?TrackID=".$sTrackId;
                    break;
             
                case "UPS":
                    $this->_sShipTrackUrl = "http://wwwapps.ups.com/WebTracking/processRequest?HTMLVersion=5.0&Requester=NES&AgreeToTermsAndConditions=yes&loc=de_DE&tracknum=".$sTrackId;
                    break;
             
                default:
                    $this->_sShipTrackUrl = parent::getShipmentTrackingUrl();
                    break;
            }
        }
        
        return $this->_sShipTrackUrl;
    }
}

 - upload created file to server "modules\modorder" folder (you may need to create "modorder" folder);
 - go to admin > Master Settings > Core Settings > Modules and append text area with:
      oxorder => modorder\modorder

arvydas_vapsva

2012-01-23 12:57

reporter   ~0005623

p.s. template fix done