Support

Home Forums Event Espresso Premium How can I track discount code use?

How can I track discount code use?

Posted: March 27, 2013 at 3:51 pm


Toronto Adventures Inc.

March 27, 2013 at 3:51 pm

Hi,

We run an outdoor recreation company in Toronto, Canada called Toronto Adventures Inc.. We started to use discount codes on our WordPress based website around a year ago. In order to track how effective these codes have been, we require a way to track various details about our discount code use. At the bare minimum we need to know how many of each type of discount code have been used. I realize we can accomplish this by exporting each events registration data into excel, but the process would be an ongoing nightmare. Is there any easy way to acquire this data. All of our site info is bellow. Thanks in advance for any help.

WP version 3.51
Event Espresso version 3.1.30.7P

Installed plug-ins:
Adminer Version 1.2.3
Akismet Version 2.5.7
BackupBuddy Version 2.2.10
bbPress Version 3.0
Contact Form Manager Version 1.3
Custom Contact Forms Version 5.1.0.2
Custom Field Template Version 2.1
DK New Media’s Image Rotator Widget Version 0.2.4
Enhanced Text Widget Version 1.3.4
Event Espresso Version 3.1.30.7P
Event Espresso – Calendar Version 2.0.4
Event Espresso – MailChimp Integration Version 1.0.4
Event Espresso – Members Addon Version 1.9.6
Event Espresso – Multi Event Registration Version 1.0.4
Event Espresso – Recurring Events Version 1.1.7
Event Espresso – Social Coupons Version 1.5.3
Event Espresso – Social Media Version 1.1.4
Event Espresso – Voucher Import Version 0.1
Google Analyticator Version 6.4.3
Google XML Sitemaps Version 3.2.9
Headway Leaf: Navigation Leaf Version 1.0
Jetpack by WordPress.com Version 2.2
s2Member® Framework Version 130221
Social Media Widget Version 3.3
UI for WP Simple Paypal Shopping Cart Version 1.0.5
WordPress Database Backup Version 2.2.3
WP Simple Paypal Shopping cart Version 3.5

Here’s a link to one of our event registration pages:
http://torontoadventures.ca/intro-kayaking-canoeing/


Sidney Harrell

March 27, 2013 at 6:10 pm

I was able to code this up without too much trouble. In the file includes/admin-files/coupon-management/index.php, starting at line 61, should be changed to:

                <th class="manage-column column-date" id="begins" scope="col" title="Click to Sort" style="width:20%;"><?php _e('Percentage', 'event_espresso'); ?></th>
                    <th class="manage-column column-comments num" id="count" scope="col" title="Click to Sort" style="width:15%;"><?php _e('# of Times Used', 'event_espresso'); ?></th>
                </tr>

Then at line 75:

$coupon_code = $event_discount->coupon_code;
                        $sql = "SELECT COUNT(id) FROM " . EVENTS_ATTENDEE_TABLE . " WHERE coupon_code = '%s'";
                        $coupon_code_count = $wpdb->get_var($wpdb->prepare($sql, $coupon_code));
                        $coupon_code_price = $event_discount->coupon_code_price;

Then at line 90:

<td class="author column-author"><?php echo $use_percentage ?></td>
                            <td class="author column-author"><?php echo $coupon_code_count ?></td>
                        </tr>

The support post ‘How can I track discount code use?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso