Show/Hide Downpay Conditionally
Learn how to show or hide Downpay deposits on the product page for specific regions or customers
Overview
Setup instructions
Examples
You can conditionally prevent Downpay from initializing on the product page based on custom conditions. To do this, set the following variable in javascript inside your theme:
window.downpay.disabledOnFirstLoad
2.0 Themes include a liquid block that may be used for this functionality.
- Navigate to the Shopify theme editor and to the product page template
- Click Add block and choose Custom Liquid
- Use the examples below or your own workflow to hide Downpay based on specific rules
![](https://storage.crisp.chat/users/helpdesk/website/81f235024a249800/screenshot2024-06-05at103628-a_nbg39t.png)
Assign a customer tag to the specific customers that should be able to see Downpay
Follow the theme setup above to add a liquid block to your product template
Copy the code below into the liquid block and adjust the tag to fit your setup.
Click Save
This will only work with a product that only has one purchase option in Downpay (non variant purchase options).
For example, if you would like to show Downpay deposit options to only customers shopping from the French Market, you would add the following code to your theme.liquid file or your main product liquid template.
On this page:
Overview
Setup instructions
Examples
Overview
You can conditionally prevent Downpay from initializing on the product page based on custom conditions. To do this, set the following variable in javascript inside your theme:
window.downpay.disabledOnFirstLoad
Setup instructions
2.0 Themes Setup
2.0 Themes include a liquid block that may be used for this functionality.
- Navigate to the Shopify theme editor and to the product page template
- Click Add block and choose Custom Liquid
- Use the examples below or your own workflow to hide Downpay based on specific rules
![](https://storage.crisp.chat/users/helpdesk/website/81f235024a249800/screenshot2024-06-05at103628-a_nbg39t.png)
Examples
Show Downpay to logged in customers with a specific customer tag
Assign a customer tag to the specific customers that should be able to see Downpay
Follow the theme setup above to add a liquid block to your product template
Copy the code below into the liquid block and adjust the tag to fit your setup.
{% unless customer.tags contains "vip" %}
<script>
window.downpay = window.downpay || {};
window.downpay.disabledOnFirstLoad = true;
</script>
{% endunless %}
Click Save
Show Downpay only when a product is sold out
This will only work with a product that only has one purchase option in Downpay (non variant purchase options).
html
% if product.selected_or_first_available_variant.inventory_quantity >= 1 %}
<script>
window.downpay = window.downpay || {};
window.downpay.disabledOnFirstLoad = true;
</script>
{% endif %}
Show Downpay to a specific market
For example, if you would like to show Downpay deposit options to only customers shopping from the French Market, you would add the following code to your theme.liquid file or your main product liquid template.
{% if localization.market.handle == 'fr' %}
<script>
window.downpay = window.downpay || {};
window.downpay.disabledOnFirstLoad = true;
</script>
{% endif %}
Updated on: 05/08/2024
Thank you!