ullCourse check additional mandatory user fields before booking
Workflow: @see https://www.ullright.org/ullWiki/show/ullcourse-booking-online-payment-workflow
/apps/frontend/modules/ullCourse/templates/showSuccess.php
Change booking link to "checkUserFields" action:
<?php echo link_to(
__('Book this course', null, 'ullCourseMessages'),
'ullCourse/checkUserFields?slug=' . $doc['slug'],
array('class' => 'ull_course_show_book_link big_button')
)
?>
/apps/frontend/config/app.yml
all:
ull_course:
mandatory_user_fields: [ 'first_name', 'last_name', 'email', 'phone_number', 'street', 'city', 'post_code', 'country' ]
/apps/frontend/lib/generator/columnConfigCollection/UllUserColumnConfigCollection.class.php
public function adjustColumnConfigForEditAccount(UllUser $user)
{
...
$this->setIsRequired(array(
...
));
// Adjust required fields for course booking
$uri_memory = new UriMemory();
if ($uri_memory->has('editAccountReturnUri', 'ullUser')) {
$mandatoryCourseUserFields = sfConfig::get('app_ull_course_mandatory_user_fields', array());
$this->setIsRequired($mandatoryCourseUserFields);
}
}

