Steps to reproduce:

1) create a new booking
a) identify order parameters
b) add to cart
c) check out
d) receive email confirmation
2) confirm order appears in orders view (?q=cart/checkout#overlay=%3Fq%3Dadmin%252Fstore%252Forders%252Fview)
3) confirm the availability calendar updated and shows dates as unavailable
4) go back to the orders view, cancel the order
a) select "canceled" from "order status" drop down in order detail screen
b) click "Update"
5) go back to orders view and confirm the order is not listed there
6) go to the availability calendar...

Expected result:
dates from canceled order are now available

Actual result:
dates still marked as unavailable.

I've just started working with the uc hotel booking module, so most of the configurations are the default.

I had to set the "Auto available interval" to zero because I kept getting errors when creating content of type "Hotel Room Type". Changing this value to zero "solved" (got me past) that issue.

Also, "Default Number Available" for the content type that I'm testing is set to 1.


danny1997’s picture

In the, line 50, change "cancelled" to "canceled".

function hotel_booking_alter_availability($order) {
switch ($order->order_status) {
case 'canceled': // instead of cancelled

Modify the rule (configuration->workflow->rules): Increase room availability on order cancellation
Condition: Data comparison
Parameter: Data to compare: [updated-order:order-status], Data value: Canceled
// instead of [order:order-status]

Action: Increase the availability of rooms
Parameter: Order: [updated-order]
// instead of Order: [order]

pucc’s picture

I'm sorry..I need a piece of can I modify the data to compare?

ykyuen’s picture

You need to create a new rule for that and then disable the original one.