Default Magento settings allow users to track their order status only directly from their user account. But sometimes it is required to allow users to get updated information about the location and status of the order without the necessity to log into the account, just by entering the order reference number and email address on a website.
To implement this, it is possible to extend the standard helper Mage_Shipping_Helper_Data and add the verification of the following conditions:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
class Belvg_Ordertracking_Helper_Tracking extends Mage_Shipping_Helper_Data { public function getTrackingServices($email, $orderID) { $_order = Mage::getModel('sales/order')->loadByIncrementId($orderID); ; if (!$_order) { return array(); } if (Mage::helper('ordertracking')->showEmail()) { if ($_order->getCustomerEmail() != $email) { return array(); } } else { if ($_order->getCustomerEmail() != Mage::helper('ordertracking')->getCustomerEmail()) { return array(); } } if ($_order->getStatus() != 'complete') { return array(); } $return = array(); if ($_order->hasShipments()) { foreach ($_order->getTracksCollection() as $_shipping) { if ($_shipping['carrier_code'] == 'custom' || $_shipping['carrier_code'] == '') { return array(); } $_item = new Varien_Object(); $_item->setCode($_shipping->getCarrierCode()); $_item->setTitle($_shipping->getTitle()); $_item->setTrackNumber($_shipping->getTrackNumber()); $_item->setUrl($this->getTrackingPopupUrlBySalesModel($_shipping)); $return[] = $_item; } } return $return; } } |
In addition create a separate page with this functionality.
Partner With Us
Looking for a partner to grow your business? We are the right company to bring your webstore to success.
Talk to Andrey
I given a correct order number and email id but showing this message only
Tracking Number(s) Not Found!
Tracking number not found.
Great Job! Thank you very much. Worked smoothly.
Hi,
I given a correct order number and email id but showing this message only
Tracking Number(s) Not Found!
Tracking number not found.
how to fix this one .. please share to me
hi
i given a correct order number and email ,but showing the error message how to fix that issues please share me ….@Aleksander Tretjak
Hi,
I given a correct order number and email id but showing this message only
Tracking Number(s) Not Found!
Tracking number not found.
how to fix this one .. please share to me
Dushyant Joshi,
Go to System -> Configuration and find BelVG there.
Can not find the configuration at admin
Vineet,
You need to log out and log in again into the admin panel after the installation.
Hi,
I tried to install this module but its not getting activated. When i try to enable this module, its giving me an error of 404.
Jason,
You also need to enable the module in Configuration in Magento admin panel.
I uploaded the files from Github to the app folder on my Magento CE v1.9.1.0 site. My question is what is the url to the page that would have the order tracking? I tried going to
mydomain.com/ordertracking/tracking/index/ however that brings me to a 404 ?
I am using a theme (not sure if that matters). But I copied the files that where in the app/design/frontend/base/default into my app/design/frontend/My_Theme/default/ directory.
Not sure if that makes a difference.
Any suggestions?
thanks!!
Dann,
your domain/ordertracking/tracking/index/
JD,
Maybe you need to clean the cache via FTP access. You can also rename the cache folder into cache_old. It is also possible that the code compilation is turned on in this case you need to access via ssh to upgrade compiled files to the shell folder in the root of the site.
Hi I’m new to magento coding, how would I call this into a page?
Hi please help me! I tried installing this, then I couldn’t access the admin configuration, I removed the files now I can’t access the admin panel, I get following error:
Warning: include(Belvg/All/Model/Observer.php) [function.include]: failed to open stream: No such file or directory in /home/domain/public_html/lib/Varien/Autoload.php on line 93
Trace:
#0 /home/domain/public_html/lib/Varien/Autoload.php(93): mageCoreErrorHandler(2, ‘include(Belvg/A…’, ‘/home/domain/p…’, 93, Array)
#1 /home/domain/public_html/lib/Varien/Autoload.php(93): Varien_Autoload::autoload()
#2 [internal function]: Varien_Autoload->autoload(‘Belvg_All_Model…’)
#3 [internal function]: spl_autoload_call(‘Belvg_All_Model…’)
#4 /home/domain/public_html/app/code/core/Mage/Core/Model/Config.php(1084): class_exists(‘Belvg_All_Model…’)
#5 /home/domain/public_html/app/Mage.php(319): Mage_Core_Model_Config->getModelInstance(‘belvgall/observ…’, Array)
#6 /home/domain/public_html/app/Mage.php(333): Mage::getModel(‘belvgall/observ…’, Array)
#7 /home/domain/public_html/app/code/core/Mage/Core/Model/App.php(1238): Mage::getSingleton(‘belvgall/observ…’)
#8 /home/domain/public_html/app/Mage.php(303): Mage_Core_Model_App->dispatchEvent(‘controller_acti…’, Array)
#9 /home/domain/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(454): Mage::dispatchEvent(‘controller_acti…’, Array)
#10 /home/domain/public_html/app/code/core/Mage/Adminhtml/Controller/Action.php(130): Mage_Core_Controller_Varien_Action->preDispatch()
#11 /home/domain/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(365): Mage_Adminhtml_Controller_Action->preDispatch()
#12 /home/domain/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(248): Mage_Core_Controller_Varien_Action->dispatch(‘index’)
#13 /home/domain/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#14 /home/domain/public_html/app/Mage.php(459): Mage_Core_Controller_Varien_Front->dispatch()
#15 /home/domain/public_html/index.php(76): Mage::run(‘domain’, ‘website’)
#16 {main}
Please help me!!
johnson,
I have updated the archive, please download it one more time the error should be solved.
i got this
There has been an error processing your request
Module “Belvg_Ordertracking” requires module “Belvg_All”.
Trace:
#0 E:\xampp\htdocs\indisgn\Package\Quickstart\app\code\core\Mage\Core\Model\Config.php(849): Mage::throwException(‘Module “Belvg_O…’)
#1 E:\xampp\htdocs\indisgn\Package\Quickstart\app\code\core\Mage\Core\Model\Config.php(812): Mage_Core_Model_Config->_sortModuleDepends(Array)
#2 E:\xampp\htdocs\indisgn\Package\Quickstart\app\code\core\Mage\Core\Model\Config.php(315): Mage_Core_Model_Config->_loadDeclaredModules()
#3 E:\xampp\htdocs\indisgn\Package\Quickstart\app\code\core\Mage\Core\Model\App.php(414): Mage_Core_Model_Config->loadModules()
#4 E:\xampp\htdocs\indisgn\Package\Quickstart\app\code\core\Mage\Core\Model\App.php(343): Mage_Core_Model_App->_initModules()
#5 E:\xampp\htdocs\indisgn\Package\Quickstart\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#6 E:\xampp\htdocs\indisgn\Package\Quickstart\index.php(87): Mage::run(”, ‘store’)
#7 {main}
Deb,
Please clarify what error did you get?
Getting error.
Module is missed.
Please give us complete module.
Cool… Just saved myself $50 from having to buy a module ;)