1

您好我正在尝试将 Nextag 的 Nextag ROI 优化器代码安装到我的 woocommerce 主题/插件中。(thankyou.php 模板)它正在工作,但我无法摆脱最终输出中的 # 符号。如果包含 # 符号,Nextag 统计信息将不会显示我的订单号。(至少这是我的工作理论,因为我的订单号不会填充。)

所以它在报告时返回 #1234 而不是 1234。我怎样才能摆脱这种情况,以便获得适当的报告。问题中的一个变量或函数是“var order”

一旦这个问题得到回答,我相信我也可以为所有其他具有免费跟踪器的 PPC 引擎执行此操作,并且您将来会得到更多帮助。

如果我的术语不足,我很抱歉,因为我不是任何类型的程序员。

请注意,当我查看源代码时它正在工作,只是我需要摆脱订单号中的#。

感谢您的时间。

   <!--
    /* NexTag ROI Optimizer Data */
    var id = 'hidden';
    var rev = '<?php echo $order->order_total; ?>';
    var order = '<?php echo $order->get_order_number(); ?>';
//-->
</script>
<script type="text/javascript" src="https://imgsrv.nextag.com/imagefiles/includes/roitrack.js"></script>
4

1 回答 1

1

The guys at woothemes helped me out. So to make the Nextag ROI optimizer work with woocommerce you need to go to the thankyou.php and add this code right below <p><?php _e('Thank you. Your order has been received.', 'woocommerce'); ?></p> Make sure ####### is your unique merchant ID with nextag.

If you do not know how to change the thank you php you can use notepad.exe stock with windows or open it with a free editor called notepad++ which is what I used. Then you can overwrite the old thankyou.php OR copy the PHP to the area that allow you to protect changes.(outside of the scope of this answer) You should know that if the woocommerce plugin is updated you will have to reload the code back into thankyou.php.

Your snippet is below have fun.

  <script type="text/javascript">
<!--
    /* NexTag ROI Optimizer Data */
    var id = '#######';
    var rev = '<?php echo $order->order_total; ?>';
    var order = '<?php echo $order->id; ?>';
//-->
</script>
<script type="text/javascript" src="https://imgsrv.nextag.com/imagefiles/includes/roitrack.js"></script>

It should also be said that this code can be enhanced further to contain other product data. So if know know those pieces and can really trick this code out. Post it!

于 2012-11-03T22:38:20.863 回答