Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I was wondering if anyone has built a view or has some tips on how to find all orders that used a particular coupon code.
We have a custom credit coupon and it had one use, but a customer called saying she tried to use the coupon code and couldn't. Investigating, we discovered the coupon had 1 maximum had been used 1 time already. Unfortunately we don't seem to have an easy way to track down what order the coupon was allegedly used on to see if we need to give the customer another coupon.
Any advice?
Thanks,
Cliff
Comments
Comment #1
craigstanton CreditAttribution: craigstanton commented+1 for this.
I think the most suitable place would be a link from the Times Used column to a list of all orders that used that coupon.
In the meantime it's a matter of inspecting the database. Try the field_revision_commerce_coupon_order_reference table and match the commerce_coupon_order_reference_target_id (coupon id) with the entity_id (order id) column.