getTrackingPopUpUrlByOrderId not working
-
16-10-2019 - |
سؤال
I have this code.
<a href="#" id="linkId" onclick="popWin('<?php echo $this->helper('shipping')->getTrackingPopUpUrlByOrderId(100000019) ?>','trackshipment','width=800,height=600,resizable=yes,scrollbars=yes')" title="<?php echo $this->__('Track this shipment') ?>"><?php echo $this->__('Track this shipment') ?></a>
It is supposed to open a popup with tracking details. But its not working. Can someone tell me whats wrong?
Please note 100000019
is my order id
المحلول
The parameter for getTrackingPopUpUrlByOrderId
must be the real order id (not the increment) or the $order
object itself. Try this instead:
<?php $order = Mage::getModel('sales/order')->loadByIncrementId(100000019)?>
<a href="#" id="linkId" onclick="popWin('<?php echo $this->helper('shipping')->getTrackingPopUpUrlByOrderId($order) ?>','trackshipment','width=800,height=600,resizable=yes,scrollbars=yes')" title="<?php echo $this->__('Track this shipment') ?>"><?php echo $this->__('Track this shipment') ?></a>
لا تنتمي إلى magento.stackexchange