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) »
  • Testing Cividiscount module
Pages: [1] 2

Author Topic: Testing Cividiscount module  (Read 5759 times)

bdanza

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 3
  • CiviCRM version: 3.4.6
  • CMS version: Joomla 1.5, Drupal 6.2x
Testing Cividiscount module
April 10, 2012, 10:37:03 am
Hello all,

I am trying to start playing with the Cividiscount module https://github.com/dlobo/org.civicrm.module.cividiscount but cannot figure out where to place the package and how to install it.

Drupal 7, civicrm 4.1.1

Any help

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: Testing Cividiscount module
April 10, 2012, 10:55:04 am

https://github.com/dlobo/org.civicrm.module.cividiscount/wiki/Install-instructions-for-4.1.x

This module is currently not supported and the schema is subject to change when we do an official release in 4.2. We are not planning to provide an upgrade script if the schema does change

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

bdanza

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 3
  • CiviCRM version: 3.4.6
  • CMS version: Joomla 1.5, Drupal 6.2x
Re: Testing Cividiscount module
April 10, 2012, 11:16:15 am
Thanks Lobo!

I ran the sql file in my local sqlmyadmin

B.

drewpal

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.4, 4.0
  • CMS version: Drupal, Joomla
  • MySQL version: 5.0.77
  • PHP version: PGP 5.3.8
Re: Testing Cividiscount module
April 14, 2012, 05:28:28 am
After running the sql file, did it work for you?

I have the extension enabled> It did not work and will not uninstall either.

bdanza

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 3
  • CiviCRM version: 3.4.6
  • CMS version: Joomla 1.5, Drupal 6.2x
Re: Testing Cividiscount module
April 14, 2012, 06:41:13 am
yes, it's working perfectly for me.

There are a couple of small quirks, but it does what I need it to.

B


drewpal

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.4, 4.0
  • CMS version: Drupal, Joomla
  • MySQL version: 5.0.77
  • PHP version: PGP 5.3.8
Re: Testing Cividiscount module
April 15, 2012, 01:41:58 am
With bdanza's help, I got the extension module 'working'. I basically had not rebuilt the menus.

I understand that this is not a 'production' extension but really need this functionality.

Lobo, I've setup a discount of 106.50. It kinda works on a price field of 256.50 only that it seems to be stuck on insisting that the discount is 106.50% and therefore zeroes out the field.
I've toggled between both monetary and percentage for a couple other attempts but seem to be stuck on percentage.

Any ideas?

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: Testing Cividiscount module
April 15, 2012, 09:49:56 am

Sorry, no idea about the below. We needed that module for civicon registration and hence did an earlier port. If you debug and find the bug, please do file an issue and attach the patch. Will help everyone

On a related note, if you and/or your client can help with that MIH it would be great:

http://civicrm.org/participate/mih#cmsagnostic

We are fairly close to having it fulfilled

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

drewpal

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.4, 4.0
  • CMS version: Drupal, Joomla
  • MySQL version: 5.0.77
  • PHP version: PGP 5.3.8
Re: Testing Cividiscount module
April 16, 2012, 04:09:12 am
Def will.
Talking to them. I've for the time being calculated the discounts as percentages and works for now.

jaymcgraw

  • I post occasionally
  • **
  • Posts: 106
  • Karma: 6
  • CiviCRM version: 4.1.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.11
Re: Testing Cividiscount module
April 27, 2012, 03:29:50 pm
For those who go this to work, any suggestions for someone it's not working for?

With the exception of step 3, I followed the instructions here: https://github.com/dlobo/org.civicrm.module.cividiscount/wiki/Install-instructions-for-4.1.x. For step 3, I grabbed the tarball from here: https://github.com/dlobo/org.civicrm.module.cividiscount/tarball/v4.1 and placed extracted it in the extensions directory.

On Civi 4.1.2. I have the extension (v4.1 tagged). It's showing as enabled. I've rebuilt the menu and cleared cache. Nothing about Civi Discount in the menu. Just brought to the Civi dashboard when navigating to /civicrm/cividiscount/discount/list&reset=1. Cannot disable the extension now.

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: Testing Cividiscount module
April 28, 2012, 02:53:03 pm

1. I fixed the issue with disablng / uninstalling when i ported the extension to use a few 4.2 features

2. seems like the hooks are not being called. I would try and figure out why that is not happening on your site at CRM/Utils/Hook.php and add some debug code there

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

jaymcgraw

  • I post occasionally
  • **
  • Posts: 106
  • Karma: 6
  • CiviCRM version: 4.1.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.11
Re: Testing Cividiscount module
April 29, 2012, 06:50:36 pm
This seems to have made a difference:

In CRM/Utils/Hook/Drupal6.php

Replace
Code: [Select]
return empty( $result ) ? true : $result;
with      
Code: [Select]
return $this->commonInvoke( $numParams,
                                   $arg1, $arg2, $arg3, $arg4, $arg5,
                                   $fnSuffix, 'drupal6' );

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: Testing Cividiscount module
April 29, 2012, 08:21:09 pm

hey jay:

can u please file an issue and we'll ensure we upgrade the code in D6 to match the other CMS

thanx for catching this

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

jaymcgraw

  • I post occasionally
  • **
  • Posts: 106
  • Karma: 6
  • CiviCRM version: 4.1.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.11
Re: Testing Cividiscount module
April 30, 2012, 05:30:23 am
Filed with patch.

http://issues.civicrm.org/jira/browse/CRM-10139


jaymcgraw

  • I post occasionally
  • **
  • Posts: 106
  • Karma: 6
  • CiviCRM version: 4.1.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.11
Re: Testing Cividiscount module
April 30, 2012, 03:10:51 pm
Discount extension is now working, so we're happy about that.

Now running into next necessary feature: On event registrations that the discount brings the amount due down to $0, credit card and billing information is still required. Any thoughts on an approach that I might work towards in handling this?

mclyde

  • I post frequently
  • ***
  • Posts: 171
  • Karma: 3
    • International Society for Bayesian Analysis
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.x
  • MySQL version: 5.136
  • PHP version: 5.2.16
Re: Testing Cividiscount module
May 08, 2012, 06:39:41 pm
Thanks Jay for the patch!

I have installed the extension on D6 Civi 4.1.2  and can create discount codes (both monetary and percent, fixed or random) but run into a couple of issues:

If I assign the code to an organization and go to their contact record, there is a tab for the code being assigned, but clicking on the tab does not bring up anything so the organization cannot redeem.

The event page does reflect the  automatic discount assigned to an individual, but when I try to check out I get an unrecoverable error  that the civicrm_discount table does not exist, but it is in the database... (can't cut and past the message right now so will have to do that latter)

best,
Merlise

Merlise Clyde

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

This forum was archived on 2017-11-26.