Errors with 3rd party tracking

  • Posts: 15
  • Thank you received: 0
10 years 4 months ago #163895

-- url of the page with the problem -- : neverhungover.com
-- HikaShop version -- : HikaShop Business: 2.3.1
-- Joomla version -- : 3.3.1.
-- PHP version -- : 5.4.29
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- :

"
Login
Address
Payment
End

Parse error: syntax error, unexpected '<' in /home/neverhun/public_html/templates/zo2_melano/html/com_hikashop/checkout/end.php on line 17"

I am using several different third party tracking systems for my store. I am supposed to put them only on the sale confirmation page. Every time I add any one of them, I get an error like the one above. How can I avoid this and just put these tracking systems on my site.

Here is an example of one of the conversion pixels:

<script language=javascript src=http://www.advconversion.com/ads-conversiontrack/conversion/track.do?type=html&advertiserId=66718></script>

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 4 months ago #163902

Hello,
Firstly, did you done some modifications through the "end" file of the "checkout" view of your front-end template via "Hikashop->Display->Views" ? If that's the case, can you remove them and test it again ?
Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 0
10 years 4 months ago #164166

Yes, I put the tracking code in both the "end" and "after_end" of my front end template. This is where the error came from. When I remove the tracking codes, it works fine, but it doesn't track what I need tracked.

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 0
10 years 4 months ago #164178

I'll go into more detail.

I have two tracking codes I need to install:

1) Advertise.com
<script language=javascript src=http://www.advconversion.com/ads-conversiontrack/conversion/track.do?type=html&advertiserId=66718></script>

2) Shopping.com
<script type="text/javascript">
var _roi = _roi || [];

// Step 1: add base order details

_roi.push(); // required
_roi.push(); // unique customer order ID
_roi.push(); // order total without tax and shipping
_roi.push(); // notes on order, up to 50 characters

// Step 2: add every item in the order
// where your e-commerce engine loops through each item in the cart and prints out _addItem for each
// please note that the order of the values must be followed to ensure reporting accuracy

_roi.push(['_addItem',
'', // Merchant sku
'', // Product name
'', // Category id
'', // Category name
'', // Unit price
'' // Item quantity
]);

// Step 3: submit transaction to ECN ROI tracker

_roi.push();
</script>
<script type="text/javascript" src=" stat.dealtime.com/ROI/ROI2.js "></script>



I have no idea why the Advertise.com code didn't work since it doesn't appear to have any variables. W/ the shopping.com I followed hints from your other posts here:
www.hikashop.com/support/forum/4-how-to/...omfirmaion-page.html
www.hikashop.com/forum/4-how-to/68067-tr...get-cart-values.html

With that information, I entered this which DID NOT WORK:

$app =& JFactory::getApplication();
$order_id = $app->getUserState(HIKASHOP_COMPONENT.'.order_id');
$orderClass = hikashop::get('class.order');
$order = $orderClass->get($order_id);

<script type="text/javascript">
var _roi = _roi || [];

// Step 1: add base order details

_roi.push(); // required
_roi.push(); // unique customer order ID
_roi.push(); // order total without tax and shipping
_roi.push(); // notes on order, up to 50 characters

// Step 2: add every item in the order
// where your e-commerce engine loops through each item in the cart and prints out _addItem for each
// please note that the order of the values must be followed to ensure reporting accuracy

_roi.push(['_addItem',
'', // Merchant sku
'', // Product name
'', // Category id
'', // Category name
'', // Unit price
'' // Item quantity
]);

// Step 3: submit transaction to ECN ROI tracker

_roi.push();
</script>
<script type="text/javascript" src=" stat.dealtime.com/ROI/ROI2.js "></script>



An actual document page on this topic would be very helpful rather than another forum topic.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 4 months ago #164171

Hi,

The view is containing PHP.
Please be sure that when you paste some HTML content, you're not in the PHP section, otherwise you will generate PHP fatal errors.

The best will be to put the content at the end of the view.
If the end of the view is containing some PHP, you can close the PHP block using

?>
and then paste your HTML content.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 0
10 years 4 months ago #164285

I realized there was no closing tag last night so, to make sure I didn't mess up the system, I put the tracking before the PHP and it worked!

Please Log in or Create an account to join the conversation.

Time to create page: 0.070 seconds
Powered by Kunena Forum