First of all i am two days old in this module, so maybe this one don't apply like a feature to the goal of the module, that why i am here.

I am adding the Availability Calendar field to the line item (commerce) entity so the user can select the range of dates before add to the cart. For sure i will need some rules and other tricks to make the whole things, but i am thinking in adding a settings option in the field configuration to select a view, so the next time an user try to add to the cart the field will check in the view results first and not only the default state.

Well my doubt here is if this can apply like a feature or it is work for a custom module?

Cheers

CommentFileSizeAuthor
#2 Screen Shot 2014-01-10 at 1.33.11 PM.png44.35 KBjustmad

Comments

fietserwin’s picture

I'm sorry but I don't understand what you want to accomplish. Can you explain a bit more what you want, for example with some pictures?

justmad’s picture

StatusFileSize
new44.35 KB
justmad’s picture

The idea is add that select box with a list of views in the settings to define a dynamic default state, so the next time somebody create a content for this entity the default state will be defined by the result of that view.

Like i say maybe is work for a custom module or "Availability Calendar - Commerce" module.

fietserwin’s picture

The default state is the state that a day gets when no availability information for that day (for the calendar/entity at hand) is stored in the database. So, you typically define it once and changing it on an existing system can have unforeseen consequences.

Currently, the default state is a field instance setting, meaning that each calendar field of each entity that defines a field of this field instance, has the same default state. (note that field instance might be confusing here, you typically have only 1 calendar field instance in your system... read the file documentation on this subject)

If you want to define a default state per entity/field, it will be a major change, touching a lot of code.

If you would like to be able to define a default state per calendar, you could just implement this in your own system by storing that state for each day the coming 10 years as soon as you define that state on a give calendar for a given entity.

justmad’s picture

Im sorry, i was totally using the module in a wrong way.

Anyway, for sure i will need an integration with commerce module hope can be good enough to upload like a new module.

Thank you

justmad’s picture

Status: Active » Closed (works as designed)