ShipWorks and Zen Cart Discounts

I just discovered that ShipWorks does not properly handle the many possible discounts that can be created for ZenCart by independent software developers (like your humble servant).

Fortunately, it’s an easy fix. Just edit your admin/shipworks3.php file.

Locate the block:

                    if ($class == "ot_coupon" ||
                                    $class == "ot_gv" ||
                                    $class == "ot_lev_discount" ||
                                    $class == "ot_group_pricing" ||
                                    $class == "ot_quantity_discount")
                            $impact = "subtract";

and change it to:

                    $textvalue = $total->fields['text'];
                    if (strpos($textvalue, "-") !== false)
                            $impact = "subtract";

I have passed this fix on to the ShipWorks team so hopefully they will integrate it into the supported version of the Zen Cart integration soon.

osCommerce users – you will likely need a similar change.