4 / 6
Aug 2014

Hello,



I've been using e-junkie for a few months now and I just redesigned my website. I launched a new product today and I noticed that the pop-up cart isn't working for mobile. It isn't even taking me to a new page or anything - I click the call to actions (which are linked to e-junkies cart, and work fine on desktop), but on my phone it just sits on the page.



Is there any way to help make this work properly?



Thanks!





Page: http://www.ruled.me/keto-academy/



Added code:



<script language="javascript">// <![CDATA[

function EJEJC_lc(th) { return false; }

function EJEJC_config() {

EJEJC_PLAYNICE=true;

}

// ]]></script>

<script src="http://www.e-junkie.com/ecom/box.js"></script>

  • created

    Aug '14
  • last reply

    Aug '14
  • 5

    replies

  • 1.6k

    views

  • 3

    users

  • 3

    links

Actually, our pop up cart is intentionally disabled for mobile devices because it displays too small to be practical on a smaller mobile screen.



Our full screen fallback cart should be opening in a new window instead. I tested your site on my smartphone and that worked as expected, I was able to proceed to checkout from there.



We are actively working on making improvements to the display of our cart and checkout pages within mobile screens, these changes will kick in automatically when we detect a mobile device.

I understand that there's supposed to be a fallback of opening another window. But on my mobile device (Samsung Galaxy SII), it doesn't do anything. It just sits on the page and when you click any of the call to actions, it stays on the page - no pop up, no new window...nothing.



I'm glad it's working on some mobile devices, but on others it's not. Would there be a reasoning for this?

Hmm... nothing that I can see within the code of your page, but I'll leave this open for better eyes than mine to investigate.



Does your device's browser have any security settings that might be preventing a new window from opening?

It doesn't, no. I cleared my browser's cache to make sure. I think this may only be in a small percentage of mobile devices (I asked many others, and it was fine for them). But even a small percentage of mobile devices not being able to access the shopping cart is worthy of looking into.

The problem appears to be that this portion of our standard View Cart code:



<script language="javascript" type="text/javascript">

<!--

function EJEJC_lc(th) { return false; }

// -->

</script>

<script src="http://www.e-junkie.com/ecom/box.js" type="text/javascript"></script>



...has been changed to this in your page:



<script language="javascript" type="text/rocketscript">// <![CDATA[

function EJEJC_lc(th) { return false; }

function EJEJC_config() {

EJEJC_PLAYNICE=true;

}

// ]]></script><br/>

<script data-rocketsrc="http://www.e-junkie.com/ecom/box.js" type="text/rocketscript"></script>



Specifically, changing "javascript" to "rocketscript", and changing "src" to "data-rocketsrc", seems to cause some trouble. I made a test page with only the cart button codes I copied directly from your page, and the problem behavior stopped when I reverted those changes back to our standard code.



Apparently "rocketscript" has something to do with CloudFlare hosting; I found this page explaining how to tell CF not to convert javascript to rocketscript:

http://snippets.webaware.com.au/snippets/stop-cloudflare-rocketscript-breaking-wordpress-plugin-scripts/



E.g., applying that tip to your standard View Cart code, it should look like this:



<script data-cfasync="false" language="javascript" type="text/javascript">

<!--

function EJEJC_lc(th) { return false; }

// -->

</script>

<script src="http://www.e-junkie.com/ecom/box.js" type="text/javascript"></script>



(BTW, there's no need to use EJEJC_PLAYNICE=true; in your case, since you're not using our cart customization code in your page.)