duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/addons/duncanmcclean/simple-commerce
Other
143 stars 37 forks source link

Coupon Listing Tables #885

Closed duncanmcclean closed 1 year ago

duncanmcclean commented 1 year ago

This pull request implements a proper listing table for Coupons. This means you can now filter & search coupons, along with being able to customise the columns shown on the listing table.

Before

image

Now

image

As part of this change, I've had to change how the coupon type is stored in the Stache. Instead of being stored as the enum itself, it's stored as the enum's key, which is then "new-ed up" again when you do ->type() on the Coupon instance.

I had to make this change to allow for querying the coupon type in CouponTypeFilter.

github-actions[bot] commented 1 year ago

Released as part of v5.3.0.