Closed (fixed)
Project:
UC Shipwire (Order Fulfillment)
Version:
6.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Feb 2011 at 00:19 UTC
Updated:
17 Dec 2011 at 09:20 UTC
Found a bug where non shippable products are passed to ShipWire. This causes the order to be 'held' at ShipWire because the products are not in warehouses and causes a delay in shipment. Because of the need for manual intervention and delay in shipping I have marked this as a major bug. It can be easily fixed by adding uc_cart_product_is_shippable($product) to the foreach $order->products section of function uc_shipwire_action_order.
function uc_shipwire_action_order($order) {
//...
foreach ($order->products as $num => $product) {
// ADDED
if (uc_cart_product_is_shippable($product)) {
// ADDED
// Override the product variable and use the additional metadata
$bundle = node_load($product->nid);
if ($bundle->field_computed_skus[0]['value']) {
$skus = explode(",", $bundle->field_computed_skus[0]['value']);
foreach ($skus as $sku) {
$xml .= '<Item num="'. $bundle->nid .'">';
$xml .= '<Code>' . $sku . '</Code>';
$xml .= '<Quantity>'. $bundle->pkg_qty .'</Quantity>';
$xml .= '</Item>';
}
}
else {
$xml .= '<Item num="'. $product->nid .'">';
$xml .= '<Code>' . $product->model . '</Code>';
$xml .= '<Quantity>'. $product->qty .'</Quantity>';
$xml .= '</Item>';
}
}
// ADDED
}
// ADDED
//...
}
Patch provided against DEV version and tested in live environment. Please review and incorporate. I would recommend releasing a new version with this patch.
| Comment | File | Size | Author |
|---|---|---|---|
| uc_shipwire_6.x-1.x-dev_products.patch | 1.84 KB | tinker |
Comments
Comment #1
tinker commentedThis patch is working successfully on a production site for over six weeks. This is a serious issue since non-shippable product are passed to ShipWire causing the order to be held. Any chance of a commit?
Comment #2
zkrebs commentedsubscribe
Comment #3
tr commentedFixed in 6.x-1.x-dev and 7.x-1.x-dev. Thanks.
Comment #4
tinker commentedThank for applying the fix.