Using the admin name “admin” in Zen Cart 1.5.x

*** Warning: This is only suitable for use on your own computer for test carts which are not on the public Internet.   Actual live carts which are in production should abide by the forced rename so the URL to your admin is not known or easily guessed. ***

If you want to use the admin URL “admin” in Zen Cart 1.5.x, it’s a pretty simple change.  Edit the file

admin/includes/init_includes/init_admin_auth.php

and  insert the following line above line 12:

define('ADMIN_BLOCK_WARNING_OVERRIDE', '1');

That’s all!

Testing out my Zen Cart Admin Mods

On my Admin Demo Shop site, you can login (userid: test / password: test) and test the following admin mods:

Login here using test/test

osCommerce user? Don’t worry – the osCommerce version of the Better Together Admin panel has the same look and feel as the Zen Cart version.

Better Together Admin for osCommerce

Are you tired of having to hand code in discounts in Better Together for osCommerce?   Well I have news for you – you don’t anymore!  The Better Together Admin Panel for osCommerce is now ready.  It works on osCommerce 2.2 and 2.3, and it’s only $60.  Paypal to help@thatsoftwareguy.com along with your cart URL and osCommerce version to get started!

Here’s a screenshot:

osc_bt_admin

Once you select the linkage type, the two drop down menus populate accordingly (with categories or products).

Once that’s complete, your discount is ready to use in your cart!

My Zen Cart discounts with different taxes for shipping vs products

Different rates of tax for shipping

This is an uncommon situation, but it may apply to you if you are from British Columbia, Canada.

If you have taxable shipping but the tax rate is different than it is for products, you’ll need to make some code changes. Firstly, be sure your descriptions for shipping taxes include an easily identifiable string such as “on shipping”
Tax Rates in Zen Admin

Then, in the discount module you use, skip over this tax when computing the updated amount of tax.

Here is a block of logic from Quantity Discounts 1.11. (Newer versions may look different.)

       switch ($this->calculate_tax) {
       case 'Standard':
          reset($order->info['tax_groups']);
          while (list($key, $value) = each($order->info['tax_groups']))
          {

             if (strpos($key,"on shipping") !== false) {
                continue;
             }

             $tax_rate = zen_get_tax_rate_from_desc($key);
             if ($tax_rate > 0) {
                $od_amount[$key] = $tod_amount = round((($od_amount['total'] * $tax_rate)) /100, 2) ;
                $od_amount['tax'] += $tod_amount;
             }
          }
          break;

Here is a block of logic from Big Chooser 1.2.16. (Newer versions may look different.)

       switch ($this->calculate_tax) {
       case 'Standard':
          reset($order->info['tax_groups']);
          $taxGroups = array_keys($order->info['tax_groups']);
          foreach ($taxGroups as $key )
          {

             if (strpos($key,"on shipping") !== false) {
                continue;
             }

             $tax_rate = zen_get_tax_rate_from_desc($key);
             if ($tax_rate > 0) {
                $od_amount[$key] = $tod_amount = round((($taxable_amount  * $tax_rate)) /100, 2) ;
                $od_amount['tax'] += $tod_amount;
             }
          }
          break;

Multiple VAT Levels and my Zen Cart discounts

Every once in a while, a European customer complains that tax recalculation in my Zen Cart mods is not working correctly for their store with multiple levels of embedded taxes.  (This is also an issue in osCommerce.)

Here’s what to look for: non-unique strings in the descriptions of taxes (this is shown in Admin->Locations/Taxes->Tax Rates)

sv_taxes_before

Because of the way Zen Cart (and osCommerce) represent taxes in the order object, the tax descriptions must be unique to allow for reverse lookups.  So try changing the strings “Varav moms” to “Varav moms (1),” “Varav moms (2),” etc. to make them unique.