Skipping billing-Information step in group reg.

  • Vineyard Langenthal
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 8 months ago - 10 years 8 months ago #66470 by Vineyard Langenthal
Skipping billing-Information step in group reg. was created by Vineyard Langenthal
Hi all

Is there a possibility to skip the "Billing-Information" step in a group registration? I already enabled the "Reduce Registration process" in the configuration, but with no effect....

Kind regards
Nicolas
Last edit: 10 years 8 months ago by Vineyard Langenthal.

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #66480 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Skipping billing-Information step in group reg.
Hi Nicolas

Right now, it is only applied for free events. You can try to edit the code abit to get it works. Please follow the instructions below :

1. Open the file components/com_eventbooking/helper/helper.php

2.Find the function showBillingStep (at line 1563)

3. Add this command at the beginning of the function

return false;

Something like this

public static function showBillingStep($eventId)
{
return false;
$config = self::getConfig();
if (!$config->collect_member_information || $config->show_billing_step_for_free_events)
{
return true;
}
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('individual_price')
->from('#__eb_events')
->where('id=' . $eventId);
$db->setQuery($query);
$individualPrice = $db->loadResult();
if ($individualPrice == 0)
{
$config = EventbookingHelper::getConfig();
if ($config->custom_field_by_category)
{
$sql = 'SELECT category_id FROM #__eb_event_categories WHERE event_id=' . $eventId . ' AND main_category = 1';
$db->setQuery($sql);
$categoryId = (int) $db->loadResult();
$sql = 'SELECT COUNT(*) FROM #__eb_fields WHERE fee_field = 1 AND published= 1 AND (category_id = 0 OR category_id=' . $categoryId . ')';
$db->setQuery($sql);
}
else
{
$sql = 'SELECT COUNT(*) FROM #__eb_fields WHERE fee_field = 1 AND published= 1 AND (event_id = -1 OR id IN (SELECT field_id FROM #__eb_field_events WHERE event_id=' .
$eventId . '))';
$db->setQuery($sql);
}
$numberFeeFields = (int) $db->loadResult();
if ($numberFeeFields == 0)
{
return false;
}
}

return true;
}


After that, it should work as expected.

If you are using version 2.0.1 (latest version), you can get this file, unzip it, upload the file to components/com_eventbooking/helper folder and check it

Regards,

Tuan
The following user(s) said Thank You: Vineyard Langenthal

Please Log in or Create an account to join the conversation.

  • Vineyard Langenthal
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 8 months ago #66489 by Vineyard Langenthal
Replied by Vineyard Langenthal on topic Skipping billing-Information step in group reg.
Thanks for the precise instructions, will try this out!

Best regards
Nicolas

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #66503 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Skipping billing-Information step in group reg.
OK Nicolas. Hope it will work well !

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc