matt333
Forum Replies Created
-
This works!
Makes sense if you are planning some new functions based on the unique booking concept.
Thanks for your quick response. I will test it and let you know.
feedback: successful!
Marcus,
I tried 4.303 and it’s fine this way (null) now. I’ll look more carefully into pro. (Good to know pro has bug tracker.)
I see that you have put this in 4.302. Thank you for your quick action. I will test it.
Marcus,
Thank you for your always fast response.
I’m on EM 4.302 and BP 1.51, and I was about to ask the same question. Where can I find dev version?
BTW, as I see it, this is not a very proper way to submit bugs and ask for features. Any plans for public bug tracking and even code contributions? For bugs, I would recommend a web-based tracking site, such as fogbugz.
This is what I see on the ticket_price issue, hoping that I am helping instead of distracting:
The ticket_price and some other fields (e.g. ticket_start, ticket_min) of EM_Ticket class have a uniform behavior that you probably intended: if empty(ticket_price), save to DB as NULL.
The two places where this behavior shows: EM_Ticket::save(), EM_Object::to_array(). The latter is used all over the place, affecting booking, location, category, ticket_booking, etc. So changing this behavior, even for ticket_price alone, might have unwanted consequences without thorough investigation. And all the changes are in EM code, rather than templates, which will have to be merged again at future EM updates.
So I do not want to touch it but propose the following fix:
== Proposed untested idea of future fix:
EM_Ticket::price = 0; (as default value, in declaration)
fields: add a ‘allow_zero_value’=>1, to ticket_price(and possibly other similar fields), at declaration
save(): change:if ( empty($this->$field['name']) && $field['null'] )
to:if ( empty($this->$field['name']) && $field['null'] && ! $field['allow_zero_value'])
EM_Object::
to_array(): change:
if ( !empty($this->$val['name']) || empty($val['null']) )
to:if ( !empty($this->$val['name']) || empty($val['null']) || $field['allow_zero_value'])