Misc. charges [eg. Flexicharge items] not passed to Google Checkout

tbarker - August 6, 2008 - 16:49
Project:e-Commerce Google Checkout
Version:5.x-3.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

You need this code after the shipping charges in gcheckout.module .

  // Apply misc. charges
  if ($txn->misc) {
    foreach ($txn->misc AS $key => $misc) {
      $item = new GoogleItem($txn->misc[$key]->description, '', $txn->misc[$key]->qty, $txn->misc[$key]->price);
      $item->SetMerchantItemId($txn->misc[$key]->nid);
      $cart->AddItem($item);
    }
  }

There is a problem with this fix, because it adds the charges as potentially taxable items, even though it is mostly likely going to be Simple Shipping charges.

#1

Phillip Mc - August 8, 2008 - 21:00

I'm can test this patch if it helps, but, can you be more specific where in the module it should be inserted? e.g. line number or the the preceding/following lines?

cheers

#2

tbarker - August 19, 2008 - 16:33

At line number 255, after

  if (module_exists('shipping')) {
    $method = shipping_get_methods();
  }

and before

  // Add tax rules
  $tax_rule = new GoogleDefaultTaxRule(0.0825);
  $tax_rule->SetStateAreas(array("CA", "NY"));

#3

mfb - December 3, 2008 - 23:44
Status:needs review» postponed (maintainer needs more info)

Can someone submit an actual patch?

 
 

Drupal is a registered trademark of Dries Buytaert.