Git Product home page Git Product logo

org.civicrm.module.cividiscount's Introduction

CiviDiscount Extension

ADVANCED FILTERS

CiviDiscount now allows you to specify your own criteria for who should get automatic discounts. This is a powerful feature but does require some technical skill and thorough testing is recommended. Use the api explorer (on your site at the url civicrm/api/explorer) to help you discover the api options you could pass.

You need to specify an API Entity that you want to query and a query string. If you specify contact then the logged in contact id will be passed in as 'id'. For all other api it will be passed in as 'contact_id'

In this image you can see that contacts with a value of 1 in custom id field 65 (which happens to be 'are you retired' in this case) will get an automatic discount if they meet other criteria above - ie a minimum age of 65)

DOCUMENTATION

View the CiviDiscount documentation on https://docs.civicrm.org.

NEEDED

  • Enhance UI with an "apply discount" button that updates displayed prices on any forms

    • basically you want to emulate having the discount code sent in via the URL and let the person know if discount code is bogus
    • it would be nice to do this with ajax but isn't worth much effort.
  • Create some user documentation

    • Two types of discounts: automatic membership and code-based.
    • Supports discounted memberships, events, pricesets
    • Describe automatic member discounts (use random code never given to public)
    • Show tracking interface

NICE TO HAVE

  • Give some control over the placement of the discount code text field on the form.

FIXED ALREADY

  • Fix/check cividiscount_civicrm_buildAmount() for both online and offline forms/cases (event registration):
    • check multi-participant case well (currently this needs to be enabled in code)
  • Fix/check cividiscount_civicrm_buildForm() for both online, offline and renewal forms/cases (memberships):
    • check multi-step form case well
  • Check all transaction amounts match amount displayed on forms.
  • Fix or remove CDM_BAO_Item::copy(). Currently it's just a copy of CDM_BAO_Item::delete().
  • Adapt for 4.2 priceset structure.
  • Create menu link for CiviDiscount extension under Administer
  • Fix cividiscount_civicrm_pre():
    • When a contact is deleted, we should also delete their tracking info/usage.
    • When removing participant (and additional) from events, also delete their tracking info/usage.
    • When deleting membership record, also delete their tracking info/usage
  • Fix/check cividiscount_civicrm_postProcess() tracking for all forms/cases:
    • check we have correct participantID, membershipID, contributionID when it's needed for tracking
    • check generic generic contribution cases well (discount is not available for this)
  • Fix/check discount tracking tabs.
  • Generally clean up the code and logic.
  • Carefully review discount verification and applicability:
    • fix _get_discounted_event_ids(), _get_discounted_priceset_ids(), _get_discounted_membership_ids() to return events/pricesets/memberships only for active code
  • Enhance UI to show which discount code has been applied.
  • Fix membership discounts not working from civicrm/contact/view [Submit Credit Card Membership] - CRM-11028.

org.civicrm.module.cividiscount's People

Contributors

catherinewallis avatar christianwach avatar colemanw avatar davecivicrm avatar deepak-srivastava avatar dharmalabs avatar eileenmcnaughton avatar h-c-c avatar herbdool avatar homotechsual avatar joemurray avatar kajakaran avatar kewljuice avatar kilakwabt avatar kurund avatar mattwire avatar megaphonejon avatar mlutfy avatar monishdeb avatar nganivet avatar pradpnayak avatar priyankakaran26 avatar relldoesphp avatar samuelsov avatar sdragnev avatar seamuslee001 avatar seancolsen avatar stoob avatar sunilpawar avatar veda-consulting avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

org.civicrm.module.cividiscount's Issues

CiviDiscount broken in CiviCRM 4.6

Running CiviCRM 4.6, CiviDiscount 3.0, and WordPress 4.1

All of my contribution pages showing this error message:

"Warning: array_keys() expects parameter 1 to be array, null given in /home/.../www/wp-content/plugins/files/civicrm/extensions/org.civicrm.module.cividiscount/CRM/CiviDiscount/DiscountCalculator.php on line 114"

Monetary turns into percentage

This module is precisely what we need for an event we're doing (each teacher gets a discount code and that's how we track referrals).

I installed CiviDiscount on a fresh Drupal 7 + CiviCRM 4.1.6 this evening, and I installed CiviDiscount, and it mostly works. Bug: I put in Discount: 80, and Amount Type: Monetary, and when I go through registration I get 80% discount. I tried switching to Percentage to see if they got switched, but that gave 80% discount as well. I tried a different discount code, same results.

If there's a way to hack a fix of this in the next day or week, I'm willing to play. I have experience configuring web software, but not coding it (yet).

CiviDiscount needs to work with Tax

With 4.6 now offering sales tax option for prices, CiviDiscount needs to take that in to account.

Tax is being calculated on the pre-discount price.

For example, if a member is offered 50% discount on a $100 item with 20% tax. The tax should be $10 not $20 as per the current demo.

Thanks

Link to paypal contains incorrectly formatted item amount

Hi, have a site on Drupal 7.18, CiviCRM 4.2.7, and cloned the latest Cividiscount module from here, but when I apply a discount to an event I'm setting up, the link that gets sent to Paypal "contains an incorrectly formatted item amount". I removed the discount and it works. Any idea why this might be occuring?

CiviDiscount doesn't work for events in 4.3

Not sure if this is a 4.3 issue or it's also broken in 4.4

Seems like the discount is completely dependent on the priceset ID of the event, however that priceset is not saved when creating a discount.
The "priceset" field in the database is null yet the code only applies the discount if the price set ID is set.

See cividiscount.php:434:

if (CRM_Utils_Array::value($option['id'], $discount['pricesets'])) {
  // apply discount
}

CiviDiscount either has to save the price set ID when creating the discount or that if statement has to change.
Of course the former will only work for new discounts and will break any current ones so it's not much of a solution.

I'll take a look at it today and report back.

Looks like it's working on memberships, then doesn't

On the membership page, the discount is reflected in the price, just as expected and as it is in price-set discounts. However, once credit card information is input, the next page uses a different process than the price-set discounts, and it doesn't actually work. It looks like the "Membership" and "Membership Fee" are computed separately, resulting in no discount taken.

Discounts on pay later lines do not result in the discount code being tracked

When a discount code is in use in paylater for a membership-by-price set the use of the code is not tracked.

Probably the discount code should in fact be consumed when payment is made rather than when it is entered - but in the absence of a status field - perhaps it makes sense to record it when first applying

CiviDiscount unavailable after install on CiviCRM 4.4.6.

I have installed successfully CiviDiscount from the CiviCRM extensions management page. Everything seems to be OK, i have my cividiscount administrator menu item.

Unfortunately "/civicrm/cividiscount?reset=1" points to the CiviCRM Home (with the dashboard).

So, the whole tool seems to be not available for our CiviCRM users.

Offline registration ("Register Event Participant") missing data for Track table

When registering a participant for an event, tracking data for entity_id, entity_table and contact_id were skipped.
Adding following lines (line # 647-649 in cividiscount.php) fixes the problem:
$trackingItem['entity_id'] = $entity_id;
$trackingItem['entity_table'] = $entity_table;
$trackingItem['contact_id'] = $contact_id;

I can submit a patch if someone lets me know where I should submit it (a .diff file of cividiscount.php)

Discount not calculated correctly in some cases

If the original price is a float, the discount is not calculated correctly.
cividiscount.php:392 casts the original price as an integer:

$originalAmount = (integer) $originalAmounts[$fee_id]['options'][$option_id]['amount'];

Not sure why.

Discounts on memberships getting inappropriately auto-applied on backend

member-1
member-2

It's my understanding the attached membership discount is NOT supposed to be auto applied. But when on the "back end" a member is created, the discount is applied without entering a code.

Interestingly this only happens for a single membership discount. Other discounts on memberships (which exist) do not show up as auto-applied.

Make credit card not required for 100% discount

Current setup works well with the Paypal Standard payment processor. However, processors that require credit card info on page (such as Stripe) cannot be submitted without CC info, even if the discount is 100%. Most people with 100% discounts will not want to enter their credit card information. These field should not be required (and possibly hidden) when the discount is 100%. Some possible approaches are described here: http://drupal.org/node/1140220

3.0 not working for automatic event discounts based on membership

I don't think cividiscount.php:403 can ever evaluate to true if the user is not using a code, the event has no price sets and there's an automatic discount based on a membership.

Here's the line in question:

if (!empty($applyToAllLineItems) || CRM_Utils_Array::value($option['id'], $priceFields)) {

Priceset problem with Civi 4.4.0

I encountered a problem with CiviDiscount v2.2 with Civi 4.4.0.

In extensions/org.civicrm.module.cividiscount-2.1/CDM/Utils.php you need this patch if you want to run CiviDiscount v2.2, since the name has changed:

  • if (CRM_Core_DAO::getFieldValue('CRM_Price_DAO_Set', $priceSetId, 'is_quick_config')) {
    
  • if (CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $priceSetId, 'is_quick_config')) {

Extend Event discount inclusion options

We have been looking at cividiscount for a customer who would like to be able to apply discounts to events without having to go back & configure every event they add with a discount.

My expectation was that if you configured a price set in the section "If you use price sets for your events, you also need to select any discountable price sets below." and did not select any event then that would mean that the discount would be applied to 'ALL events that have that price set item configured'. This doesn't appear to happen - is it a bug I can patch or is it a feature?

If the latter I guess I could potentially add an 'apply to all events' checkbox - or a select box for events types (we may do this as well any way). I think the event select select would need to grey out if an event type is selected - & vice versa

API (CiviDiscount, get) does not exist (join the API team and implement it!)

running the current master as well as the released 3. version gets me the following message when I want to save a discount rule, leaving the api field empty.

Sorry but we are not able to provide this at the moment.
API (CiviDiscount, get) does not exist (join the API team and implement it!)

Am I missing something?

Amount type "Monetary" ignored

Got the latest CiviDiscount last night (Aug 8) and installed. I'm using CiviCRM 4.2beta4 on Drupal 7.
I have created an automatic discount, which is given to people who are registering for an event and who have an active membership.
The discount is displayed correctly in the listing, but when I register for an event, the discount is given as a percentage of the base amount, not as a dollar amount discount.

On line 809 of cividiscount.php

if ( $code['amount_type'] == 'M' ) {

should be

if ( $code['amount_type'] == '2' ) {

Which contact id should be used

In cividiscount_civicrm_buildAmount there is some logic to determine the contact id:

    if (!empty($form->_pId)) {
      $contact_id = $form->_pId;
    }
    // Look for contact_id in the form.
    else if ($form->getVar('_contactID')) {
      $contact_id = $form->getVar('_contactID');
    }
    // note that contact id variable is not consistent on some forms hence we need this double check :(
    // we need to clean up CiviCRM code sometime in future
    else if ($form->getVar('_contactId')) {
      $contact_id = $form->getVar('_contactId');
    }
    // Otherwise look for contact_id in submit values.
    else if (!empty($form->_submitValues['contact_select_id'][1])) {
      $contact_id = $form->_submitValues['contact_select_id'][1];
    }
    // Otherwise use the contact id.
    else {
      $contact_id = CRM_Core_Session::singleton()->get('userID');
    }

I think we should add an extra 'elseif':

elseif ($form->getContactID() != 0) {
  $contact_id = $form->getContactID();
}

Or even replace the last logic statement:

else {
  $contact_id = $form->getContactID();
}

When a user subscribes another contact to an event, the id of that other contact will be taken.

Apply discount button looks 'jammed up top of page'

This isn't so much of an issue for backoffice forms but for front-end the most appropriate place would normally be before the price set.

CRM-16682 adds a region before the priceset & the ability to prepend & with this patch the region is added in that location for online contribution pages (have not looked at events or back-office)

Trim whitespace around code when entered

When trying to compare different versions of this extension I find that at some point the discountcode was being trimmed - this seems to be a sensible thing which should be re-introduced

diff --git a/cividiscount.php b/cividiscount.php
index 93a7f47..b75ad55 100644
--- a/cividiscount.php
+++ b/cividiscount.php
@@ -137,7 +137,7 @@ function cividiscount_civicrm_buildForm($fname, &$form) {

 if ($form->getVar('_single') == 1 || in_array($form->getVar('_context'), array('membership', 'standalone'))) {
   _cividiscount_add_discount_textfield($form);
  •  $code = CRM_Utils_Request::retrieve('discountcode', 'String', $form, false, null, 'REQUEST');
    
  •  $code = trim(CRM_Utils_Request::retrieve('discountcode', 'String', $form, false, null, 'REQUEST'));
    
    if ($code) {
    $defaults = array('discountcode' => $code);
    $form->setDefaults($defaults);

Contribution pages with memberships timing out with logged in users

Something caused a regression with the 3.x of this extension, as far as I can tell. Just upgraded to 4.6.8 and 3.x of this extension.

Have been using this extension in Civi 4.4.x with v 2.6. on contribution forms with memberships. The client had created hundreds of discounts (single use discounts) but loaded fine on the page.

Now after the upgrade all contribution pages with memberships (even memberships with no assigned discount) time out. Error logs can only tell me that it has exceeded the maximum execution time and New Relic is showing heavy database calls from Civi.

There are two conditions where I can get the page to load:

  1. Make most discounts inactive so there are only a couple hundred tops. Page still loads quite slowly but it loads (14 seconds in 4.6.8/3.x compared to 3 seconds in 4.4.19/2.6)
  2. Or, view the contrib pages as anonymous (3 seconds in 4.6.8/3.x).

This suggests that it keeps trying to check if the current user is eligible for any discounts, or something like that.

I'm going to ask the client if they need all those discount codes active but seems like worth reporting that there is an upper bound to how many discounts can be checked before a page is fully loaded. Funnily, they never had this problem with the older 2.x versions.

Joomla

Hi

I'm trying to test in Joomla and I can't get any menu options or direct link to the module.

I have tried:
task=civicrm/menu/rebuild&reset=1
task=civicrm/cividiscount/discount/list&reset=1
remove templates_c
cleared CiviCRM cache through Administer
forced menu rebuild buy edit and save in administer navigation

Extension installed fine through CiviCRM extensions and sql is all in db

I am running
Ubuntu server with up to date php and mysql
Joomla 2.5.4
CiviCRM 4.1.1 (I can't find 4.1.2 as you mention in the wiki instructions)

Many Thanks
Generic

CiviDiscount "Codes Redeemed" data lost during merge procedure

When you merge 2 duplicate individual records (using "Find and Merge Duplicate Contact Records under the Contacts menu) together that both contain "Codes Redeemed", that CiviDiscount data is completely lost/deleted and NOT merged into the final record.

Here is the merge screen, notice there is nothing about merging the CiviDiscount data:
cividiscount-mergescreen

Here is what MySQL says BEFORE the merge:
mysql> select id,item_id,contact_id,contribution_id from cividiscount_track where contact_id IN (66855,2492);
+------+---------+------------+-----------------+
| id | item_id | contact_id | contribution_id |
+------+---------+------------+-----------------+
| 157 | 28 | 2492 | 16023 |
| 757 | 73 | 2492 | 17309 |
| 1501 | 73 | 66855 | 18229 |
+------+---------+------------+-----------------+
3 rows in set (0.00 sec)

Here is what MySQL says AFTER the merge:
mysql> select id,item_id,contact_id,contribution_id from cividiscount_track where contact_id IN (66855,2492);
+-----+---------+------------+-----------------+
| id | item_id | contact_id | contribution_id |
+-----+---------+------------+-----------------+
| 157 | 28 | 2492 | 16023 |
| 757 | 73 | 2492 | 17309 |
+-----+---------+------------+-----------------+
2 rows in set (0.00 sec)

If you check the Discount Code usage in the CiviCRM Discount Codes Page, it also has no record of the usage, example: Before the merge it would say 2/10 codes used, but AFTER the merge is reports 1/10 codes used.

CiviCRM 4.4.20
CiviDiscount 2.6
Drupal 6.37

Automatic discount not working

After the upgrade of Civicrm to 4.5, the link in the menu to CiviDiscount disappeared. We saw there was an upgrade of Cividiscount (3.0) so we upgraded the extension and the link in the menu reappeared.
Now with this configuration, the automatic discount for members doesn't work anymore.

The discount works if you enter it manually in the event registration page.

Do you know what could have gone wrong?

Using Pricesets for memberships causes Discount Tracking to fail.

The following is not using any Priceset, but instead what you would find on the Contribution page Membership Section.
No Pricest

This is using a priceset:
Priceset

Notice that in this one, $membership_type is an array. This is because you can select more than one. With that said, how is usage going to be tracked on multiple memberships? Should it be per membership or per invoice. In this case I still only have 1 membership but could easily have 2 or 3. For now I'm going to create A PR that fixes it where if you have any of the memberships, it creates only one record.

This is an issue in 2.5 as well as master. See https://github.com/dlobo/org.civicrm.module.cividiscount/blob/master/cividiscount.php#L624

discount calculator gets it wrong for an event, with autodiscount based on membership

This screenshot shows that the value of ($discountCalculator->autoDiscounts) returns an empty array, while also displaying the whole CRM_CiviDiscount_DiscountCalculator Object with the autodiscount information as defined in the discount config pane.

The autodiscount criteria are met, and those values are being displayed in debug messages.

screen shot 2015-11-15 at 3 27 14 pm

I'm suspecting function filterDiscountsByContact since it's the only place that seems to reference autoDiscounts in DiscountCalculator.php.

change "Member Discount" to "Includes member discount of:"

In cases where an event includes both early bird pricing AND a member discount, I've gotten feedback from more than one client that the attached is confusing. The 'full price' without early bird or membership is $100.

This is what I hear: Is the member discount $25 off or is it $25? Does my membership discount stack with the early bird pricing or not? Why is the internet so hard and where is my coffee?

We can't fix ______, but changing the wording would help make sense of the discounts a great deal. Word Replacements is no effect.

uhhh

Description changes don't migrate

Changing the description of a discount does not change the text in the message displayed.

We would like to have a discount that will be useful once per person with the description text "Want a discount? Use code -insertcodehere- and you will get one!" or something like that. Changing the description code does not change the displayed text in the discount section of the contribution.

Make credit card not required for 100% discount - CiviMember

Yes - I know this has already been brought up (and marked as outside the scope of the module), but I'm wondering if anything's been done in the intervening time. I suspect something's been done insofar as the CC box disappears for Events when the amount goes to 0 - but the same doesn't happen for Memberships.

#10

My situation is as follows: The organization has different sponsorship levels; a Gold Sponsorship will include 5 yearly memberships and so on. If a sponsored member uses the discount code, the amount will go to $0 as expected - but the CC fields still appear and are mandatory.

Nobody would enter a CC number in this case - would you? So we can't use CiviDiscount for user-entered sponsored Memberships, which is unfortunate. (We'll need to add the members manually.)

This was a shock to me - with Events, everything works fine - the CC box disappears. I didn't expect Memberships to act differently, but there we are.

This was evidently fixed for Events - can the same functionality be applied for Memberships? If I was a coder, I'd dig in, but I'm not. The site is http://usgbc-li.org, BTW.

Any ideas? Any guidance or workarounds greatly appreciated… thanks!

Oh - I'm on Civi 4.4.5 - haven't made the jump to 4.5 seeing that CiviDiscount doesn't seem to be supported.

Multiple Criteria Matching For Discounts

I have a discount scenario where a "customer" is only eligible for the discount if they're purchasing two memberships (different programs in our organization). It's a $25/each or $35 for two situation.

It doesn't look like there's any facility for checking discount eligibility based on "and" criteria instead of "or" criteria. I'd be interested in working on that, but I've never written for Civi before. Any estimation of how complex that would be?

Multiple CiviContribute Errors Under WordPress

CiviDiscount is generating multiple errors on CiviContribute pages running on WordPress, when a user is logged in.

Warning: array_keys() expects parameter 1 to be array, null given in /home/..../www/www/wp-content/plugins/files/civicrm/extensions/org.civicrm.module.cividiscount/CRM/CiviDiscount/DiscountCalculator.php on line 108

Warning: Invalid argument supplied for foreach() in /home/..../www/www/wp-content/plugins/files/civicrm/extensions/org.civicrm.module.cividiscount/CRM/CiviDiscount/DiscountCalculator.php on line 108

This error repeats 27 times for me

Bottom "Edit" button on View Discount page gives malformed URL

View a discount code at:
http://www.example.com/civicrm/cividiscount/discount/view?id=1&reset=1

Click on Edit button at top of page, and it works, with this URL:
http://www.example.com/civicrm/cividiscount/discount/edit?reset=1&id=1

Click on Edit button at bottom of page, and it doesn't work, with this URL:
http://www.example.com/civicrm/contact/view/contribution?reset=1&id=1&cid=&action=update&context=
gives this error:

Sorry but we are not able to provide this at the moment.
cid (value: ) is not of the type Positive

Return to home page.

Must select at least one option in order for discount to be applied and not considered invalid

I can confirm this error with 4.5.4 / cividiscount 3.0. I had to individually select every price option in order for the discount to work at all. I think this is better as it's own issue so I'm referencing the comment from issue #35.

I believe this is a bug since cividiscount says:

If your form uses a price set, the discount will be applied to all options in the set by default. However, if you want the discount to be applied only to specific price options - select those options here.

CiviDiscount doesn't work for Membership Contribution pages

Adding a discount code to a Membership does not seem to work when checking out. If you input the code on the contribution page the discounted price will be reflected. However, when you check out, the full price is shown even though it says the discount is included and subsequently you will always be charged the full price.

Event reg. fails if number of participants is greater than available usage for unentered manual code

Weird situation: We have a conference registration page up, and have both automatic member discounts (unlimited usage), and some manually entered ones (limited to 20-30 uses). One of our members went to register 3 people at once, using only the auto-discount, and got an error saying there weren't enough uses of that code available. One of the manual codes was at 20/21 uses.

A little testing:
Setting the manual code to 25 uses makes 3 person registration work fine.
Setting the manual code to 20 uses makes 3 person registration work fine.
Setting the manual code to 25 uses and attempting a 7 person registration fails.

My non-code analysis is that the module seems to be checking all possible discount codes versus the number of participants (P), and failing if the available codes is above zero but less than P. Seems like it shouldn't check any codes that aren't entered, but perhaps there's a use case that I'm missing?

Image in eileenmcnaughton's github results in page not found

I followed the link https://github.com/eileenmcnaughton/org.civicrm.module.cividiscount/blob/extended_filters/docs/images/advancedFilters.jpg
but no image is shown, just 404

On another note, re: Nice to have 'Give some control over the placement of the discount code text field on the form.' I added an extension template (Register.extra.tpl) using jquery to 'place' discount code box after price total on event Registration form, I can attach or submit as a patch. A user would need to find an element in the form if they want to change it.

CiviDiscount Menu Item redirects to Civi Dashboard

I have installed CiviDiscount via the Extensions installer. CiviDiscount displays in the Administer Menu, but when clicked it takes me to the dashboard page.

The URL is correctly displaying as "civicrm/cividiscount&reset=1", but it's the dashboard view.

screen shot 2014-06-23 at 11 46 43 am

Could not find valid value for id when applying code to event with price set

The documentation seems to infer that without specific price sets specified, a discount will be applied to ALL price fields, but instead it returns an error. (see attached and backtrace below)

price_set_1
price_set_2

backTrace
#0 /home/resolutions/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(380): CRM_Core_Error::backtrace()
#1 /home/resolutions/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/Request.php(105): CRM_Core_Error::fatal("Could not find valid value for id")
#2 /home/resolutions/www/www/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php(53): CRM_Utils_Request::retrieve("id", "Positive", Object(CRM_Event_Controller_Registration), TRUE)
#3 /home/resolutions/www/www/wp-content/plugins/civicrm/civicrm/CRM/Event/Controller/Registration.php(43): CRM_Event_StateMachine_Registration->__construct(Object(CRM_Event_Controller_Registration), TRUE)
#4 /home/resolutions/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(330): CRM_Event_Controller_Registration->__construct("Event Registration", TRUE, "null", NULL, "false")
#5 /home/resolutions/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(79): CRM_Core_Invoke::runItem((Array:15))
#6 /home/resolutions/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#7 /home/resolutions/www/www/wp-content/plugins/civicrm/civicrm.php(525): CRM_Core_Invoke::invoke((Array:3))
#8 internal function: CiviCRM_For_WordPress->invoke("<div class="shortcode1-2">\n<h1 style="text-align: left;"><span style="c...")
#9 /home/resolutions/www/www/wp-includes/plugin.php(213): call_user_func_array((Array:2), (Array:1))
#10 /home/resolutions/www/www/wp-content/themes/greenearth-v1-07/page.php(27): apply_filters("the_content", "[column col="1/2"]\r\n<h1 style="text-align: left;"><span style="color: ...")
#11 /home/resolutions/www/www/wp-includes/template-loader.php(74): include("/home/resolutions/www/www/wp-content/themes/greenearth-v1-07/page.php")
#12 /home/resolutions/www/www/wp-blog-header.php(16): require_once("/home/resolutions/www/www/wp-includes/template-loader.php")
#13 /home/resolutions/www/www/index.php(17): require("/home/resolutions/www/www/wp-blog-header.php")
#14 {main}

Sorry but we are not able to provide this at the moment.
Could not find valid value for id

Return to home page.

Auto Member status discount isn't saved

When I define an auto discount based upon membership status of 'New' (also try do the same with some other status), save and reedit, the membership statuses disappear. Working with CiviCRM 4.6.4 and CiviDiscount 3.1. I also recreate the problem with the demo site.

discount for additional participants

In the readme it states "Option to apply discounts to additional participants". I'm not clear what this mean, or indeed how to activate if useful.

It might simpy mean that any given discount code can be optionally applied to all participants being registered, where the form allows the user to register multiple participants. If so, that's fine, but I can't see how to turn this option on or off.

My use case is different. I'd like to set a price person, and then enable a discount for each additional person registered at the same time. That would go something like 50 for the first person and 40 for each additional person.

Alternatively I could use a discount that gave a percentage driven by the total number of participants registered at the same time. something like 5% off if you book three people onto the event, or10% off if you book five people or more on.

So, this might simply be a support request, seeking clarification of what the statement "Option to apply discounts to additional participants" means, or it might be perceived as as a feature request.

Undefined variable: discountApplied

$discountApplied is not set if event has no discounts so php complains about it.

Notice: Undefined variable: discountApplied in cividiscount_civicrm_buildAmount() (line 422 of [...]/org.civicrm.module.cividiscount/cividiscount.php).

Ability to duplicate a discount code

Create a new discount with a newly generated code but the same settings.

This is useful if (event) discounts are usually based on the same multiple membership types. It would save on having to readd membership types for each event discount.

I'll initiate a pull request that adds this.

Suddenly Stopped Working

I was using CiviDiscount for about a month with no problems, but all of a sudden, none of the discounts apply anymore.

No matter what is put in the discount box, the following error appears:

Please correct the following errors in the form fields below:
The discount code you entered is invalid.

Even with discounts that have worked in the past (and have not expired or changed) they suddenly do not work any more. What could have happened to make the coupons no longer work at all??

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.