getTrackingPopUpUrlByOrderId ne fonctionne pas
-
16-10-2019 - |
Question
Je le 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>
Il est censé ouvrir une fenêtre contextuelle avec les détails de suivi. Mais sa ne fonctionne pas. Quelqu'un peut-il me dire ce qui est erroné?
S'il vous plaît noter 100000019
est mon id
La solution
Le paramètre pour getTrackingPopUpUrlByOrderId
doit être le vrai numéro de commande (et non l'incrément) ou l'objet $order
lui-même. Essayez ceci:
<?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>
Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange