{"id":2078,"date":"2019-04-19T11:49:37","date_gmt":"2019-04-19T15:49:37","guid":{"rendered":"https:\/\/www.thatsoftwareguy.com\/blog\/?p=2078"},"modified":"2019-04-19T11:49:38","modified_gmt":"2019-04-19T15:49:38","slug":"shipworks-and-zen-cart-discounts","status":"publish","type":"post","link":"https:\/\/www.thatsoftwareguy.com\/blog\/2019\/04\/19\/shipworks-and-zen-cart-discounts\/","title":{"rendered":"ShipWorks and Zen Cart Discounts"},"content":{"rendered":"\n<p>I just discovered that <a href=\"https:\/\/www.shipworks.com\/\">ShipWorks<\/a> does not properly handle the many possible discounts that can be created for ZenCart by independent software developers (like your humble servant).  <\/p>\n\n\n\n<p>Fortunately, it&#8217;s an easy fix.  Just edit your admin\/shipworks3.php file.  <\/p>\n\n\n\n<p>Locate the block:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>                    if ($class == \"ot_coupon\" ||\n                                    $class == \"ot_gv\" ||\n                                    $class == \"ot_lev_discount\" ||\n                                    $class == \"ot_group_pricing\" ||\n                                    $class == \"ot_quantity_discount\")\n                    {\n                            $impact = \"subtract\";\n                    }<\/code><\/pre>\n\n\n\n<p>and change it to: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>                    $textvalue = $total->fields['text'];\n                    if (strpos($textvalue, \"-\") !== false)\n                    {\n                            $impact = \"subtract\";\n                    }<\/code><\/pre>\n\n\n\n<p>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. <\/p>\n\n\n\n<p>osCommerce users &#8211; you will likely need a similar change. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;s an easy fix. Just edit your admin\/shipworks3.php file. Locate the block: and change it to: I have passed this fix on to the ShipWorks team so &hellip; <a href=\"https:\/\/www.thatsoftwareguy.com\/blog\/2019\/04\/19\/shipworks-and-zen-cart-discounts\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">ShipWorks and Zen Cart Discounts<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":2081,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58,78],"tags":[],"class_list":["post-2078","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-that-software-guy","category-zen-cart"],"_links":{"self":[{"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/posts\/2078","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/comments?post=2078"}],"version-history":[{"count":3,"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/posts\/2078\/revisions"}],"predecessor-version":[{"id":2083,"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/posts\/2078\/revisions\/2083"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/media\/2081"}],"wp:attachment":[{"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/media?parent=2078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/categories?post=2078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/tags?post=2078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}