e1commerce.com
Ask a question
  • New questions
  • With the answers
  • Unanswered
  1. Home
  2. Shopify - Display all discount code in a page

65 votes
2 answers

Shopify - Display all discount code in a page

I have this code in my Shopify page.

{% for discount in discounts %}
{{ discount.title }}<br>
{% endfor %}

Undefined asked
2022-01-7


912
votes

Answer

Solution:

You know you can only access a Discount object in notifications, like emails? You cannot access them just anywhere. Shopify only exposes that when you need to print an email for example, for the customer to see their items and money they spent.

Undefined answered
2022-01-7
Link to answer


183
votes

Answer

Solution:

Discount Object will display a value only if it's accessed in notifications or in the Order Printer App. For more info please refer - https://help.shopify.com/en/themes/liquid/objects/discount (https://help.shopify.com/en/themes/liquid/objects/discount) or https://www.shopify.in/partners/shopify-cheat-sheet (https://www.shopify.in/partners/shopify-cheat-sheet)

Undefined answered
2022-01-7
Link to answer


Source

Didn't find the answer?

Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Similar questions

Find the answer in similar questions on our website.

50 @shopify/shopify-api nodejs - Set permanent access token for private app installed on only one store
143 liquid - How to call a metafield value on the checkout page in shopify
81 shopify - when i click on add to cart button, page refreshes and then product is added how can i do this without getting the page refreshing
371 html - remove bold from headings on all product pages (shopify)
398 liquid - Display collection metafield in product page (Shopify)
552 html - How to get all blogs in Shopify store on any page?
91 node.js - Can't get react app created with Shopify CLI to run locally (on Heroku)
708 Hello, can somebody help me making a checkbox to be mandatory in my shopify checkout page? I have dawn them
728 javascript - Load More Button On Blog Page (Shopify)
299 Add changes to all the themes in shopify

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.







Latest questions:

837 Get product description with metafield in shopify

920 html - CSS animation looks wrong/broken in some places on iOS devices only?

641 Shopify refund amount wrong when refund in pending state (Admin REST API)

924 How to Add Fonts to the Shopify Admin

49 css selectors - Custom font for specific language shopify



© 2021-2023

E-mail: infot@e1commerce.com