mickeyboy1 Posted May 23, 2014 Share Posted May 23, 2014 (edited) Hiya all, I have a problem with my site not showing the "Add to cart" button on products with attributes. When you first goto a page, the "Add to cart" button is not visible, but if you refresh the page(f5) then the "Add to cart" button appears. Problem page url= http://www.biketuna.co.uk/shop/pro-bolt-special-parts/352-probolt-aluminium-gear-shift-rod.html I have used the developer tools in chrome and when you first visit the page it shows the following in the before refresh.jpg below And after you refresh the page it shows the following in the after refresh.jpg below Any help is greatly appreciated Thanks mb Forgot to say i am using prestashop 1.5.3.1 Edited May 26, 2014 by mickeyboy1 (see edit history) Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted May 23, 2014 Share Posted May 23, 2014 (edited) <p id="reduction_percent" style="display: none;"></p><p id="reduction_amount" style="display:none"></p> remove this lines from product page + remove that twitter module its making your site dead slow.. im a back after 1 year and 2 months chill Edited May 23, 2014 by Jiten rash (see edit history) Link to comment Share on other sites More sharing options...
mickeyboy1 Posted May 23, 2014 Author Share Posted May 23, 2014 Hiya jiten, i removed them from product.tpl but its still the same Any other ideas please Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted May 24, 2014 Share Posted May 24, 2014 #add_to_cart {display: block !important;} add this any were in the global.css Link to comment Share on other sites More sharing options...
mickeyboy1 Posted May 26, 2014 Author Share Posted May 26, 2014 (edited) Thanks again for the reply Jiten, but it was more than just the add to cart button not showing. I think i have fixed this refresh issue...... In my header.tpl i had <script type="text/javascript" src="{$js_uri}" async></script> I removed the "async" and it seems to be working fine now Does anyone know why adding "async" would stop some of the javascripts loading until the page is manually refreshed ??? Edited May 26, 2014 by mickeyboy1 (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted May 26, 2014 Share Posted May 26, 2014 The error message you got said that "$" was missing. $ is a central variable in jquery. So I suppose that by declaring asynch you delayed loading jquery. And as many PS scripts depend on jquery they couldn't work. Link to comment Share on other sites More sharing options...
mickeyboy1 Posted May 26, 2014 Author Share Posted May 26, 2014 Thanks for explaining this musicmaster.. I have previously used gtmetrix and to help with the page load speed it suggests adding async to the script tag But it obviously doesnt work so will leave it as it is Thanks for all the replies Shall mark this topic as solved MB Link to comment Share on other sites More sharing options...
Recommended Posts