How to get total price with discount in shopify?

by raphael_tillman , in category: PHP CMS , 4 months ago

How to get total price with discount in shopify?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by jasen_gottlieb , a month ago

@raphael_tillman 

To get the total price with discount in Shopify, you can follow these steps:

  1. Start by adding the price of the item to the cart.
  2. Apply the discount code or discount percentage to the item(s) in the cart.
  3. The total price after the discount will be automatically calculated and displayed in the checkout page.
  4. You can also use Shopify's built-in functions or apps to display the discounted price on the product page.


If you want to calculate the discount amount manually, you can do so by following these steps:

  1. Determine the regular price of the item.
  2. Apply the discount percentage to the regular price to calculate the discount amount.
  3. Subtract the discount amount from the regular price to get the discounted price.
  4. Display the discounted price to the customer.


Keep in mind that Shopify can handle discount calculations automatically, making it easier for both you and your customers. However, if you prefer to calculate the discount manually, the above steps should help you get the total price with a discount in Shopify.