php 谷歌标签订单转换

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 谷歌标签订单转换相关的知识,希望对你有一定的参考价值。

<?php
class OrderConfirmationController extends OrderConfirmationControllerCore
{

    /**
     * Assign template vars related to page content
     * @see FrontController::initContent()
     */
    public function initContent()
    {


        global $cookie;
        $cmspage = new CMS(34, intval($cookie->id_lang));
        if (Validate::isLoadedObject($cmspage))
          $this->context->smarty->assign('cmspage', $cmspage->content);

      parent::initContent();
      $order = new Order($this->id_order);
      $customer= new Customer ($order->id_customer);
      $this->context->smarty->assign(array(
          'id_order' => $this->id_order,
          'order' => $order,
          'customer' => $customer,
          'reference_order' => $this->reference,
          'id_order_formatted' => sprintf('#%06d', $this->id_order),
          'total_to_pay' => $order->getOrdersTotalPaid()
      ));
      $this->setTemplate(_PS_THEME_DIR_.'order-confirmation.tpl');
    }

}
<?php
// in /override/controllers/front

class OrderConfirmationController extends OrderConfirmationControllerCore
{
    /**
     * Assign template vars related to page content
     * @see FrontController::initContent()
     */
    public function initContent()
    {
        //// google adwords conversion / dyn remarketing ////
        $order = new Order($this->id_order);
        $currency = new Currency($order->id_currency);
        $this->context->smarty->assign(array(
          'products'=> $order->getProducts(),
          'total_to_pay'=>$order->getOrdersTotalPaid(true),
        'orderCurrency' => $currency->iso_code,
        'id_order' => $this->id_order
        ));
        //// google adwords conversion / dyn remarketing ////
        parent::initContent();
    }

}

以上是关于php 谷歌标签订单转换的主要内容,如果未能解决你的问题,请参考以下文章

PHP PHP货币转换器(谷歌版)

如何在谷歌应用脚​​本中将段落 html 字符串转换为没有 html 标签的纯文本?

php生成唯一订单号 时间戳可以吗

通过谷歌标签管理器或通过PHP自定义像素Woocommerce集成

PHP将纯文本转换为标签链接

我如何获得谷歌退款订单?