ajensen27 Posted March 31, 2014 Share Posted March 31, 2014 Hello, Can someone please help me with how I can pass the order ID, order total, and zip code through my bizrate code? Thanks! Link to comment Share on other sites More sharing options...
PascalVG Posted March 31, 2014 Share Posted March 31, 2014 Hi AJensen, do you have some more background info about this bizrate code? How should it look like in total, where do you want this code be displayed or exported? Please elaborate... pascal. Link to comment Share on other sites More sharing options...
ajensen27 Posted March 31, 2014 Author Share Posted March 31, 2014 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 More sharing options...
PascalVG Posted March 31, 2014 Share Posted March 31, 2014 In which file do you want to put this code, or on what page do you want to show this/export this? Link to comment Share on other sites More sharing options...
ajensen27 Posted March 31, 2014 Author Share Posted March 31, 2014 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 More sharing options...
PascalVG Posted March 31, 2014 Share Posted March 31, 2014 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 1 Link to comment Share on other sites More sharing options...
ajensen27 Posted April 1, 2014 Author Share Posted April 1, 2014 Looks like it worked!! Thank you so much Pascal! I really appreciate it. Link to comment Share on other sites More sharing options...
PascalVG Posted April 1, 2014 Share Posted April 1, 2014 Good to hear! I'll mark the topic as solved then. Happy selling, pascal Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now