Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #930320

    I’ve been trying to add av_countdown and av_slideshow to the description section of a WooCommerce product. It shows fine on a desktop, it shows fine when testing (chrome) in mobile emulator setting, but somehow neither is being displayed when checking on Android Chrome or an iPhone. Spacing is there on the page, but that’s it.

    Here is a comparison for illustration purposes:

    Desktop Chrome:
    Desktop Chrome

    Android Chrome:
    Mobile Chrome

    I’m kinda stumped. Both the countdown and the slideshow work fine on mobile when I place them anywhere else on the site, so it would seem it has something to do with placing them inside the product description in particular.

    Has anyone else encountered this and found a solution? Thanks in advance!

    • This topic was modified 6 years, 8 months ago by dutchguy72.
    #931043

    Hey dutchguy72,

    Thank you for using Enfold.

    The element is not working on Chrome, Windows 7. This is the error in the console.

    (index):510 Uncaught ReferenceError: gtag is not defined
        at HTMLDocument.<anonymous> ((index):510)
        at i (jquery.js:2)
        at Object.fireWith [as resolveWith] (jquery.js:2)
        at Function.ready (jquery.js:2)
        at HTMLDocument.K (jquery.js:2)
    

    The error is related to this markup.

    width="80" height="80" src="https://tyt.com.my/wp-content/uploads/2018/03/TYT-GINGER-TEA-LABEL-ART-IMP-RED-DATES-26SEPT17-1-80x80.png" class="attachment-thumbnail size-thumbnail wp-post-image" alt="" srcset="https://tyt.com.my/wp-content/uploads/2018/03/TYT-GINGER-TEA-LABEL-ART-IMP-RED-DATES-26SEPT17-1-80x80.png 80w, https://tyt.com.my/wp-content/uploads/2018/03/TYT-GINGER-TEA-LABEL-ART-IMP-RED-DATES-26SEPT17-1-295x300.png 295w, https://tyt.com.my/wp-content/uploads/2018/03/TYT-GINGER-TEA-LABEL-ART-IMP-RED-DATES-26SEPT17-1-768x782.png 768w, https://tyt.com.my/wp-content/uploads/2018/03/TYT-GINGER-TEA-LABEL-ART-IMP-RED-DATES-26SEPT17-1-1012x1030.png 1012w, https://tyt.com.my/wp-content/uploads/2018/03/TYT-GINGER-TEA-LABEL-ART-IMP-RED-DATES-26SEPT17-1-36x36.png 36w, https://tyt.com.my/wp-content/uploads/2018/03/TYT-GINGER-TEA-LABEL-ART-IMP-RED-DATES-26SEPT17-1-180x180.png 180w, https://tyt.com.my/wp-content/uploads/2018/03/TYT-GINGER-TEA-LABEL-ART-IMP-RED-DATES-26SEPT17-1-1473x1500.png 1473w, https://tyt.com.my/wp-content/uploads/2018/03/TYT-GINGER-TEA-LABEL-ART-IMP-RED-DATES-26SEPT17-1-100x100.png 100w, https://tyt.com.my/wp-content/uploads/2018/03/TYT-GINGER-TEA-LABEL-ART-IMP-RED-DATES-26SEPT17-1-450x458.png 450w" sizes="(max-width: 80px) 100vw, 80px" /></noscript></span>        </span>    </span></a></div>
    <script type="text/javascript">(function(){var sa=document.createElement('script');sa.type='text/javascript';sa.async=true;sa.src=('https:'==document.location.protocol?'https://cdn':'http://cdn')+'.ywxi.net/js/1.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(sa,s);})();</script> <script type="text/javascript">jQuery('form#wma_login_form').submit(function(){if(jQuery(this).find('#user_login').val()==''||jQuery(this).find('#user_pass').val()==''){alert('Please fill in your username and password');return false;}});</script> <script>(function(body){'use strict';body.className=body.className.replace(/\btribe-no-js\b/,'tribe-js');})(document.body);</script> <script type='text/javascript'>/*<![CDATA[*/var avia_framework_globals=avia_framework_globals||{};avia_framework_globals.gmap_api='AIzaSyC8a6O54W35wkO7ImcqzGvdGFrU9wbFeJw';avia_framework_globals.gmap_maps_loaded='https://maps.googleapis.com/maps/api/js?v=3.30&key=AIzaSyC8a6O54W35wkO7ImcqzGvdGFrU9wbFeJw&callback=aviaOnGoogleMapsLoaded';avia_framework_globals.gmap_builder_maps_loaded='https://maps.googleapis.com/maps/api/js?v=3.30&key=AIzaSyC8a6O54W35wkO7ImcqzGvdGFrU9wbFeJw&callback=av_builder_maps_loaded';avia_framework_globals.gmap_backend_maps_loaded='https://maps.googleapis.com/maps/api/js?v=3.30&callback=av_backend_maps_loaded';avia_framework_globals.gmap_source='https://maps.googleapis.com/maps/api/js?v=3.30&key=AIzaSyC8a6O54W35wkO7ImcqzGvdGFrU9wbFeJw';/*]]>*/</script> <script type='text/javascript'>var avia_framework_globals=avia_framework_globals||{};avia_framework_globals.frameworkUrl='https://tyt.com.my/wp-content/themes/enfold/framework/';avia_framework_globals.installedAt='https://tyt.com.my/wp-content/themes/enfold/';avia_framework_globals.ajaxurl='https://tyt.com.my/wp-admin/admin-ajax.php';</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org\/","@type":"Product","@id":"https:\/\/tyt.com.my\/shop\/ginger-tea-original\/","name":"Ginger Tea, Original","image":"https:\/\/tyt.com.my\/wp-content\/uploads\/2018\/03\/TYT-GINGER-TEA-LABEL-ART-IMP-ORIGINAL-26SEPT17-1.png","description":"A traditional herbal drink, fully extracted from fresh native ginger. Net weight: 300 grams (good for at least 25 cups). Made with organic cane sugar. PRE-LAUNCH PROMOTION!","sku":"1","offers":[{"@type":"Offer","price":"55.50","priceCurrency":"MYR","availability":"https:\/\/schema.org\/InStock","url":"https:\/\/tyt.com.my\/shop\/ginger-tea-original\/","seller":{"@type":"Organization","name":"TYT","url":"https:\/\/tyt.com.my"}}]}</script><script type='text/javascript'>var tribe_l10n_datatables={"aria":{"sort_ascending":": activate to sort column ascending","sort_descending":": activate to sort column descending"},"length_menu":"Show _MENU_ entries","empty_table":"No data available in table","info":"Showing _START_ to _END_ of _TOTAL_ entries","info_empty":"Showing 0 to 0 of 0 entries","info_filtered":"(filtered from _MAX_ total entries)","zero_records":"No matching records found","search":"Search:","all_selected_text":"All items on this page were selected. ","select_all_link":"Select all pages","clear_selection":"Clear Selection.","pagination":{"all":"All","next":"Next","previous":"Previous"},"select":{"rows":{"0":"","_":": Selected %d rows","1":": Selected 1 row"}},"datepicker":{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dayNamesMin":["S","M","T","W","T","F","S"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December"],"monthNamesShort":["January","February","March","April","May","June","July","August","September","October","November","December"],"nextText":"Next","prevText":"Prev","currentText":"Today","closeText":"Done"}};</script> <script type='text/javascript'>var wc_add_to_cart_params={"ajax_url":"\/wp-admin\/admin-ajax.php","wc_ajax_url":"https:\/\/tyt.com.my\/?wc-ajax=%%endpoint%%","i18n_view_cart":"View basket","cart_url":"https:\/\/tyt.com.my\/cart\/","is_cart":"","cart_redirect_after_add":"no"};</script> <script type='text/javascript' src='https://tyt.com.my/wp-content/plugins/<a href='https://refer.wordpress.com/r/84/woocommerce/' target='_blank' rel="nofollow">woocommerce</a>/assets/js/frontend/add-to-cart.min.js'></script> <script type='text/javascript'>var wc_single_product_params={"i18n_required_rating_text":"Please select a rating","review_rating_required":"no","flexslider":{"rtl":false,"animation":"slide","smoothHeight":true,"directionNav":false,"controlNav":"thumbnails","slideshow":false,"animationSpeed":500,"animationLoop":false,"allowOneSlide":false},"zoom_enabled":"","zoom_options":[],"photoswipe_enabled":"","photoswipe_options":{"shareEl":false,"closeOnScroll":false,"history":false,"hideAnimationDuration":0,"showAnimationDuration":0},"flexslider_enabled":""};</script> <script type='text/javascript' src='https://tyt.com.my/wp-content/plugins/<a href='https://refer.wordpress.com/r/84/woocommerce/' target='_blank' rel="nofollow">woocommerce</a>/assets/js/frontend/single-product.min.js'></script> <script type='text/javascript' src='https://tyt.com.my/wp-content/plugins/<a href='https://refer.wordpress.com/r/84/woocommerce/' target='_blank' rel="nofollow">woocommerce</a>/assets/js/jquery-blockui/jquery.blockUI.min.js'></script> <script type='text/javascript' src='https://tyt.com.my/wp-content/plugins/<a href='https://refer.wordpress.com/r/84/woocommerce/' target='_blank' rel="nofollow">woocommerce</a>/assets/js/js-cookie/js.cookie.min.js'></script> <script type='text/javascript'>var <a href='https://refer.wordpress.com/r/84/woocommerce/' target='_blank' rel="nofollow">woocommerce</a>_params={"ajax_url":"\/wp-admin\/admin-ajax.php","wc_ajax_url":"https:\/\/tyt.com.my\/?wc-ajax=%%endpoint%%"};</script> <script type='text/javascript' src='https://tyt.com.my/wp-content/plugins/<a href='https://refer.wordpress.com/r/84/woocommerce/' target='_blank' rel="nofollow">woocommerce</a>/assets/js/frontend/<a href='https://refer.wordpress.com/r/84/woocommerce/' target='_blank' rel="nofollow">woocommerce</a>.min.js'></script> <script type='text/javascript'>var wc_cart_fragments_params={"ajax_url":"\/wp-admin\/admin-ajax.php","wc_ajax_url":"https:\/\/tyt.com.my\/?wc-ajax=%%endpoint%%","cart_hash_key":"wc_cart_hash_45699ec7f4ca637d6be48f9755ce9cdf","fragment_name":"wc_fragments_45699ec7f4ca637d6be48f9755ce9cdf"};</script> <script type='text/javascript' src='https://tyt.com.my/wp-content/plugins/<a href='https://refer.wordpress.com/r/84/woocommerce/' target='_blank' rel="nofollow">woocommerce</a>/assets/js/frontend/cart-fragments.min.js'></script> <script type='text/javascript' src='https://tyt.com.my/wp-content/themes/enfold/js/aviapopup/jquery.magnific-popup.min.js'></script> <script type='text/javascript' src='https://tyt.com.my/wp-includes/js/mediaelement/wp-mediaelement.min.js'></script> <script type='text/javascript' src='https://tyt.com.my/wp-includes/js/comment-reply.min.js'></script> <script type='text/javascript' src='https://tyt.com.my/wp-content/plugins/bj-lazy-load/js/bj-lazy-load.min.js'></script> <script type='text/javascript' src='https://tyt.com.my/wp-content/uploads/dynamic_avia/avia-footer-scripts-9c1812a00b6b175ecb6479dd71a89a94.js'></script> <script type='text/javascript' src='https://tyt.com.my/wp-includes/js/wp-embed.min.js'></script>  <script type="text/javascript">/*<![CDATA[*/jQuery(function($){tvc_lc="MYR";var items=[];gtag("set",{"currency":tvc_lc});jQuery("[class*=single_add_to_cart_button]").click(function(){gtag("event","add_to_cart",{"event_category":"Enhanced-Ecommerce","event_label":"add_to_cart_click","non_interaction":true,"items":[{"id":tvc_po.tvc_i,"name":tvc_po.tvc_n,"category":tvc_po.tvc_c,"price":tvc_po.tvc_p,"quantity":jQuery(this).parent().find("input[name=quantity]").val()}]});});tvc_po={"tvc_id":"1973","tvc_i":"1","tvc_n":"Ginger Tea, Original","tvc_c":"Featured,Tea","tvc_p":"55.50"};gtag("event","view_item",{"event_category":"Enhanced-Ecommerce","event_label":"product_impression_pp","items":[{"id":tvc_po.tvc_i,"name":tvc_po.tvc_n,"category":tvc_po.tvc_c,}],"non_interaction":true})
    

    Did you minify the scripts and stylesheets?

    Best regards,
    Ismael

    #931052

    Hi Ismael and thanks for your reply.

    Nothing is minified unless that’s how it came with the template. It’s pretty much an out-of-the-box installation with no modification other than some custom styles.

    I presume gtag refers to Google Analytics tracking code here? Did you encounter that error on any other pages? I have no clue as to how to proceed from here, despite this knowledge. Sorry :)

    Cheers.

    #931156

    Hi dutchguy72,

    How are you adding the Google tracking code?
    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #931178

    Hi Victoria,

    Thanks for putting my attention on this. I’ve had a look and found that the tracking code is now being added via the following plugins:

    • WooCommerce by use of ‘Enhanced E-commerce for Woocommerce store’ plugin
    • Google Analytics Dashboard for WP (GADWP)

    There could be a redundancy there. I also noticed that WooCommerce (Enhanced E-commerce plugin) actually mentions a setting to enable the use of gtag, which is disabled by default and, according to WooCommerce “does not need to be activated if gtag is being added by another 3rd party plug”. Which I’m now not convinced that it actually is.

    I know I should experiment, but I’m a bit concerned as this is a production environment and lack sufficient knowledge to know what I’m doing here without potentially mucking things up.

    I’ve added temporary admin details in the private content section. Thanks in advance!

    #931199

    Hi dutchguy72,

    Please, try disabling the WooCommerce option for gtag and see if the issue remains. You will not break things by doing this. And if you’re not sure, always have a test website, a copy of production to test things out there first.

    Best regards,
    Victoria

    #931208

    Hi Victoria,
    So the gtag option was in fact already disabled, but I presume you meant for me to enable it instead. I’ve enabled it, flushed all site caches… and behold, it works. Fantastic!

    Thanks much for your assistance. We’re all happy over here and are gonna it “weekend”.

    Cheers.

    #931864

    Hi,

    Awesome! Glad that you figured out. Please feel free to open a new thread if you need anything else. :)

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘av_countdown and av_slideshow not showing on mobile WooCommerce product’ is closed to new replies.