Top

Stop Upsell in a Mobile Theme

Warning!

This is an unsupported theme customization. If you need help setting it up, Email our Support Wizards.

If you would like to disable Product Upsell in a mobile theme, follow these steps:

  1. From "Shopify Admin", select Online Store.

    select online store 

  2. Select Actions.

    select actions 

  3. Select Edit HTML / CSS.

    select edit HTML/CSS 

  4. Under "Assets", select your theme's main CSS file.

    Note: This will vary by theme and could be something like theme.scss.liquid.

    select main css file 

  5. Add this code to the bottom of the file:
    @media (max-width: 768px) {
    #facebox .content, #facebox .close {
    display: none !important;
    }
    }

    add this code 

  6. Select Save.

    select save 

  7. Under "Templates", select product.liquid.

    Note: If your theme contains sections, you will need to look under "Sections" and select product-template.liquid instead.

    select product.liquid 

  8. Add this code to the bottom of the file:
    <script>
    if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
    // Mobile Browser
    $(document).ready( function(){ $('#add-to-cart').click( function(){ setTimeout(function(){ $('#facebox').find('#giveacceptbtn').click();}, 100); }); }); } else { // Not mobile browser } </script> 

    add this code 

  9. Select Save.

    select save 

  10. Under "Templates", select cart.liquid.

    Note: If your theme contains sections, you will need to look under "Sections" and select cart-template.liquid instead.

    select cart.liquid 

  11. Add this code to the bottom of the file:
    <script>
    if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
    // Mobile Browser
    $(document).ready( function()
    $('#checkout').click( function(){
    setTimeout(function(){ $('#faceboxform').find('#faceboxsubmit').click();}, 100); }); }); } else { // Not mobile browser } </script> 

    add this code 

  12. Select Save.

    select save 

That's it!

Have more questions? Submit a request