Custom Theme Creation
Ready to craft your own Shopify theme? Dive into detailed theme documentation, packed with examples, resources, and practical tutorials, guiding you through the process of building and designing a distinctive Shopify theme.
Learn about themesApp Development
Eager to develop a Shopify app? Explore our extensive API resources and utilize our step-by-step tutorials. Learn the intricacies of app creation and smoothly navigate the submission process to the Shopify App Store.
Learn about Shopify's AppsDiscount and Coupon Calculation Application for InSales
The online store Crowd Games requested the development of a feature enabling the simultaneous application of coupons and loyalty discounts in a specific calculation order: the coupon is applied first, followed by the loyalty discount. This functionality is not available in InSales by default, where the rule prioritizes the maximum discount.

Key Project Objectives
Cart Modification and Website Integration
- Disable the standard discount functionality in the cart.
- Enable external discount application via API.
- Process cart changes, including: Adding/removing items, Changing quantities, Applying/removing coupons.
Discount Calculation Algorithm
- Validate the entered coupon.
- Retrieve loyalty discount data via API.
- Calculate the final price using the client’s formula: (Product Price - Coupon) - Loyalty Discount.
- Send recalculated data back to the cart.
Statistics and Reporting
- Record applied coupon information in the order field.
- Enable data export to tables for analysis.
- Develop an external dashboard with access to coupon usage statistics.
Coupon Management Interface and Optimizing User Experience (UX)
Enhanced UX: Seamless and intuitive interface for customers.
- Add and remove coupons compatible with loyalty discounts through the application interface.
- Store data on coupons and their usage.
- Block the “Place Order” button and display a loading indicator while recalculating the cart.
Technical Details
By implementing this level of detailed event tracking, your business can:
- Technologies: JavaScript, InSales API, PHP for backend logic.
- Hosting: The application is hosted on the client’s virtual server, ensuring scalability and adaptability for other stores.
- Integration: Added via the “Extensions” section in the InSales back office.
Conclusion
Flexible Discount Configuration: The client can configure discounts and coupons with precise control.
Get Started with WS24
Interested in a mini audit of your theme or template?
Consultation is free – fill out the form below to get started.
Contact us today to enhance your store’s customer engagement and analytics capabilities.
Build Your Own Shopify App
Ready to craft your own Shopify App?
Discover how Shopify Apps, both public and custom, can transform your online store. Try the benefits of custom Shopify app development for a tailored e-commerce experience.
Shopify stores:
- Rapid Deployment: Launch your store in as little as two months.
- Easy Integration: Utilize pre-existing connectors from a vast App Store.
- User-Friendly APIs: Benefit from standardized, well-documented, and simple APIs.
- Cloud-Based Solution: Rely on a 100% cloud-based service for flexibility and scalability.
- Minimal Management: Typically, only content managers are needed for ongoing upkeep.