Hey, Require Some Urgent Attention To this Issue:

I am currently using Drupal 7.8 / UC_Hotel 7.x-1.0-dev (tried beta1 also). I am unable to remove rooms from the Checkout. I am running the module on a production site and running sql query to delete the rooms from mysql database for users is quite inconvenient.

I have also tried the patch posted by newbornbaby in the Drupal Version 6 Issue. The above patch works to remove the entry from the shopping cart but kills the checkout and loads it with errors regarding the qty field:

Undefined index: qty in uc_cart_update_item_object() (line 1555 of ../modules/ubercart/uc_cart/uc_cart.module) with
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'qty' cannot be null: UPDATE {uc_cart_products} SET qty=:db_update_placeholder_0, changed=:db_update_placeholder_1...etc

Please provide an updated patch or please tell me how to get this working also request to Please provide some help soon as I have site in production mode waiting to start receiving live bookings.

P.S The Live Site Link (www.aureshospitality.com)

Thanking You,
The Aures Hospitality Group

Files: 
CommentFileSizeAuthor
#2 uc_hotel-7.x-1.x-dev.patch385 bytesnewbornbaby

Comments

newbornbaby’s picture

The patch was intended to remove the listing from search results only, I tried to figure out 'qty' issue, but not familiar with drupal codding, were unable to identify the issue correctly.
6.x branch works fine, if you are trying for a production site, drupal 6 will be good choise with uc_hotel, 6.x-4 branch has more functionality, or have to wait for next releases from authers or try your own.

newbornbaby’s picture

StatusFileSize
new385 bytes

try this patch. it fixed warnings on my 7.x-1.x-dev, test site.

Aixya’s picture

Thanks For The Reply,

I am unable to patch the following fix posted by you, as it gives a garbage file error on whenever I try to patch. I have tried Re-downloading the file multiple times but I still get the same error, I have also tried the same patch on dev and beta1 but still just get the garbage file error.

Request you to please upload new copy of the patch you posted.

Thanking You,
Yours Sincerely,
Aditya Mehra

newbornbaby’s picture

there are two changes,
1) file: hotel_booking.panes.inc
function: hotel_booking_cart_details_table
currently booking_upgrades array element is not fount in cart data,
commenting the following lines, will help to resolve the issue with remove from cart.

<?php
function hotel_booking_cart_details_table(&$item, $additional = FALSE) {
 
$add_ons = array();
/*  if (!isset($item->data['booking_upgrades'])) {
    $item->data['booking_upgrades'] = array();
  }
  $nids = array_keys($item->data['booking_upgrades']);
  $nodes = node_load_multiple($nids);
  if (count($item->data['booking_upgrades']) > 0) {
    foreach ($item->data['booking_upgrades'] as $nid => $cart_item_id) {
    ...
    ...
    }
  }*/
 
if (!$additional) {
   
$addon_title = '';
   
$qtys = '';
    if (
$add_ons && $daily_items) {
?>

the next issue was with 'qty' field, ubercart was unable to find the qty,
file: hotel_booking.ubercart.inc
function: hotel_booking_uc_cart_display
changing the $element['qty'] to resolved the issue,

<?php
  $element
['qty'] = array(
   
'#type'          => 'value',
   
'#value'        => 1,
   
'#default_value'  => 1, //this is to stop the ubercart errors
   
'display'=>
      array(
       
'#type' => 'markup',
       
'#markup' => 1,
      ),
  );
?>

delete everithing from uc_cart_products table, and make these changes, and test,
hope it helps,

requiem08’s picture

Big help Tnx much !! :))

IetC_development’s picture

@newborndaby : Works wonderful ! Thx !!

IetC_development’s picture

Status:Active» Fixed

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.