ciao a tutti
ho una difficoltà.
dovrei inserire un pixel tracking all'interno del file "success.phtml".
Il codice è il seguente, ma non riesco a richiamare le variabili di order_id e subtotale.
<iframe src="https://tbs.tradedoubler.com/report?organization=0000000&event=000000&ordernumber={{var order_increment_id}}&orderValue={{var order_subtotal_incl_tax}}¤cy=EUR&tduid=TDUID&type=iframe" width="1" height="1" frameborder="0" /iframe>
sapreste aiutarmi con il codice? sicuramente sbaglio a richiamare le variabili.
grazie mille per l'aiuto.
Hello @iGniTioN3D
please check below code
<?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $orderData = $objectManager->create('Magento\Sales\Model\Order')->loadByIncrementId($block->getOrderId()); ?> <iframe src="https://tbs.tradedoubler.com/report?organization=0000000&event=000000&ordernumber=<?php echo $block->getOrderId();?>&orderValue=<?php echo $orderData->getGrandTotal();?>¤cy=EUR&tduid=TDUID&type=iframe" width="1" height="1" frameborder="0" /iframe>
using object manager not a good idea, for quick answer i did it
you can follow below url
https://magento.stackexchange.com/questions/116914/magento-2-get-order-total-on-success-page
Hope it will help you, if help you then mark as a solution.
@Sunil Patel many thanks.
I don't know if it works on magento 1.9.3.
I try and tell you.
thank you very much for helping.