The attached patch for 6.x-1.x-dev resolved two issues:

1. Length, Width, Height error
2. Add additional classes as in this thread: http://drupal.org/node/610414

CommentFileSizeAuthor
total.patch4.21 KBexcellira

Comments

excellira’s picture

Forgot to mention that you should test this on a dev site prior to applying it to your production site.

hsp.org’s picture

I'm still finding that other product classes are not uploading properly and have tracked it down to the uc_gbase_nodeapi function in uc_gbase.module.

function uc_gbase_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  switch ($op) {
    case 'load':
      if($node->type == 'product'){     // <--  problem line
      $node->uc_gbase_id = uc_gbase_load($node->nid);
      $result = db_fetch_array(db_query('SELECT submit_type, product_name, product_type, product_description, product_condition, payment_method, images FROM {uc_gbase} WHERE nid = %d', $node->nid));
      return array('uc_gbase' => $result);
      }
      break;
    case 'insert':
    case 'update':
      if($node->type == 'product'){      // <--  problem line
        $node->uc_gbase_id = uc_gbase_load($node->nid);
        $node->uc_gbase_id = uc_gbase_insert_item($node);
      }
      break;
    case 'delete':
      $node->uc_gbase_id = uc_gbase_load($node->nid);
      if (!empty($node->uc_gbase_id)) {
        $deleted = uc_gbase_delete_item($node);
        if (empty($deleted)) {
          drupal_set_message(t('@title was not successfully deleted from Google Base.', array('@title' => $node->title)));
        }
        else {
          uc_gbase_delete($node->nid);
        }
      }
      break;
  }
}
Volx’s picture

For the product class issue, I submitted a patch to the other issue #610414: Other Product Clases, that uses the ubercart API to determine what a product is.

compujohnny’s picture

Status: Active » Fixed

These issues are fixed in the latest dev version

Status: Fixed » Closed (fixed)

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