We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 3806 - Add a la carte items to registration
Add a la carte items to registration
Status: RESOLVED FIXED
Product: OCS
Classification: Unclassified
Component: Single Conference System
2.1.2
PC Linux
: P1 normal
Assigned To: Juan Pablo Alperin
: 3826 3827 3829 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-09 09:20 PDT by Alec Smecher
Modified: 2009-02-24 09:19 PST (History)
2 users (show)

See Also:
Version Reported In:
Also Affects:


Attachments
Patch against OCS pre-2.1.2 CVS (94.89 KB, patch)
2008-10-19 15:48 PDT, Alec Smecher
Details | Diff
Patch against OCS pre-2.1.2 CVS (35.52 KB, patch)
2008-10-21 18:14 PDT, Juan Pablo Alperin
Details | Diff
Patch against OCS pre-2.1.2 CVS (113.81 KB, patch)
2008-10-21 19:57 PDT, Juan Pablo Alperin
Details | Diff
supplement to OCS patch (1.25 KB, patch)
2008-10-28 18:14 PDT, Juan Pablo Alperin
Details | Diff
Patch against OCS pre-2.2 (or is going to be called 2.3?) CVS (94.69 KB, patch)
2008-10-29 14:37 PDT, Juan Pablo Alperin
Details | Diff
in_array error: OCS pre 2.3 CVS (1.43 KB, patch)
2008-10-30 15:09 PDT, Juan Pablo Alperin
Details | Diff
Registrant Report Patch: against PKP 2009 install OCS 2.1.1 (5.44 KB, patch)
2008-11-03 07:24 PST, Juan Pablo Alperin
Details | Diff
Registrant Report Patch: against pre 2.3 CVS (5.44 KB, patch)
2008-11-03 07:25 PST, Juan Pablo Alperin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alec Smecher 2008-10-09 09:20:47 PDT
Add a la carte items to registration.
Comment 1 Alec Smecher 2008-10-19 15:48:00 PDT
Created attachment 1039 [details]
Patch against OCS pre-2.1.2 CVS
Comment 2 Siavash Miri 2008-10-20 21:51:40 PDT
in this file: classes/registration/RegistrationOptionDAO.inc.php

line 218 has field count of 7 and line 220 has value count of 6.

perhaps we should take out "currency_code_alpha" from the fields row.
Comment 3 Juan Pablo Alperin 2008-10-21 18:14:26 PDT
Created attachment 1046 [details]
Patch against OCS pre-2.1.2 CVS

I made the correction Siavash noted in the previous comment and two other very minor changes: 
-userRegistrationForm.tpl had an open <label> tag
-I added a "cost" field to the "Create New Registration Option" that gives an explanation (saying costs must be set in the registration type.  Of course, new Locale key for this also.

I should note that in the future it might be nice to allow for registration options to be enabled/disabled per registration type.  i.e. perhaps not all options should be available for application types.  This can be solved by putting a checkbox next to the cost in the registration type edit page.  However, I think this is a good start and we can start using it for the PKP conference.
Comment 4 Kevin Stranack 2008-10-21 19:21:52 PDT
The registration options chosen by the registrant do not appear in the Registration Report (under Stats & Reports).
Comment 5 Juan Pablo Alperin 2008-10-21 19:57:45 PDT
Created attachment 1047 [details]
Patch against OCS pre-2.1.2 CVS

Patch solves various other bugs found:
- price was not being set properly for registration type + options chosen
- added .00 to prices (not $, as this is not convention followed to be flexible for multiple currencies)
- dates now allow up to +10 years

still pending:
comment #4 - I haven't touched reporting yet, but everything seems to be recorded correctly in database for now, at least.
Comment 6 Juan Pablo Alperin 2008-10-21 19:59:21 PDT
*** Bug 3826 has been marked as a duplicate of this bug. ***
Comment 7 Juan Pablo Alperin 2008-10-21 20:01:03 PDT
*** Bug 3827 has been marked as a duplicate of this bug. ***
Comment 8 Juan Pablo Alperin 2008-10-21 20:02:16 PDT
*** Bug 3829 has been marked as a duplicate of this bug. ***
Comment 9 Siavash Miri 2008-10-22 15:52:23 PDT
Patch worked fine.

However, your patch removes the template config file (config.TEMPLATE.inc.php). Is that needed? Perhaps that should be taken out of the patch?
Comment 10 Juan Pablo Alperin 2008-10-28 18:14:52 PDT
Created attachment 1056 [details]
supplement to OCS patch 

patch for OCS did not include a patch of the ReviewFormHandler which was added at almost the same time as original patch
Comment 11 Juan Pablo Alperin 2008-10-28 18:16:20 PDT
Comment on attachment 1056 [details]
supplement to OCS patch 

Wrong bug
Comment 12 Juan Pablo Alperin 2008-10-29 13:25:51 PDT
When trying to enroll an existing user to a registration, I am getting the following error:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /Users/juan/Code/ocs-base/cache/t_compile/%%02^028^0283A393%%registrationForm.tpl.php on line 72
type="checkbox" name="registrationOptionIds[]" value="1]"/> Banquet


At URL: 
http://dev.ocs.local/index.php/ocs-dev/pkp2009/manager/createRegistration?userId=1
Comment 13 Juan Pablo Alperin 2008-10-29 14:37:43 PDT
Created attachment 1062 [details]
Patch against OCS pre-2.2 (or is going to be called 2.3?) CVS

Development patch does NOT contain the locale changes.  Locale changes related to this patch can be found in Attachment #1061 [details] in bug #1444.
Comment 14 Juan Pablo Alperin 2008-10-30 15:09:26 PDT
Created attachment 1070 [details]
in_array error: OCS pre 2.3 CVS

Patch to resolve error described in attachment #12 [details]. 

If you want to fix this in our PKP conference install, simply change (in line 52):
{if in_array($optionId, $registrationOptionIds)}         to 
{if $registrationOptionIds && in_array($optionId, $registrationOptionIds)}
Comment 15 Juan Pablo Alperin 2008-10-30 15:34:33 PDT
last message should have read comment #12, not attachment #12 [details].
Comment 16 Alec Smecher 2008-10-30 19:27:48 PDT
Juan, does this need to be fixed in the PKP conference install, and has someone taken care of it?
Comment 17 Juan Pablo Alperin 2008-10-31 07:26:04 PDT
re: comment #14

This needs to be fixed in the PKP conference install.  Kevin probably hasn't come across it because it only appears when you try to create a new registration without the user having previously tried to sign himself up.  
Comment 18 Alec Smecher 2008-10-31 08:47:45 PDT
Patched pkp 2009 install as per comment #17.
Comment 19 Juan Pablo Alperin 2008-11-03 07:24:51 PST
Created attachment 1075 [details]
Registrant Report Patch: against PKP 2009 install OCS 2.1.1

Alec or Siavash, can you apply this patch to the registrant report on the PKP install?  I will post another patch for the dev branch.  This one is against my patched 2.1.1.
Comment 20 Juan Pablo Alperin 2008-11-03 07:25:58 PST
Created attachment 1076 [details]
Registrant Report Patch: against pre 2.3 CVS

committed this patch to pre-2.3 CVS
Comment 21 Alec Smecher 2008-11-03 11:59:55 PST
Patched the PKP install.
Comment 22 Juan Pablo Alperin 2008-11-03 14:04:08 PST
committed to OCS-stable branch (including comment #12 and registration report)
Comment 23 Alec Smecher 2009-02-24 09:09:25 PST
Juan, what remains to be done on this entry?
Comment 24 Juan Pablo Alperin 2009-02-24 09:19:25 PST
it needed to be closed. :)