Shopify Tutorials

Add The Ability To Stop Purchase

If you want to keep your store running but you want to Disable Purchase option offer checkout functionality, you can pause your store in the Shopify Admin (under Themes> Customize > Product Pages). This will make your store “dormant”, which stop offers checkout. To do this, you simply have to write this is to your theme.

Shopify checkout is optimized for mobile and it’s easy to get started. You can customize it to match your store’s look and feel, integrate it with your favorite apps and make selling online easier than ever
before all without making major changes to your store’s backend code.


Shopify checkout is built to be the fastest and easiest way to collect payments from customers. It can be integrated into your own website and apps, or used embedded on a third-party website to
run a checkout process for your products. A successful checkout strategy is critical to acquiring and retaining customers. For instance, Shopify Checkout lets you display product offers after customers have checked out, right before the order confirmation page. This increases your chances at upselling effortlessly.

Editing your theme code to add the Ability to stop purchase feature

  • Section directory, open the product-template.liquid and find add to cart button, the cart button looks like the following in the debut theme and other themes contains this code <button name="add" :
&amp;amp;amp;amp;amp;lt;div class="product-form__item product-form__item--submit{% if section.settings.enable_payment_button %} product-form__item--payment-button{% endif %}{% if product.has_only_default_variant %} product-form__item--no-variants{% endif %}"&amp;amp;amp;amp;amp;gt;
              &amp;amp;amp;amp;amp;lt;button type="submit" name="add"
                {% unless current_variant.available %} aria-disabled="true"{% endunless %}
                aria-label="{% unless current_variant.available %}{{ 'products.product.sold_out' | t }}{% else %}{{ 'products.product.add_to_cart' | t }}{% endunless %}"
                class="btn product-form__cart-submit{% if section.settings.enable_payment_button %} btn--secondary-accent{% endif %}"
                data-add-to-cart&amp;amp;amp;amp;amp;gt;
                &amp;amp;amp;amp;amp;lt;span data-add-to-cart-text&amp;amp;amp;amp;amp;gt;
                  {% unless current_variant.available %}
                    {{ 'products.product.sold_out' | t }}
                  {% else %}
                    {{ 'products.product.add_to_cart' | t }}
                  {% endunless %}
                &amp;amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;amp;gt;
                &amp;amp;amp;amp;amp;lt;span class="hide" data-loader&amp;amp;amp;amp;amp;gt;
                  {% include 'icon-spinner' %}
                &amp;amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;amp;gt;
              &amp;amp;amp;amp;amp;lt;/button&amp;amp;amp;amp;amp;gt;
              {% if section.settings.enable_payment_button %}
                {{ form | payment_button }}
              {% endif %}
&amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;
  • Add this code above of the button code {% unless section.settings.disable_cart %} and add this {% endunless %} right after the button code.
  • In the same file find the {% schema %} and locate settings, go to the ] in the settings and add the following code right above the ] :
,
    {
      "type": "checkbox",
      "id": "disable_cart",
      "label": "Disable Purchase",
      "default": false
    }
  • Congrats you’ve completed the coding part. Now it’s available in the Themes>Customize>product pages. Now you can enable or Disable Purchase option in Shopify the Add to cart button which will Add the ability to stop purchase checkout in your store

Enjoy this feature and contact us for development related feature  🙂

Shopify Developer

Recent Posts

How to Link eBay to Shopify Store

Imagine! Seamlessly connecting the vast customer base of eBay with the robust features of your…

3 weeks ago

Unlock the Power of Shopify Flow: Automation Strategies for eCommerce

Let’s face it. Running an online store requires unwavering discipline. Juggling multiple tasks simultaneously is…

4 weeks ago

Everything You Need to Know About Shopify Liquid

There’s no denying that Shopify has taken over the world. The ecommerce platform contributes to…

2 months ago

Maximizing Revenue: 7 Best Shopify Themes for Conversion Rates that Soar

It’s true. Every marketing strategy has one common objective: to drive maximum conversion rates. If…

2 months ago

Terrific Dropshipping Business Ideas for 2024

*Sigh*. Are you tired of trying out different methods of making money online? Hear it…

2 months ago

Shopify SEO Checklist for Continued Success in 2023

When driving traffic to your Shopify store, Search Engine Optimization (SEO) is the most affordable…

2 months ago