Jump to content

[SOLVED] Variables for Bizrate code


ajensen27

Recommended Posts

Thanks for the reply Pascal! Yes, the Bizrate code is below.

 

<!-- Start Bizrate POS Code --> 
<script language="JavaScript"> 
   var passin_x ='548px'; //comment out to default center or adjust horizontal position by pixel 
   var passin_y ='210px'; //comment out to default center or adjust vertical position by pixel 
   var orderId=''; 
// var z_index =''; //default 1,000,000 
   var cartTotal=''; 
   var billingZipCode='$postcode'; 
// Pass up to 5 products from customer shopping cart 
var productsPurchased= 'URL=^SKU=^GTIN=^PRICE=|URL=^SKU=^GTIN=^PRICE=|URL=^SKU=^GTIN=^PRICE=|URL=^SKU=^GTIN=^PRICE=|URL=^SKU=^GTIN=^PRICE='; 
</script> 
<script type="text/javascript" src="//eval.bizrate.com/js/pos_281238.js"> 
</script> 
<!-- End Bizrate POS Code -->
Link to comment
Share on other sites

Oh, sorry I didn't mention that. The code is placed on the order-confirmation.tpl page. I have it in there now and it's working it's just not passing any variables to them so that I can keep track of these things in their reporting on their side.

Link to comment
Share on other sites

Maybe try this:

In file: controllers/front/OrderConfirmationController.php  (Make backup, just in case!!)

Add the red code to the function initContent():

 

 

    public function initContent()
    {
        parent::initContent();

        $this->context->smarty->assign(array(
            'is_guest' => $this->context->customer->is_guest,
            'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(),
            'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn()
        ));

        $order = new Order($this->id_order);
        $invoice_address = new Address((int)$order->id_address_invoice);
        $customer_zipcode = $invoice_address->postcode;

        $this->context->smarty->assign(array(            
                        'order' => $order,
            'customer_zipcode' => $customer_zipcode,
            'order_total_paid'=> $order->total_paid
        ));



        if ($this->context->customer->is_guest)
...

 

 

And then use in themes/<your theme folder>/order-confirmation.tpl (make backup, just in case!!!)

something like :

 

<!-- Start Bizrate POS Code -->

<script language="JavaScript">
var passin_x ='548px'; //comment out to default center or adjust horizontal position by pixel
var passin_y ='210px'; //comment out to default center or adjust vertical position by pixel
var orderId={$order->id};
// var z_index =''; //default 1,000,000
var cartTotal={$order_total_paid};
var billingZipCode={$customer_zipcode};
// Pass up to 5 products from customer shopping cart
var productsPurchased= 'URL=^SKU=^GTIN=^PRICE=|URL=^SKU=^GTIN=^PRICE=|URL=^SKU=^GTIN=^PRICE=|URL=^SKU=^GTIN=^PRICE=|URL=^SKU=^GTIN=^PRICE=';
</script>
<script type="text/javascript" src="//eval.bizrate.com/js/pos_281238.js">
</script>
<!-- End Bizrate POS Code -->

 

 

Hope this works. Maybe some {literal}...{/literal}-s are needed, but try like this first)

 

pascal

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...