Custom Discount and Coupon Application. Crowd Games Case Study

Learn how we developed a custom application for Crowd Games to enable simultaneous application of coupons and loyalty discounts on InSales, improving user experience and sales.

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.

Discount and Coupon Calculation Application

The functionality was designed to enhance the shopping experience by allowing combined use of coupons and loyalty group discounts on the Cart page. The discount calculation was implemented based on the rule "Coupon + Loyalty Discount" using the following formula: (Product Price - Coupon) - Loyalty Discount. To address the challenge, a custom external application was developed, which integrates with InSales via API to calculate discounts.

Key Project Objectives

Cart Modification and Website Integration

  1. Disable the standard discount functionality in the cart.
  2. Enable external discount application via API.
  3. 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.

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 themes →

App 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 Apps →