Multiple Checkout Buttons

Highlighted
New Member
1 0 0

Hey everyone,

I have an existing cart rule that hides the checkout button if the order quantity is below $23. 

 

          {% if cart.total_price > 2300 %}
  <!-- Show the checkout buttons (or form) in here. -->

       <button type="submit" disabled="disabled" name="checkout" class="btn">

            <span class="icon icon-cart"></span>
            {{ 'cart.general.checkout' | t }}
          </button>

          {% else %}
<p style="color:#8B6C62; padding-top: 15px;"><b> Sorry! You'll need to spend $23 or more to checkout.</b></p>
{% endif %}

 

 

However, I just added an app that allows people to reserve items in their cart with a timer, and they have their own special checkout button. They ask me to add the following to the cart.liquid:

 

     {% if customer %}        

                                {% comment %} CodersLab Checkout Button {% endcomment %}
                                <div class="Checkout Button Class Name">
                                {% include 'CheckoutButtonByCodersLab'%} 
                                </div>      
                         
                            {% else %}
          
            {% comment %} Original Checkout Button {% endcomment %}
       <button type="submit" disabled="disabled" name="checkout" class="btn">
 <button type="submit" disabled="disabled" name="checkout" class="btn">

            <span class="icon icon-cart"></span>
            {{ 'cart.general.checkout' | t }}
          </button>

                        {% endif %}
         

 

 

Does anyone know how I can combine these statements so that if a customer has over than $23 in their carts and has used the 'reserve' app, they see the 'reserve' app checkout button, whereas if it's a regular checkout (with no reserved items) they see they regular checkout button. And more importantly, if they're under $23, regardless of the above conditions, they just see the Sorry! message.

I've been trying a bunch of combos to no avail

Thanks in advance!!

0 Likes