Jump to content

Cart problem on mobile site


Recommended Posts

Hello everyone I need a bit of advice if possible.

 

My cart is working fine on the full site but does not work on the mobile site.

 

At the mobile site if you add an item to the cart it does not go into the cart. If you then click on the cart the cart page does not load.

 

I am getting this error when I click the cart icon in the mobile site: "Uncaught Reference Error: countries is not defined"

 

Not sure what is causing this error as my address is filled out properly for my account. My country is enabled to purchase and of course everything works fine on the full site?

 

I tracked down this piece of code that is where I am hanging up with the mobile cart:

 

function updateState(suffix)
{
 $('select#id_state'+(suffix !== undefined ? '_'+suffix : '')+' option:not(:first-child)').remove();
 var states = countries[$('select#id_country'+(suffix !== undefined ? '_'+suffix : '')).val()];

 

Does anyone have any suggestions why the mobile cart would hang up and throw this error while the full site works okay? If it helps you to take a look you can find the site at probty.com

 

Any help would be greatly appreciated on this one I am out of guesses and have tried everything I can think of. :rolleyes:

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

  • 2 weeks later...

Nick several of us have this problem but cannot get any help at all. I have asked for help here now several times and have never gotten a response yet. I never knew any open source to not have community support until now so it seems really weird to me. Maybe you will have better luck than myself and others getting help on this problem? I sure hope so as open source with no community support is a type of thing I never would understand I suppose.

Link to comment
Share on other sites

  • 4 weeks later...

Hi all,

 

Okay I seem to have it fixed. Got the solution from Kurt (if you're reading this, then thanks sprockhopper).

In the Back Office, go to Advanced Parameters, then Performance, then change the radio button option from Minify HTML to Keep HTML as original. Hopefully this will help many more!

 

keep_html_original.png

 

Cheers,

Nick

Edited by Nick Lappage (see edit history)
  • Like 1
Link to comment
Share on other sites

I am glad to hear that comment sir. I have posted 3 times here for help now and never once got any help so I think I am just having a run of bad luck lol. I have email alerts on this post so I will have my eyes and ears open for any support responses.

 

Hi, have you tried the solution that Nick gave in the previous post? Turning off minify HTML in Advance Parameters/Performance?

  • Like 1
Link to comment
Share on other sites

Yes thank you so much I made that change in Admin and now the mobile cart issue is fixed. I am so happy to get help on this thanks a lot!

 

I do have another situation now. The mobile cart says free shipping and the mobile cart is not showing the UPS shipping price that is shown on the full site? Is this a setting or something more complex? I am using the UPS module for the full size site to calculate the shipping price.

Link to comment
Share on other sites

  • 2 months later...

hi, I am using PrestaShop: 1.6.0.6 and my cart is working fine on the full site but does not work on the mobile site. I tried the solution that Nick gave in the previous post but there is the problem too. I hope you can help me thanks.

Link to comment
Share on other sites

  • 3 weeks later...
  • 9 months later...

Hello everyone, I have same problem with my mobile cart (prestashop 1.5) I try changing the minify but still same problem, the cart doesnt show and I cannot add anything on it.

 

Any other ideas??

 

Thanks!

 

Javier

Link to comment
Share on other sites

  • 6 years later...

Hello Guys,

Unfortunately I am having this issue as well on version 1.7.6.7 and I don't have a HTML minify option in the performances. I have tried anyway to turn off all cache and options in the performance section but the problem is still there on mobile. Oh! Also I don't get any error messages, simply clicking on the cart button doesn't load anything and the browser stays on the same page.

Did anyone figured this thing out?

Thanks

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

Hello Patryk,

sorry for the late reply but I was pretty busy. In the end as you can see nobody gave any further help on the matter. So, since I had no furhter assistance on my Theme and no help from this forum either I just hacked a little bit my theme and fixed the problem like that.

I didn't document the changes that I did, so I am not 100% sure about what I am about to write. But basically I just figured the part that was causing the problem (the documents of the ps_shoppingcart module folder) and worked on those codes using some the original files from the original PS theme that as far as we know it should work fine (for me it did).

Using those files fixed the problem but I had to use my theme tags to make the design work so in the end I ended up modifiyng all 3 files present in the above folder.

Oh! Also I used a part of the code from my theme to hide the popup. The file is ps_shoppingcart.tpl

the line is the following:

<a class="shopping-cart" rel="nofollow" href="{$cart_url}">

and the added code from my theme is

{if $cart.products_count > 0} data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"{/if}

resulting in this:

    <a class="shopping-cart" rel="nofollow" href="{$cart_url}" {if $cart.products_count > 0} data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"{/if}>

 

I am sorry if I can't be more detailed. Just make some tests on a test site before doing anything online.

Please let me know if you fixed it.

Link to comment
Share on other sites

26 minutes ago, Valmiki108 said:

Hello Patryk,

sorry for the late reply but I was pretty busy. In the end as you can see nobody gave any further help on the matter. So, since I had no furhter assistance on my Theme and no help from this forum either I just hacked a little bit my theme and fixed the problem like that.

I didn't document the changes that I did, so I am not 100% sure about what I am about to write. But basically I just figured the part that was causing the problem (the documents of the ps_shoppingcart module folder) and worked on those codes using some the original files from the original PS theme that as far as we know it should work fine (for me it did).

Using those files fixed the problem but I had to use my theme tags to make the design work so in the end I ended up modifiyng all 3 files present in the above folder.

Oh! Also I used a part of the code from my theme to hide the popup. The file is ps_shoppingcart.tpl

the line is the following:

<a class="shopping-cart" rel="nofollow" href="{$cart_url}">

and the added code from my theme is

{if $cart.products_count > 0} data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"{/if}

resulting in this:

    <a class="shopping-cart" rel="nofollow" href="{$cart_url}" {if $cart.products_count > 0} data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"{/if}>

 

I am sorry if I can't be more detailed. Just make some tests on a test site before doing anything online.

Please let me know if you fixed it.

Thanks, however, I used the z-index and it worked. More here: 

 

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