Hi larowlan, (me again)

A while back you helped me to get the addons working. And it worked. I have an test-room (test-appartment) and the addons are nicely displayed.

Now a have added two new appartments, with new addons. But, the addons are not displayed with the new appartments. they are displayed with the test-appartment however.

It is as the new new appartments don's see the addons.

Any ideas??

Other question. I can't delete or modify the Occupancy Modifiers, but i see the answer you gave in another issue, that the dev-version has solved this.

Is it save to use the dev-version on a productionsite?

Thanks upfront for helping.

Reagrds from Austria,

Wim

Comments

Sorry, yet another question.

The number of adults has a maximum of 8. How can i change this in 10 or 15?

Status:Active» Postponed

In this case it's fine to use the dev version, it depends from module to module.
I need to roll a new release but I promised to fix the hotel_addons module before I did.
I'm tempted to ditch the addons module into a sandbox because it is holding back the hotel_booking one.
Changing the total number of adults is flagged as an feature request in another issue.
There is code in that issue to help with an override in the mean time, but eventually it will get into the module.

Do you have an ATA of the new version? with all of the above in it?

If we can agree to ditch the addons module to a sandbox project, I can roll a new release this week (it's long overdue).

I don't quit know what that means. Does it mean hat the addons don't work anymore?

And what about my question about not showing the addons for the appartments?

hmm, if you're relying on the addons then I guess we can't remove it from the module!

Yes, thats the problem.

On our site you can book a holiday appartment.

If you want to bring your dog, thats a addon. If you want to go climbing, you can book a addon.

Hi larowlan,

The new version (6.x-4.0-alpha1), is this with or without addons? Of not, when do you have an update including addons?

Thanks

No, sorry it doesn't update the addons module.
When you say 'not displayed' do you mean in the cart or on the node page or after you add an item to your cart?
Happy to take screenshots if that's easier.

After an visitor books a room, the next page should be the addons for this roomtype. This does not show, eg there is nothing to book (addons) or to be shown in the cart.

I have a testroom, which works perfectly, but with every new room there is no addons-page shown.

I would give you a screenshot, but there is no addon-page shown.

Hi
I just setup a test site for this and did the following:
a) created a dummy room
b) created a dummy product
c) created an addon for the dummy product
d) added the dummy room to my cart and was redirected to the addons page
e) created a second dummy room
f) added the second dummy room to my cart and was redirected to the addons page
So it seems to be working
When you visit http://YOURSITE.COM/admin/store/hotel_booking/upgrades_addons and click edit next to the addons - is your new room type selected in the 'limit by room type' section?
LR

Version:6.x-2.0-beta4» 6.x-2.x-dev

Yes, the room type is delected in the 'limit by room type' section. But with a booking no addons are displayed.

What happens if you deselect all of the room types (ie make it available for all room types)?

Title:Addons not working with new rooms (appartments)Addons not working with new rooms (apartments)

The same result, no addons with new rooms, only with the testroom

I'm kind of at a loss to help much further here, other than testing for this issue (which tested fine) I've not read/used the module (Will Vincent (@tcindie)) wrote it.
Perhaps you might be able to debug the hotel_addons_upgrades_customer_form function by installing devel module and adding

drupal_set_message('Redirecting here - line xxx');

before each drupal_goto call in that function - replacing the line xxx with the line number - that way we can ascertain which line is causing the addon redirect to fail.

I will test this weekend (not at home). I will let you know the result.

Hi larowlan,

Before i do the debug, something else. This might help you solve the problem.

I updated two new months in the availability calender. ( available with restrictions). I went to check the new months, and it showed no availability.

So i checked again in the forms (node/xx/availability/2012/5 and node/xx/availability/2012/6) where the availability is correctly set to "1" with the restrictions i made, but it doesn't show on the roompage (only as not available).
It looks like there is something with the cache or so. I truncatd all cachetables, no result.

So i'm wondering if this is a result from the same problem??

Hi
Can you make sure you've got a base rate configured for that date?
Also make sure that you've got your autoexpire setup correctly.
Without a base rate it will show as unavailable - ie if the base rate is zero.

LR

StatusFileSize
new94.31 KB
new113.83 KB

UUPS. I should have known that.

I debugged with devel, and attached two pdf-files (NEW (the not working new roomtype) OLD (the working testroom)). I see where the difference is, but can't find where to change it.

Hi
Can you translate the difference between the two files?
LR

StatusFileSize
new3.38 KB

The differende is in the first few lines.

See attachment

In the testroom it looks up the url to the bookingupgrade, in the new room it looks up the cart.

Hi
What have you got for the redirect destination in the settings form?
If it's not even calling the booking_upgrades menu callback (booking_upgrades/%) then it must be because of this code in the hotel_booking module

<?php
    $redirect_destination
= variable_get('hotel_booking_redirect', 'cart');
   
uc_cart_add_item($node->nid, 1, $data);
   
drupal_set_message(t('Added your booking to the cart, please note that your booking is not
                         confirmed until you <a href="!url">Complete checkout</a>'
, array('!url' => url('cart/checkout'))));
   
$cart_item_id = db_last_insert_id('{uc_cart_products}', 'cart_item_id');
    if (
$redirect_destination == 'cart') {
     
drupal_goto($redirect_destination);
    }
    elseif (
$redirect_destination == 'addon') {
     
drupal_goto('booking_upgrades/'. $cart_item_id);
    }
    else {
     
drupal_goto(variable_get('hotel_booking_redirect_otherurl', ''));
    }
?>

As you can see the 'hotel_booking_redirect' variable - which is set from the admin pages - is the trigger here.
Lee

The redirection is set to Upgrade/Addon form (the old test-room works).

The code above is the trigger, córrect.

Is it possible that somewhere in the database (i don't no where) the redirection is set with an entry of the room of roomtype. I have a feeling that that is the problem, and with my database the trigger is missing with the new rooms.

Hi larowlan,

any ideas yet??

I just had the same issue. I was poking around in the database and looked at the hotel_booking_upgrades table and found a previous addon that I had deleted. It wasn't showing on the admin/store/hotel_booking/upgrades_addons page. I removed it from the table and now the upgrade/addon form is showing up again. Not sure if it's the same issue, but thought I'd post it just in case.

Thanks a lot mate for posting the article because i need a comfortable room. Now i am very happy because i have got some new room by your article and i am benefited to you. Thanks a lot mate.
Giovanna Kylee