I added a bit of code to userRegistrationForm.tpl that I thought others might find useful.
The case: as with most conferences, we have both Early Bird and Normal pricing for registration. The Early Bird pricing starts now, and the Normal in the future (in this case, February 27th) when the Early Bird pricing stops. I put all of the pricing in, but the Normal pricing appears in userRegistrationForm.tpl as "Registration Closed [EndDate]".
This didn't really make sense, as the pricing was set to open and close in the future. A little peek at the .tpl revealed that for any Registratino Type that didn't have a start date >today and end date < today, it was assumed that the type had closed. This bit of code fixes that:
- Code: Select all
{if strtotime($registrationType->getOpeningDate()) < time() && strtotime($registrationType->getClosingDate()) > time()}
{assign var="registrationMethodAvailable" value=1}
<input type="radio" name="registrationTypeId" {if $registrationTypeId == $registrationType->getTypeId() || (!$registrationTypeId && $isFirstRegistrationType)}checked="checked" {/if} value="{$registrationType->getTypeId()|escape}" />
{$registrationType->getCost()|escape} {$registrationType->getCurrencyCodeAlpha()|escape}
{translate key="schedConf.registration.typeCloses" closingDate=$registrationType->getClosingDate()|date_format:$dateFormatShort}
{assign var="isFirstRegistrationType" value=false}
{* INSERTED TO ACCOUNT FOR FUTURE REGISTRATION TYPES (E.G., NON EARLY-BIRD PRICING (SHIMRAH)*}
{elseif strtotime($registrationType->getOpeningDate()) > time()}
<input type="radio" name="registrationTypeId" value="{$registrationType->getTypeId()|escape}" disabled="disabled" />
{$registrationType->getCost()|escape} {$registrationType->getCurrencyCodeAlpha()|escape}
{translate key="schedConf.registration.typeFuture" closingDate=$registrationType->getOpeningDate()|date_format:$dateFormatShort}
{* END INSERTION (SHIMRAH) *}
{else}
<input type="radio" name="registrationTypeId" value="{$registrationType->getTypeId()|escape}" disabled="disabled" />
{$registrationType->getCost()|escape} {$registrationType->getCurrencyCodeAlpha()|escape}
{translate key="schedConf.registration.typeClosed" closingDate=$registrationType->getClosingDate()|date_format:$dateFormatShort}
{/if}
Oh, and the addition of a phrase in locale.xml:
- Code: Select all
<message key="schedConf.registration.typeFuture">(Registration Opening {$closingDate})</message>
That's it, I guess. I'm a bit new to this forum (and the process of submitting code), so let me know if there's a more official way to do this and have it implemented in future versions.
Assuming, of course, that I'm not fixing a problem that's already been fixed. :S
Cheers,
Shimrah
