我有这个代码。

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

它应该打开带有跟踪细节的弹出窗口。但是它不起作用。有人可以告诉我怎么了吗?

请注意 100000019 是我的订单ID

有帮助吗?

解决方案

参数 getTrackingPopUpUrlByOrderId 必须是真实订单ID(不是增量)或 $order 对象本身。反试试:

<?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>
许可以下: CC-BY-SA归因
scroll top