×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Bug report(?) Book button showing when has booked

Bug report(?) Book button showing when has booked 3 years 11 months ago #28153

  • Rob Swart
  • Rob Swart's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 57
  • Thank you received: 5
Hi Yves,

My users pointed me to a problem. Some users booked twice on a popular event. Both times for the maximum bookable places.
I tested it on my test account and found out that even when you booked an event, the Booking button is still showing on the eventform (modern template) and clicking on it allows them to book again. In the My Bookings tab both bookings are showing.

I solved the problem by removing one condition for showing this button:
// Book
		if (($this->user->id OR MatukioHelperSettings::getSettings('booking_unregistered', 1) == 1)
			AND $this->event->cancelled == 0
			AND $this->event->nrbooked > 0
			AND (count($buchopt[2]) == 0)) [b]// OR (count($buchopt[2]) > 0 && MatukioHelperSettings::getSettings('frontend_usermehrereplaetze', 1) != 0)))[/b]
		{
			$bookinglink = JRoute::_("index.php?option=com_matukio&view=bookevent&cid=" . $this->event->id . ":"
				. JFilterOutput::stringURLSafe($this->event->title)
			);
 
			echo " <a title=\"" . JTEXT::_('COM_MATUKIO_BOOK') . "\" href=\"" . $bookinglink
				. "\"><span class=\"mat_book\" type=\"button\"><img src=\""
				. MatukioHelperUtilsBasic::getComponentImagePath()
				. "1116.png\" border=\"0\" align=\"absmiddle\">&nbsp;"
				. JTEXT::_('COM_MATUKIO_BOOK') . "</span></a>";
		}
This code is found in event/tmpl/modern.php around row 543.

The problem is that I don't know if my sollution is correct. It helped, but I cannot explain why the condition on the "Book more than one place" configuration option is there. If I set this option to "No", no one can book more than one place on any event. Than the question of how many places one wants to book, doesn't show on the booking form.

My configuration setup is:
Joomla version: 3.3.6
Matukio version: 4.5.0
No payment plugins are used
Can users book more than one place = Yes

Can you please take a look?

Bug report(?) Book button showing when has booked 3 years 11 months ago #28154

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 70
  • Thank you received: 556
Hi Rob,

do you have the setting "Frontend allow booking multiple places" turned on? If you turn that to off it would have worked as you expected wihtout changing the code :) This setting has nothing to do with how many places you can book at once, but if you can book more then one place (as a user).

Hope you can follow me :)

Kind regards,

Yves

Bug report(?) Book button showing when has booked 3 years 11 months ago #28155

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 70
  • Thank you received: 556
But wait, you are not on the current Matukio version (4.5.4 is current not 4.5.0), we had one single version (search for my talk with Scott King) where he had the exact same problem, which i have fixed then.

Yves

P.S.: Btw Matukio 5 is coming today or tomorrow :)

Bug report(?) Book button showing when has booked 3 years 11 months ago #28156

  • Rob Swart
  • Rob Swart's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 57
  • Thank you received: 5
Hi Yves,

I just had a long vacation, that's why I'm behind in versions.
I think it must have been solved in 4.5.3. The release notes mention bugfixes in booking.

I'll wait for the anticipated version 5.0 before upgrading :)

BTW, yes, I have "Frontend allow booking multiple places" turned on. That's what I mend by "Can users book more than one place".
But when I turn this to No (off) users can only book one place, even if the event parameters say they can book up to four places....
That was the problem, because I tried that first.

Please leave this alone for the moment.
I'll upgrade when version 5.0 becomes available and will let you know if that solved the problem.

Rob

Bug report(?) Book button showing when has booked 3 years 9 months ago #29091

  • Rob Swart
  • Rob Swart's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 57
  • Thank you received: 5
Hi Yves,

I've upgrade to Matukio release 5.0.9.
I like the new bootstrap template and new features very much. Good work!

As you suggested I've set the "Frontend allow booking multiple places" parameter to off. And that works as a charm in the front-end.

There is just one problem with that in the back-end. Now it's not possible to set the bookable places of an event to something else than 0 of 1.
So when creating a new event or editing a existing event we can not set this to the right number. In our case that's mostly 2.
I've done some digging and this is because it is hardcode in utils_event.php (function getEventEdit) that when this setting is set to off there is a select_genericlist created whith only those two options.

Is it possible to do something about this?
I've now disabled the lines of code that make this list. But I'm not sure that this is the complete solution.

Greets,
Rob

Bug report(?) Book button showing when has booked 3 years 9 months ago #29096

  • Yves Hoppe
  • Yves Hoppe's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 3519
  • Karma: 70
  • Thank you received: 556
Hi Rob,

aye you are right, that if else construction is from a very old version of Matukio (where the setting was meant in a different way).

Fixed for the next version, you always have a text input field now.

Cheers,

Yves
The following user(s) said Thank You: Rob Swart

Bug report(?) Book button showing when has booked 3 years 9 months ago #29097

  • Rob Swart
  • Rob Swart's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 57
  • Thank you received: 5
And thanks again for your superb support, even on a Sunday afternoon....
  • Page:
  • 1
Time to create page: 0.109 seconds