Jump to content

Ajax Cart link doesn't work on mobile device


giantvintage

Recommended Posts

I'm currently developing a mobile site,

and I can't get the cart / checkout link to work on my mobile device (I'm testing on iPhone).

The link is simply dead...nothing happens at all when I tap on the cart icon.

 

If I disable Ajax in the module configuration screen, then it works fine.

 

It also works fine in a desktop browser, regardless if Ajax cart is enabled or disabled

 

Here's a link to the page:

http://www.giantvintage.com/PS/index.php

 

Again, it's only on a mobile device that I'm having the issue.

 

thanks for any advice:)

 

 

Link to comment
Share on other sites

So what am I going to do about this?

 

Is anybody out there available for hire to do custom work, consulting, etc?

I really could use an expert to have on call. Right now I don't know of anyone cuz I'm migrating my site from a different platform.

 

thanks for any feedback:)

Link to comment
Share on other sites

  • 2 months later...

Hi there, just solved it with a small javascript trick (in jquery).

 

{literal}

$(".shopping_cart").click(function()

{

   location.href = "/[your_shopping_cart_url]";

});

{/literal}

 

@ end of file in footer.tpl or in blockcart.tpl

{literal} is used for writing scripts in .tpl (smarty) files.

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

  • 3 weeks later...

I have the same issue.  Going from the 'Order Summary' to the payment page all I receive is a blank page.  I have tried the suggestion above and also turning AJAX off in the form.

 

Any other thoughts would be helpful I am using 1.5.6

Link to comment
Share on other sites

  • 6 months later...

Thanks a lot Keukli, here's a more elaborated approach that worked for me:

 

{literal}
<script type="text/javascript">
$(".shopping_cart").click(function() {
   location.href = "{/literal}{$link->getPageLink($order_process, true)|escape:'html':'UTF-8'}{literal}";
});
</script>
{/literal}
  • Like 2
Link to comment
Share on other sites

  • 2 months later...

I got same problem on my custom ajax add to cart link, code of add to cart is

<a class="ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to Cart' mod='newproducts'}"><span> </span>{l s='Add to Cart' mod='newproducts'}</a>

How can I have the same trick on the href? I tried with 

{literal}<script type="text/javascript">$("ajax_add_to_cart_button").click(function() {   location.href = "{/literal}{$link->getPageLink('cart')}?qty=1&id_product={$product.id_product}&token={$static_token}&add{literal}";});</script>{/literal}

but seems is not working

Link to comment
Share on other sites

  • 2 years later...
On 24.11.2015 at 6:11 PM, WAKE said:

Thanks a lot Keukli, here's a more elaborated approach that worked for me:

 

{literal}
<script type="text/javascript">
$(".shopping_cart").click(function() {
   location.href = "{/literal}{$link->getPageLink($order_process, true)|escape:'html':'UTF-8'}{literal}";
});
</script>
{/literal}

Worked for me! thanks

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