Jump to content

[solved] Messed up site inserting google analytics code...


Recommended Posts

Hello to all! :)

 

I have some major problems with my ecommerce that I just can not solve!

 

1) If I add products to your cart, they, in fact, are not added.

 

2) If I open the page "My Account" or the page of "log in", what seems to me to have blank pages.

 

I just can not figure out where the problem is!

 

I hope someone can help me, since the assistance of the theme is not felt ...

 

 

 

Thank you all and see you soon! :)

Link to comment
Share on other sites

Thanks for the reply! :)

 

First, i suggest you to modify your article that regarding the activation of the "error reporting". There's a small mistake in the name of the category where the file is located, like reported in the comments by a visitor ... :)

 

However... i have activated this function (and thank you for letting me know) and the error that appear in the "my-account" page, "log-in" page and also in the "contact form" page, is this:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/jodcoryq/store/index.php:12) in /home/jodcoryq/store/classes/Tools.php on line 108

 

Another error appear in the Home Page, and is this:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/jodcoryq/store/index.php:12) in /home/jodcoryq/store/classes/controller/FrontController.php on line749

 

I'm not practical in the php coding, therefore i'm not understand what these errors mean exactly!

 

Thanks for the help and for the reply! :)

 

 

 

P.S. = Sorry for the incorrect english... i'm italian and i like to write by my knowledge for learn better :)

Link to comment
Share on other sites

i forgot...

 

When i add to cart a product, appear me a page of browser that report this error:

 

 

 

Impossible to add the product to the cart.

 

textStatus: 'parsererror'

 

errorThrown: 'SyntaxError: Unexpected token <'

responseText:

<script>

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)

})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

 

ga('create', 'UA-36488496-4', 'elettrarredo.net');

ga('send', 'pageview');

 

</script>

 

{

"products": [

{

"id": 1,

"link": "http://store.elettrarredo.net/lampade-da-scrivania-tradizionali/1-lampada-da-scrivania-architetto.html#/colore-argento",

"quantity": 1,

"priceByLine": "14,00 €",

"name": "Lampada da S...",

"price": "14,00 €",

"price_float": "11.57",

"idCombination": 21,

"idAddressDelivery": 0,

"is_gift" : 0,

"hasAttributes": true,

"attributes": "Argento",

"hasCustomizedDatas": false,

"customizedDatas":[

]

}],

"discounts": [

],

"shippingCost": "8,50 €",

"shippingCostFloat": "8.5",

"wrappingCost": "0,00 €",

"nbTotalProducts": "1",

"total": "22,50 €",

"productTotal": "14,00 €",

"hasError" : false

 

Here, the code has been truncate because it's so long...

 

My store it's in a seriously bad state... :(

Link to comment
Share on other sites

ops! my bad, that's right

i will change it as soon as possible, thanks for your attention.

 

error code that you mentioned:

Warning: Cannot modify header information - headers already sent by (output started at /home/jodcoryq/store/index.php:12) in /home/jodcoryq/store/classes/Tools.php on line 108
is only warning, warnings dont "crash" the webiste, so the problem is somewhere else.

 

it looks like the problem is related to the google analytics module / code

can you for test purposes disable this addon / remove the ganalytics code?

Link to comment
Share on other sites

Yahooooooo

 

The problem it's solved before i have cancelled the analytics code!! I'm very happy! :)

 

Where i past the analytics code, for don't have any problems ??

 

 

Thanks Thanks Thanks

 

 

:) :) :) :) :)

Link to comment
Share on other sites

In the "index.php" file of site that is located in the path "/".

 

I have pasted the code before of the "<?php" tag

 

I have just tried to paste the code between an "<html></html>" tags, but the problem is the same.

 

The curious thing it's that i have pasted the code some days ago, and all worked fine... only in the latest days the problem is occurred...

Link to comment
Share on other sites

Oooooooh.. Thank You so much! I knew nothing of this module....it works perfectly!

 

Can you rename this topic with [solved] ???

 

Thanks at all!

 

yes, I will mark as solved. btw: if at all possible and before doing so, do NOT change ps files manually...this will/did cause you lost time...and can mess you up when you want to upgrade to latest cool ps features which are in the works.

 

suerte

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...