CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • CiviDiscount Extension
Pages: [1] 2

Author Topic: CiviDiscount Extension  (Read 2596 times)

EdP

  • I post frequently
  • ***
  • Posts: 260
  • Karma: 7
  • CiviCRM version: 4.4
  • CMS version: Joomla 2.5.x
CiviDiscount Extension
August 25, 2012, 02:12:51 am
Perhaps a really silly question, but... where do you create the discounts? I can't see any different functionality in CiviEvent and in a user profile I can see a tab for "Codes Redeemed". But where do you create the codes?

Thanks
Ed

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviDiscount Extension
August 25, 2012, 06:41:46 am
you need to visit: <your site>/civicrm/cividiscount?reset=1

Kurund
Found this reply helpful? Support CiviCRM

EdP

  • I post frequently
  • ***
  • Posts: 260
  • Karma: 7
  • CiviCRM version: 4.4
  • CMS version: Joomla 2.5.x
Re: CiviDiscount Extension
September 05, 2012, 06:17:46 am
Thanks - and now the inevitable follow up question - how/where does the event participant/potential member enter the discount code. What do I have to do - create a profile in the page (in which case which field?) or do something in the price set?

There is no automatically added field in contribution pages for the end user to take advantage of - so what must I do?

E

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviDiscount Extension
September 05, 2012, 06:47:20 am

the discountCode text box should appear at the top of the event registration page. the location is quite clunky :(

alternatively u can send them a link with an email to the registration page and add the discountCode to the link

so the link would be:

civicrm/event/register?reset=1&id=XXX&discountCode=YYYY

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

EdP

  • I post frequently
  • ***
  • Posts: 260
  • Karma: 7
  • CiviCRM version: 4.4
  • CMS version: Joomla 2.5.x
Re: CiviDiscount Extension
September 05, 2012, 07:54:41 am
Thanks - oddly it didn't appear when I first loaded this page but did the second time, but even then it appears not to work.

So for example this event: https://www.marlowrowingclub.org.uk/index.php?option=com_civicrm&task=civicrm/event/register&Itemid=252&id=64&reset=1

has a discount code "free" which gives a 100% discount and another "half" which gives 50% off.

When I first loaded it I didn't see a box but did get an error message coming up at the bottom:

"Warning: Invalid argument supplied for foreach() in /home/marlow/www/www/administrator/components/com_civicrm/civicrm/CRM/Event/Form/Registration/Register.php on line 255"

On a reload a box appeared at top and bottom, with the same error. Putting in invalid code in the box (correctly) brought up an error, but a valid code was accepted but didn't appear to work.  Although it was accepted, the amount demanded on the confirmation page was still the original and I was still dispatched to paypal with a demand for the full price: same result when using the "full" or "half" discounts even though for "full" I shouldn't have had to go to PayPal at all. In the back-end the code was not registered has having been used (although I didn't make the payment demanded because it was wrong).

Separately, the module itself says that it can be used for "memberships, events and price sets" - so should a box also be appearing on pages for membership registration or which use those price sets (i.e. general contribution pages?)

Finally, is the box only supposed to appear when there is a discount code available for that event, or does it appear for all events (even where there aren't any discount codes)

Thanks - happy to help with documentation of this once I understand it myself!

Ed

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviDiscount Extension
September 05, 2012, 08:41:24 am

Unfortunately we've not had time to test / take it thru its paces for 4.2. We have the 4.1 version running on civicrm.org

we basically ported the module with the folks from dharmatech for the needs of civicon registration and are using it for civicon london :)

Seems like the module requires some amount of love and care for it to work in 4.2 (as you and some others have noted). we do not have the free time to do so right now. I suspect this is a 20-25 hour project and if someone is willing to fund it, that would be great and will help make it happen.

with regard to your specific questions below:

1. Dont know about the error or why the code does not work. We've not tested it in joomla and/or wordpress

2. Not tested membership, but seems like it should appear on membership pages. Note that due to some schema changes in 4.2 all event/contrib/membership pages use pricesets

3. finally, IMO the box should only appear when an event can be discounted.

Sorry, cant be a whole lot more help here

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

EdP

  • I post frequently
  • ***
  • Posts: 260
  • Karma: 7
  • CiviCRM version: 4.4
  • CMS version: Joomla 2.5.x
Re: CiviDiscount Extension
September 05, 2012, 08:43:20 am
OK, thanks for this.

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: CiviDiscount Extension
September 12, 2012, 09:20:48 pm
I'm running into an issue with it not working at all. I'm on Drupal7 with CiviCRM4.2.

On a membership page, I put in the code (it's for $125 off). On the next page it says it is for 125% off. Nothing is removed from the total.

On an event page, nothing shows as far as the discount on the next page.  At the top is this error:

Warning: Invalid argument supplied for foreach() in CRM_Event_Form_Registration_Register::formRule() (line 887 of /home/username/public_html/sites/all/modules/civicrm/CRM/Event/Form/Registration/Register.php).

The total stays at the regular price.

EdP

  • I post frequently
  • ***
  • Posts: 260
  • Karma: 7
  • CiviCRM version: 4.4
  • CMS version: Joomla 2.5.x
Re: CiviDiscount Extension
September 13, 2012, 04:01:10 am
As I and others discovered, and Lobo freely admits above, it doesn't really work on 4.2, so your options are to fix it yourself, fund someone to fix it, or wait until someone else has a go.

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: CiviDiscount Extension
September 13, 2012, 11:52:20 am
I really wish the page on this hadn't said "stable", otherwise I would't have told people that it worked. I definitely can't fix it myself, as I'm not a coder and don't have any funds to fix it since I'm on a project that was supposed to be done months ago, but the previous people ran it over and over.

Looks like we need to find someone who can do the work so we know how much and get up a thing so we can pull together the funds.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviDiscount Extension
September 13, 2012, 01:47:10 pm

Sorry, we'll be rolling it back and calling it an alpha release

It was actually quite stable for 4.1 where we are using it in production :) but a few too many other underlying changes in 4.2

We'll see if anyone at the sprint is interested in working on it. We suspect this is a 20-25 hour project to fix all bugs and get it to work a lot better with "4.2 style pricesets". FYI, we did have an MIH for this in 4.x series but did not get any interest

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: CiviDiscount Extension
September 13, 2012, 03:28:33 pm
I think a lot of times people miss that the MIH ones are going on. I'd looked several times over the last year or so, but must've missed that one being up.

It's funny, because I switched to 4.2 because it showed that the discount worked with it. Otherwise I would've stayed back at 4.1!  ;)

For right now we're digging through the code to see if we can get it to work with what we're using now. That way we can at least get something going for this site for the time being. We're not using anything super complex or anything. We just need members to be able to get discounts on events and a discount on renewals since there isn't different pricing available for memberships as opposed to renewals.

EdP

  • I post frequently
  • ***
  • Posts: 260
  • Karma: 7
  • CiviCRM version: 4.4
  • CMS version: Joomla 2.5.x
Re: CiviDiscount Extension
September 26, 2012, 12:17:26 am
Incidentally for the record the URL for getting this going for Joomla users is:

....administrator/?option=com_civicrm&task=civicrm/cividiscount&reset=1

The URL given further up the thread is for Drupal.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviDiscount Extension
September 26, 2012, 12:35:57 am

FYI, someone has been contributing bug fixes for the master branch. I've committed all of these to master and will plan on doing a release soon

the README shows a few bugs / things we still want to do. If anyone can help knock a few more of these issues that would be great

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: CiviDiscount Extension
October 06, 2012, 03:56:26 pm
Where would I find that readme and the files? I had someone who was going to take a look to see if they could get it working enough so we could use it for what we needed, and it looks like I should grab the newest files and that readme so she can work with those.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • CiviDiscount Extension

This forum was archived on 2017-11-26.