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.

Posting your Zen Cart inventory in Google Merchant

You want to sell your wares in Google Shopping?  Great!  By all means, build a feed from Zen Cart for Google Merchant and get started.  But remember the rules: Google wants you to list shipping costs along with your products for every region you advertise in.

Here are the most common ways to do this:

Shipping option Description
Free Simple to configure and maintain
Flat rate Simple to configure and maintain
Carrier rate (UPS, USPS, Fedex) Rates are automatically calculated based on carrier rates for all users (not negotiated rates). Only available in some countries (USA, AUS). You may add a surcharge (% or fixed amount).
Percentage of order total Simple to configure and maintain and allows for varied shipping rates based on price
Unique shipping costs for one particular product Specify the shipping price within the feed using the
shipping attribute.
Allows you to manually override account settings for a product with unique shipping rates

Google maintains a team of auditors who will compare what’s in the feed to what is shown on your website in the Shipping Estimator, and complain about any variance between the two. Now according to their own rules, you are allowed to “overestimate” the shipping cost in the feed (see rule below), but even then, I have received complaints from them. Per Google,

“To show ads to a particular country or region, you must offer shipping and correctly set up shipping costs for that area. The shipping costs that you submit to Merchant Center must match the costs you charge on your website or at least overestimate those costs.”

In other words, it’s ok for the feed to show a higher shipping cost than your website. It’s not ok for your website to show a higher shipping cost than the feed.

Potential Problems

        • If you determine shipping costs algorithmically using your own logic, you’re going to have to figure out some way of mapping this to one of the techniques in the table above for the purposes of the Google feed. Again, per Google,

          “Keep in mind that if you dynamically choose where to ship from at the time the user checks out, there is currently no way that this can be configured in Google Shopping.”

        • You quote negotiated rates (for example, using the Zen Cart upsxml shipping module). If you use Carrier Rates in Google Shopping, they will retrieve non-negotiated rates; this will cause the rate shown in Google Shopping to be higher than what is on your website. Although this is permitted according to their rules, you may have to argue with them about this.
        • You have enabled multiple shipping modules, or multiple services within a carrier. In this case, you may be forced to show all relevant rates, not just the lowest or most common one.

WordPress 5.0.1 – Update Time!

Open Source but powerful, but with great power comes great responsibility – notably, your responsibility to keep your software updated!  If you haven’t upgraded to WordPress 5 yet, this WordPress security announcement should get you into gear.  We all knew we’d have to learn Gutenberg some day, it just seems that someday came sooner than we had planned! 

Enhancements to Zen Cart 360 Sales Reporting

I have added an optional feature to Zen Cart 360 Sales Reporting (link) which shows recent direct deposits on the admin dashboard.  Update admin/index_dashboard.php, and at the end of the file, add this block of code:

<div id="colthree" class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
<div class="reportBox">
<div class="header"><?php echo "Recent Direct Deposits"; ?> </div>
<?php
require_once(DIR_WS_CLASSES . 'currencies.php');
$currencies = new currencies();
$orders = $db->Execute( "SELECT * FROM " . TABLE_DIRECT_DEPOSIT . " ORDER BY deposit_date DESC LIMIT 5");
while (!$orders->EOF) {
?>
  <div class="row">
  <span class="left">
    <?php echo substr($orders->fields['name'], 0, 20); ?>
  </span>
  <span class="center">
     <?php echo $currencies->format($orders->fields['amount']); ?>
  </span>
  <span class="left">
     <?php echo $orders->fields['deposit_date']; ?>
  </span>
</div>
<?php
$orders->MoveNext();
}
?>
</div>
</div>

Is osCommerce Dead?

I’m a Zen Cart guy, so normally the only thing I have to say about osCommerce is, “Them’s fightin’ words!”

But Gary Burton is a true open source hero, who has provided an upgrade path for merchants whose businesses depend on an active branch of osCommerce that works with modern versions of PHP. Thank you, Gary, for your leadership in creating the Frozen and Edge branches of osCommerce.

https://github.com/gburton/Responsive-osCommerce

Zen Cart Coupon Single User

Zen Cart Coupon Single User has been upgraded so that you can now restrict a coupon to any email address on a single domain, not just a single email.

So for example, if you want to permit a coupon to only be used by customers with a “@BigClient.com” email address, you would create a coupon code starting with “@BigClient.com”, such as “@BigClient.com_save_ten” or “@BigClient.com-half-off”.