Jump to content

[SOLVED] Unable to save account parsererror One Page Checkout


IeM

Recommended Posts

Prestashop 1.6.08

Custom Theme

quick-order page (One Step/Page Checkout)

friendly URLs

 

Hi,

This error occurs when a new customer is trying to checkout via the one page check out process.

 

They enter their account details for the New Account and press the Save button.

A popup opens with the following:

        TECHNICAL ERROR: unable to save account

        Details:
        Error thrown: [object Object]
        Text status: parsererror

 

If the user tries to save the form again he following error is displayed at the top of the page:

      There is 1 Error(s):

      1. An account using this email address has already been registered.

 

I have Developer debug activated but I can not see any extra information in this account, maybe due to it being AJAX, I'm not sure.

 

The new customer is viewable in the Admin->Customers table but the customer can not continue with the checkout as the Payment options are not displayed to them.

 

Also, the new customer does not receive an email from the system. I went into Admin->Advanced Parameters->Email and successfully sent a test email from there using the Test Email function.

 

I'm using an API for the shipping so can not yet test if there is an issue there yet at all because I do not know if the shipping options are not showing along with the payment options as this form short circuits or if there is an issue there as well.

 

FURTHER:

As the new customer was in the database I tried scrolling back up the checkout page and using the Already a Customer method. After entering the customers email and password I clicked the Login button and got the following error:

TECHNICAL ERROR: unable to send login informations

Details:
Error thrown: [object Object]
Text status: parsererror

 

After that I refreshed the page to find the customer now logged in with the API shipping and the payment options showing.

 

At the top of the page though Developer Debug displayed multiple times:

Notice: Undefined variable: ret_amount in /home/account/public_html/mysite.net/www/modules/auspost/auspost.php on line 1507

Notice: Undefined variable: ret_amount in /home/account/public_html/mysite.net/www/modules/auspost/auspost.php on line 1509

 

They refer to the API Australia Post module.

 

Thanks in advance for any help.

Edited by IeM (see edit history)
Link to comment
Share on other sites

Hi Nemo1,

Thanks for your assistance.

 

I found the js cart at /themes/dilecta/js/modules/blockcart/ajax-cart.js

 

But I haven't been able to find an error code that looks like what I'm after. I only found:

  • Impossible to add the product to the cart.....
  • ERROR: unable to delete the product...
  • alert(errors);

I ended up changing alert(errors); for alert(console.log); thinking that may be something like you were suggesting, however, it did not change the messages so there must be something else.

 

I'm not sure how to go from here.

 

Thanks

Link to comment
Share on other sites

Further issue:

If once logged in and checking out the user selects a different shipping option the following alert pops up:

TECHNICAL ERROR: unable to save carrier

Details:
Error thrown: [object Object]
Text status: parsererror

Link to comment
Share on other sites

Hi Vekia,

It is almost 1am and have work tomorrow.

 

I played with Firebug but I'm not really sure what I'm looking for. At the moment the error seems to only happen when adding a new account in the one page check out as the Shipping Module guys made a change which may have solved the selecting a shipping option problem (not sure).

 

I saw the following in Firebug but I doubt it is of any help. It was pointing to Jquery, or data passed to it anyway.

 

2
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
 
The site is www.advantagelife.net  and test accounts can be entered at the moment. I will be resetting the database once everything is working.
 
Need to get to bed now but thanks.
Link to comment
Share on other sites

Hi All,

Solved. Thank you for your help.

 

I believe it came down to AJAX with Jquery not being happy with some missing data.

 

Part of it was due to a problem with an API Shipping Module. When the module was fixed the second two alerts went which just left the first alert about creating the account. The site has an affiliate program attached and one of the links was broken which somehow caused the first alert. Once the link was corrected, the last alert went. I do not know how or why at this point, but there you go.

 

Thanks again. 

  • Like 1
Link to comment
Share on other sites

Hi Shaka,

I found that if there are any added variables such as an echo $_SESSION['xyz'] on the page or other unhandled data then the AJAX functions try to automatically process it, and as there are no matching columns in the database for the data, an Object alert is thrown.

 

At the moment I have an issue with a Prestashop integrated Blog causing an alert pop-up because not all the data in that module is handled correctly. 

 

Try looking for live data errors or extra fields etc on the page. I know this is not too helpful as I'm also blundering through this issue but I hope it is a start.

  • Like 1
Link to comment
Share on other sites

Prestashop 1.6.0.8

Hello Vekia,

I though that I had this sorted (alert popup on save new customer on one page checkout) but sort of while on the right track I'm stuck.

 

I have scripts to integrate Prestashop with the JAM Affiliate application which is in a shop sub directory. This all worked with Prestashop 1.5.

 

Looking at the browser console output as you suggested I got the following.

  1. Add product on home page OK

  2. Go the one page checkout:

    1. Error (refers to 2 elements): Blocked loading mixed active content "http://www.site.net/js/jquery/plugins/autocomplete/jquery.autocomplete.js"

    2. Warnings:

      1. Loading mixed (insecure) display content on a secure page "http://www.site.net/modules/blockcopyright/payments.png"

      2. Invalid App Id: Must be a number or numeric string representing the application id.

      3. all.js#xfbml=1 (line 54) FB.getLoginStatus() called before calling FB.init().

  1. Enter new customer details and click Save:

    1. No error shows up BUT

    2. In the POST Responce:

      "<br />
      <b>Notice</b>: Undefined index: iemIdCustomer in <b>/home/xxx/public_html/site.net/www/iem_classes/jamTrackingLogAdd.php</b> on line <b>20</b><br />
      <br />
      <b>Notice</b>: Undefined index: sessReferrerId in <b>/home/xxxx/public_html/site.net/www/iem_classes/jamTrackingLogAdd.php</b> on line <b>25</b><br />
      <br />
      <b>Notice</b>: Undefined index: sessReferrerId in <b>/home/xxxxx/public_html/site.net/www/iem_classes/jamTrackingLogAdd.php</b> on line <b>26</b><br />
      referrerId NOT set, has to use session </br>"

      So the problem is that I have iemIdCustomer and sessReferrerId (used twice) which I require for my integration but it looks like the form wants to submit the values to the Customer table where there are no columns for them.

      These two variables are session vars.
       

Do you think this is what is causing the Alert on new customer save? Site used DB sessions.

 

If so, do you know what to do to make the form save ignore them or other solution. A hack would be to add them to the table but that is not a real solution.

 

FURTHER

 

I commented the two session variables out of the script to see what would happen.

 

The alert did not pop up but I got the following error:

 
TypeError: jsonData is null

if (jsonData.hasError)

 

// Clean the last &
            params = params.substr(0, params.length-1);
            
            $.ajax({
                type: 'POST',
                headers: { "cache-control": "no-cache" },
                url: callingFile + '?rand=' + new Date().getTime(),
                async: false,
                cache: false,
                dataType : "json",
                data: 'ajax=true&'+params+'&token=' + static_token ,
                success: function(jsonData)
                {
                    if (jsonData.hasError)
                    {
                        var tmp = '';
                        var i = 0;
                        for(var error in jsonData.errors)
                            //IE6 bug fix
                            if(error !== 'indexOf')
                            {
                                i = i+1;
                                tmp += '<li>'+jsonData.errors[error]+'</li>';
                            }
                        tmp += '</ol>';
                        var errors = '<b>'+txtThereis+' '+i+' '+txtErrors+':</b><ol>'+tmp;
                        $('#opc_account_errors').slideUp('fast', function(){
                            $(this).html(errors).slideDown('slow', function(){
                                $.scrollTo('#opc_account_errors', 800);
                            });                            
                        });    
                    }

[code]

 

Thanks again,

Edited by IeM (see edit history)
Link to comment
Share on other sites

hello

 

I have similar problem, I have comunicate

TECHNICAL ERROR: unable to save account

Details:
Error thrown: [object Object]
Text status: parsererror

 

when register new client in checkout basket (quick order)

 

Warning: touch(): Utime failed: Brak dostępu in /home//domains/public_html/classes/Tools.php on line 2929
{"hasError":false,"errors":[],"isSaved":true,"id_customer":16,"id_address_delivery":19,"id_address_invoice":19,"token":"552d2ae4ad55b5fbf1d5657807a926de"}

Edited by ziemowit (see edit history)
Link to comment
Share on other sites

hello

here is a part of stackoverlow answers:

 

 

It seems that the permissions on the directory are not the problem, rather the "access-" . session_id() seems to already exist and it's permissions are so that the PHP process can't change it's Utime. Check if the file "access-" . session_id() exist, if so remove it and run the script. If you do not receive an error check if the file "access-" . session_id() was created and what it's permissions are. If they are not correct try to chmod the file directly after creating it with touch.
Link to comment
Share on other sites

Hello Vekia,

Due to the server PHP upgrade session wasn't working so I added a database session handler "adodb-session2".

 

I put echo session_id() in the script and the session ID it echos is different to the PHPSESSIONID shown by Firebug. I don't know if this means anything.

 

I searched for start_session() and changed two that i found to

if (!session_id()) {
   @session_start();
}

[code]

 

The good news is that the new account now works in the checkout page :-) although the focus after submitting the account is WAY too low down the page (maybe a theme issue).

 

However, now I have other problems after doing the above that I did not have before. When I add a product to the cart I get an alert "Impossible to add the product to the cart.".

 

Also when you try to remove something from the cart you get an alert "ERROR unable to delete product".

 

I'm still tail chasing.

Link to comment
Share on other sites

Update,

 

Thank you again Vekia.

 

It seems that when I added the echo session_id() I then created the new problem in regards to adding product to the cart. Once I removed that, all seems at this point to be ok.

 

I'll soon try adding the Blog back in to see what issues it adds.

 

With this application you have to be very careful as to how you add extra variables to pages and how and what you echo. Introduced variables can be collected by AJAX processes and have no where to go in regards to no allocation even if you do not mean them to be collected. This has been the cause of a few issues I've had as I used them to integrate another app. and some of the variables came from added modules.

Link to comment
Share on other sites

  • 2 months later...

Hi

 

I think Im experiencing the same problem.

 

once seen this error:

TECHNICAL ERROR: unable to send login informations

Text status: parsererror

 

now i cant add to basket

and my costumers cant login to their account

 

im totally lost in this problem as im new in Prestashop.

howto track the error Down? is there any known fix?

 

Thanks :)

Edited by michaelhjulskov (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

I have try to download 

 

Hi Nemo1,

Thanks for your assistance.

 

I found the js cart at /themes/dilecta/js/modules/blockcart/ajax-cart.js

 

But I haven't been able to find an error code that looks like what I'm after. I only found:

  • Impossible to add the product to the cart.....
  • ERROR: unable to delete the product...
  • alert(errors);

I ended up changing alert(errors); for alert(console.log); thinking that may be something like you were suggesting, however, it did not change the messages so there must be something else.

 

I'm not sure how to go from here.

 

Thanks

 

Hi, I try testing and it's seem OK fix the problem, please try...

 

Step 1. download /themes/yourthemename/js/modules/blockcart/ajax-cart.js

Step 2. open file : ajax-cart.js (around row 423)

Step 3. to change alert(errors); to alert(console.log); 

Step 4: after edit, then upload back the ajax-cart.js file

Thanks!

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

I have try to download 

 

 

Hi, I try testing and it's seem OK fix the problem, please try...

 

Step 1. download /themes/yourthemename/js/modules/blockcart/ajax-cart.js

Step 2. open file : ajax-cart.js (around row 423)

Step 3. to change alert(errors); to alert(console.log); 

Step 4: after edit, then upload back the ajax-cart.js file

Thanks!

 

This is a hard one to get rid of. I have even changed every alert in that file, but nothing changed.

Still that popup error when customers register.

 

Any ideas are welcome...

Link to comment
Share on other sites

Just now it strikes me that as total newbie in presta i removed some blockcart, authblock or something like that in the positions settings. could this be the reason for this ajax isnt getting a usefull answer. 


 


Could the fix be for me to add some of those positions that I deleted happily stupid (at that time I remember thinking : I dont need this cart in all these positions)


If Im right, how can I find a resupe / guide to restore the core positions?


Link to comment
Share on other sites

 

Just now it strikes me that as total newbie in presta i removed some blockcart, authblock or something like that in the positions settings. could this be the reason for this ajax isnt getting a usefull answer. 

 

Could the fix be for me to add some of those positions that I deleted happily stupid (at that time I remember thinking : I dont need this cart in all these positions)

If Im right, how can I find a resupe / guide to restore the core positions?

 

 

Hej Michael

 

So you still have the same error popup, I asume. I think I might also have removed things like that. Or less is known to create errors of unknown source.

 

I will just have to kill that popup today. Going online tomorrow with this new 1.6 shop.

Problem is, that when it is closed, and saved again to finish, message to customer is, that someone is already registered with that mail.

And we will certainly get no orders at all, until this is solved.

 

A shop system like Prestashop has become great, but enourmously complex. It helps to be a super-developer not to mess anything up.

Edited by joergenaj (see edit history)
Link to comment
Share on other sites

Okay maybe we can help each other to create a checklist that we can go through:

 

1. Which positions should always be present in PS 1.6 for cart and login to work like it should

2. how could we rule out the possibility that its a cache problem . testing with and without. (i found this but dont quiet understand it fully)

3. try to summ all the error messages we have encountered and where they appeared

4. find other patterns

5. something went wrong installing/removing modules - maybe some overridden files got deleted, that was shared by two modules. That is a possible scenaio.

 

Lets start envestigation with Positions as the primary suspect :) Okay?

Do you have suggestion how to find that list of core posistions that should always be there.

Maybe You can quickly run a fresh install and copy the Positions available from a fresh install? Or we coul look inside the Prestashop demo?

What do you think?

Edited by michaelhjulskov (see edit history)
Link to comment
Share on other sites

Yes. We can try. But someone might change this thread to UNSOLVED.

 

I have disabled all cache and:

DEBUG MODE

Disable non PrestaShop modules, Disable all overrides
No luck here.
 
I am constantly deleting test customer, to create new, to see if the error goes away. Tiresome job, but neccesary.
 
Trying to get rid of the error popup, to see if orders can be finished then.
 
Then I will look at the positions. But I think it will be more a shot in the dark here.
Edited by joergenaj (see edit history)
Link to comment
Share on other sites

That file theme/js/modules/blockcart/ajax-cart.js does nothing. I can delete it.

It is niether the /modules//blockcart/ajax-cart.js

So maybe it is governed by higher one. 

 

But anyway, I am just dropping OPC, and use 5 step checkout. That works. Maybe because it does not use the Ajax, that is troubling so often.

What about you Michael?

Edited by joergenaj (see edit history)
Link to comment
Share on other sites

OK. It is very interresting and creative. But I think sometimes it is time to move on. There are other issues that I have posted on, but no one seem to be able to help with. For example that Danish special characters are lost in the back office. 

It has taken me more than a week for sure to set the new 1.6 up, That is because I like it to be really customized and easy for customers. 

 

But I am listening here. I hope someone drop in with a solution for us. 

Edited by joergenaj (see edit history)
Link to comment
Share on other sites

Which OPC did you use?

Maybe we had same module installed.

 

First I had Transformer Theme's OPC - already then (i think after about a week or so) I experienced this issue first time.

(the positions I deleted around this time)

By the way I can recommend Transformer Theme - great!

 

Next I tried Advanced Checkout Module - that module was so full of issues and the support wasnt there, and I had to remove it manually.

 

A few days ago I have installed One Page Checkout - this one is really great module and support is very PRO - I can recommend this one.

Edited by michaelhjulskov (see edit history)
Link to comment
Share on other sites

That's what often happens. I have set up a shop for my brother also, and he had terrible problems with a OPC module. I have been a developer for more than a decade, but would not do shop systems like this for a living. 

I think I will try this cheap one though: http://addons.prestashop.com/en/checkout-modules/17233-one-page-checkout-16-pro-version.html But it seems the demo is not using it anymore...

Edited by joergenaj (see edit history)
Link to comment
Share on other sites

I can really recommend the One Page Checkout. its not cheap but its well written and the support helping me with css conflicts and other cool stuff and even the suggestions i have is being implemented. You should really priority on the checkout. Its VERY important if you have a serious shop. very under valued part. you must test in all devices and with all sort of behaviour your checkout, before you spend a dime on marketing.

 

But I think nomatter which OPC module you buy, you will still have the issue, cause its caused by something else. not the OPC (i think)

Link to comment
Share on other sites

Seems 

 

here is the one i bought and recommend

http://addons.prestashop.com/en/checkout-modules/6841-one-page-checkout-for-prestashop.html

 

I dont understand the last line you write :)

Seems great. I have a very simple setup, free shipping For Denmark, and just a few other shipping prices. Maybe too overkill for me.

Actually I think that 5 steps is easier to overview thatn this opc where the customer can get overwhelmed by seeing everything at once.

 

What I meant, was that if you have problems with opc, then this module should override the error for you?

Edited by joergenaj (see edit history)
Link to comment
Share on other sites

Yes, we have to do it so others can learn from our mistakes and findings ;)

 

It takes eons of time to try and debug al these errors.Life passes by somhow. I also have to learn to let it go, or find another solution. It's bedtime long ago.

I just got shipping for different sones to work. But can not make a special shipping for Denmark. There should be a way. I tried to make Denmark a zone. 

 

But pardon me, we have to stick to the thread.

Link to comment
Share on other sites

MY SOLUTION

I read surprisingly wise words, that many bugs and running into closed doors, come from simply the fact that we as amature developers have turned on error debugging all the time.

In the file \config\defines.inc.php

set

define('_PS_MODE_DEV_', true);

to

define('_PS_MODE_DEV_', false);

I recommend only to use debug for short testings, only when necessary.

Edited by joergenaj (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

MY SOLUTION

I read surprisingly wise words, that many bugs and running into closed doors, come from simply the fact that we as amature developers have turned on error debugging all the time.

In the file \config\defines.inc.php

set

define('_PS_MODE_DEV_', true);

to

define('_PS_MODE_DEV_', false);

I recommend only to use debug for short testings, only when necessary.

 

 

Thank for your answer, it solves checkout problem.

BUT if a set _PS_MODE_DEV_ to OFF, my WebService stop working.
How can i solve it ?
Link to comment
Share on other sites

  • 2 months later...

Try remove cookies and if its still there, i dont know.

And I moved to lighttpd server, and for some reason i havent seen this issue since.

 

I suspect in fact issue could be caused when cart/address/customer have been deleted in db. later when customer come back, with his old cookie, the cookie is used for lookup, and it creates some conflict. So maybe a possible fix would be for system to delete cookie if its having any id's that doesnt exist in db.

Link to comment
Share on other sites

×
×
  • Create New...