getTrackingPopupurlByOrderId no funciona
-
16-10-2019 - |
Pregunta
Tengo este código.
<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>
Se supone que abrirá una ventana emergente con detalles de seguimiento. Pero no está funcionando. ¿Alguien puede decirme qué pasa?
tenga en cuenta 100000019
es mi identificación de pedido
Solución
El parámetro para getTrackingPopUpUrlByOrderId
debe ser la ID de orden real (no el incremento) o el $order
objeto en sí. Prueba esto en su lugar:
<?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>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange