I have a content type assigned to have resource inventory availability when i create a node of this type.
when I use the add content function in drupal my node shows up as "ON HAND"
however when i use a separate module import function in the creation of nodes of this type, when i look at the node page
only
Rate per hour
The per hour rental fee for the item.
Late fee per hour
The per hour fee for returning the item late.
Fee free hours
The number of hours the item can be used before fees are charged.
shows up under the "MERCI settings" tab
where as on a node that i have added through the add content function shows.
Default booking availability
Available
Unavailable
Template Only
No Longer in Inventory
If no availability information is defined for a given time, the resource falls back onto this setting.
under the "MERCi settings" tab.
since i am using a module that is no longer in development and rely on import of data through that module..
I AM ASKING - is there some information that is hooked with the creation of a node?
why isnt it added automatically? Should it be?
Rate, Late Fee, and Fee Free all get forced to the value of "0" even on these other nodes.
however Availability seems to be never created on the node.
Anyone else have similar problem they have had to fix.
help me understand this please!
thanks!
Comments
Comment #1
kylebat commentedmore precisely on the nodes table
one looks like this
merci_default_availability (String, 1 characters ) 1
merci_sub_type (String, 1 characters ) 1
merci_item_status (String, 1 characters ) 0
merci_late_fee_per_hour (String, 1 characters ) 0
merci_rate_per_hour (String, 1 characters ) 0
merci_fee_free_hours (String, 1 characters ) 0
merci_min_cancel_hours (String, 1 characters ) 0
merci_autocheckout (String, 1 characters ) 0
merci_autocheckin (String, 1 characters ) 0
merci_selfcheckout (String, 1 characters ) 0
merci_type_setting (String, 8 characters ) resource
The other looks like this.
merci_default_availability (String, 1 characters ) 0
merci_sub_type (String, 1 characters ) 0
merci_item_status (String, 1 characters ) 0
merci_late_fee_per_hour (String, 1 characters ) 0
merci_rate_per_hour (String, 1 characters ) 0
merci_fee_free_hours (String, 1 characters ) 0
merci_min_cancel_hours (String, 1 characters ) 0
merci_autocheckout (String, 1 characters ) 0
merci_autocheckin (String, 1 characters ) 0
merci_selfcheckout (String, 1 characters ) 0
merci_type_setting (String, 8 characters ) resource
the first one uses my content type defaults.
the second one seems to ignore my availability defaults
thanks again.
Comment #2
darrick commentedWhat is the code you are using to add the nodes? Having that will make it much easier to see what is going wrong. Thanks.
Comment #3
kylebat commentedhttps://drupal.org/project/ISBN2node
which adds a "ISBN BOOK BULK IMPORT" tab in add content
it seems to use isbn2node.bulk.inc
as I said It would be up to me to write in or work around this feature.
I have already tried to figure out if i could use computed field, convert node as a work around.
I do not yet understand enough about the code. I just imagined that "availability" should default to 1 if I set it that way. Like how when you set published to on or off or promoted to front page.
convert node either carries over the 1 or the 0 into a new type.
thanks.
Comment #4
darrick commentedImplement hook_node_prepare.
Comment #5
artbussy commentedI have the same issue with resource inventory availability. In my case not created by a custom module but by Rules (create new entity) after a user created a node of an other content type. The Merci node is created fine but the database shows in the table merci_reservation_item_node in column 2 and 3: 'merci_default_availability:0' and 'merci_sub_type:0.
I tried to implement function merci_node_prepare($node) as described in a custom module, in template.php and as a PHP code action in Rules to change these setting to 1. But to no avail. I'm not a coder at all. Any clues are most welcome.
Thanks!
Comment #6
dustin@pi commentedWe hit the (what appears to be) the same issue using the Feeds module to import bookable items. We ended up just manually adding our items to get around the issue.