Announcement

Collapse
No announcement yet.

is device ios if block

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    is device ios if block

    My customers are having an issue with the trusted shop logo image we have when browsing on an ios device.

    I am sure that the best way to resolve the would be to put a check for the device type i an if block and prevent the integration from rendering should it be an ios device they are browsing on.


    from my research on the web i have found this line of code which i believe would help but how i would implement this however evades me.

    Code:
    var iOS = ( navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false );
    Any help would be much appreciated.
    www.flytesofancy.co.uk, www.electricfencingkits.co.uk, www.dorsetlogstores.co.uk, www.framebow.co.uk

    #2
    You can't use a blockif because they are only parsed on the desktop prior to generating the page for upload and you will need an online test that runs in the browser. The solution will have to be a modification of (or test around) the js code for the trusted logo.

    Can you post the Tusted logo code? Someone may then be able to suggest a mod that will work.

    Comment


      #3
      Thanks Duncan see below;

      Code:
      <script type="text/javascript">
          (function () { 
          var _tsid = 'SHOPID'; 
          _tsConfig = { 
              'yOffset': '0', //offset from page bottom
              'variant': 'small' //text, default, small, reviews
          };
          var _ts = document.createElement('script');
          _ts.type = 'text/javascript'; 
          _ts.async = true; 
          _ts.charset = 'utf-8'; 
          _ts.src = '//widgets.trustedshops.com/js/' + _tsid + '.js'; 
          var __ts = document.getElementsByTagName('script')[0];
          __ts.parentNode.insertBefore(_ts, __ts);
          })();
      </script>
      <noscript><a href="https://www.trustedshops.de/shop/certificate.php?shop_id=SHOPID">
      <img title="Trusted Shops trustmark - click to verify." src="//widgets.trustedshops.com/images/badge.png" 
      style="position:fixed;bottom:0;right:0;" /></a></noscript>
      www.flytesofancy.co.uk, www.electricfencingkits.co.uk, www.dorsetlogstores.co.uk, www.framebow.co.uk

      Comment


        #4
        Check out http://www.hand-interactive.com/reso...javascript.htm


        Bikster
        SellerDeck Designs and Responsive Themes

        Comment


          #5
          If it is a device size issue rather than the OS you can simply use a media query in the actinic.css file to prevent the block of code rendering below a certain viewport width - this will then work across Android / Windows OS as well as IOS


          Bikster
          SellerDeck Designs and Responsive Themes

          Comment

          Working...
          X