Top

Remove Additional Checkout Buttons from the Cart for Recurring Orders

To remove additional checkout buttons from the cart in Recurring Orders, following these steps:

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

    Select Online Store 

  2. Select ...

    Select ... 

  3. Select Edit HTML / CSS.

    Edit HTML / CSS 

  4. Under “Templates”, select cart.liquid.

    Note:  If your theme uses “Sections”, you will need to do this within cart-template.liquid instead.

    select cart.liquid 

  5. Find this code:
    {% if additional_checkout_buttons %}
    <div class="additional-checkout-buttons">
    {{ content_for_additional_checkout_buttons }}
    </div>
    {% endif %}

    find this code 

  6. Add and show_paypal right before %} in the first line. The result should look like:
    {% if additional_checkout_buttons and show_paypal %}
    <div class="additional-checkout-buttons">
    {{ content_for_additional_checkout_buttons }}
    </div>
    {% endif %}

    add and show_paypal 

  7. Find this line:  <script>mixed_cart = false;</script>.

    find this line 

  8. Paste this line directly below it:  {% assign show_paypal = true %}.

    add this code below 

  9. Find this line:  {% if p.first == "group_id" %} or {% if item.properties.group_id %}.

    find this code 

  10. Paste this line directly below it:  {% assign show_paypal = false %}

    paste this below 

  11. Copy and paste this code at the very bottom of the file:
    <script>
    $(document).on("click",".recurring_div, .one_time_div", function() {<
    
    if($('.recurring_div').hasClass('bold_active')){
    $('.additional-checkout-buttons').hide();
    }else{
    $('.additional-checkout-buttons').show();
    }
    });
    
    </script>

    paste this code 

  12. Select Save.

    select save 

That’s it!

Note: In the code in step 11, .additional-checkout-buttons needs to match the wording from step five exactly. For example. If the variable in step five is .paypal-checkout-buttons instead of .additional-checkout-buttons replace both occurrences of that variable in the code like so:

<script>
$(document).on("click",".recurring_div, .one_time_div", function() {<

if($('.recurring_div').hasClass('bold_active')){
$('.paypal-checkout-buttons').hide();
}else{
$('.paypal-checkout-buttons').show();
}
});

</script>
Have more questions? Submit a request