I have used this module successfully before, so I've just installed it on a site using Drupal 6.22 and CiviCRM 3.4.5 (using the latest dev version as at Sept 5 2011), which has a single live event (event date about two months in the future. I've created a discount code, but the code cannot see the event. Instead it reports that there are no upcoming events.

Thinking that maybe there was something wrong with the event, I created a new test event, but the discount code could not see this one either. However it did register the price set that I had previously set up, so I created a new price set specifically for my event, and the code could see the price set, so I applied the code to the price set. However, no code field was displayed on my event pages. Maybe I'm missing something obvious, but this module worked easily for me when I last used it.

Comments

tobedeleted’s picture

Additional information: I've just uninstalled and replaced the 23 Aug 2011 version of the module with an older version (I think dated Jan 18 2011), and this older code recognises my events straight away.

dharmatech’s picture

Assigned: Unassigned » dharmatech

upperholme,

We had to change the way we get event listings because we wanted to only display upcoming events. Since CiviCRM (3.4.4+), the API can be used with an 'isCurrent' parameter but would obviously break on older versions. So, we build the query with the DAO where end_date is greater than "now." My guess is, when you're loading the older code base you're looking at expired events.

If that's not the case, please update this issue w/the version of Civi and any specifics on your events.

dharmatech’s picture

Status: Active » Postponed (maintainer needs more info)
GregoryHeller’s picture

I can confirm that adding an end date to civievents causes them to display on the civievent discount code configuration form. Perhaps it would be a good idea to add some help text to the form indicating that for events to be available discounts they must have an end date.

dharmatech’s picture

Status: Postponed (maintainer needs more info) » Fixed

Added help text. Fixed in latest -dev release. You may need to wait 24 hours for the next release. If you need the ability to view events that don't have an end date, please post suggestions/patches to this ticket. Marking as fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

tobedeleted’s picture

I find that end dates can be a pain and potentially confusing, so I'd like to be able to have events with just a start date. Given that it seems more likely that all events will have a start date, why not use start date must be greater than now to filter all upcoming events?

dharmatech’s picture

Category: bug » feature
Status: Closed (fixed) » Active

Because you may want to add a discount code to a current event (one that has already started). Maybe we should create a new -dev branch w/support for 3.4.4+ and use the "isCurrent" flag? This new branch could be the starting point for a D7 module or at the very least verified Civi 4.x support.

dharmatech’s picture

Status: Active » Fixed

Fixed in latest -dev release. You may need to wait 24 hours for the update to appear.

@upperholme I changed the query to show active current and future events with or without an end date.

tobedeleted’s picture

Neat - big thanks dharmatech.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.