A fix? Maybe someone can explain this to me...

freixas's picture
Offline
Getting busy with the Ubercode.
Joined: 05/06/2008
Juice: 119
A fix? Maybe someone can explain this to me...

Hi,

I'm setting up a store where the only shipping method is Rate Quote. I'm using ubercart-5.x-1.0-rc4 with Rate Quote 1.01. When I tried placing my first order and pressing "Click to calculate shipping", I kept getting a vague error. Flat rate shipping worked, so I started comparing the two modules.

One thing that was missing was a section called Workflow-ng hooks. I took the code out of the flat rate module and modified it for the rate quote module and I got my shipping quotes to come out. To be honest, I don't know what exactly all this code does, I just narrowed the problem area and make a reasonable guess at adapting the code. Here's what I added to uc_ratequote.module in case it helps anyone else out. Also in case this is not the best solution Smiling

/******************************************************************************
 * Workflow-ng Hooks                                                          *
 ******************************************************************************/

/**
 * Implementation of hook_configuration().
 *
 * Connect the quote action with the quote event.
 */
function uc_ratequote_configuration() {
  $enabled = variable_get('uc_quote_enabled', array());
  $configurations = array();
  $action = workflow_ng_use_action('uc_quote_action_get_quote', array(
    '#label' => t('Fetch a shipping quote'),
  ));

  $configurations['uc_ratequote_get_quote'] = array(
      '#label' => t('Shipping quote via Rate Quote Shipping'),
      '#event' => 'get_quote_from_ratequote',
      '#module' => 'uc_ratequote',
      '#active' => $enabled['ratequote'],
    );
  $configurations['uc_ratequote_get_quote'] = workflow_ng_configure($configurations['uc_ratequote_get_quote'], $action);

  return $configurations;
}

Rate Quote Shipping Module By: Guest (16 replies) Thu, 08/16/2007 - 17:21