Friday, July 19th 2013


This arrived today
posted @ 5:23 am in [ Games ]

From the US some great new (old) parts for our arcade machines

– A new Tron “Encom” marquee for our Tron arcade machine, the same as the one used in the new Tron movie

– A Galaxian back glass from an original Bally Galaxian machine

– A Tron “cabaret” back glass to use on our cabaret machine to make it into a Tron cabaret

Happy days!

Tron "Encom", Galaxian and Tron "cabaret" back glasses

Tron “Encom”, Galaxian and Tron “cabaret” back glasses

Tron "cabaret" back glass in place on our cabaret conversion machine

Tron “cabaret” back glass in place on our cabaret conversion machine




Thursday, July 4th 2013


Magento: calculating Total Paid 1 penny out £0.01
posted @ 6:45 am in [ Fixing Things -Magento ]

We have a strange issue with a Magento / eBay install for a client where occasionally the orders are being stored with the Total Paid for the order showing in Magento as being £0.01 less than the real total paid by the customer.

MagentoeBayIncorrectTotalPaidCalculation

Looking at the order in the Magento database it appears to be an incosistency in the way that the tax for shipping is calculated.

Amount of shipping charged = £3.95

Magento Values:

Base Shipping Amount = £3.29

Base Shipping Tax Amount = £0.65

Total of these = £3.94

What these values should be:

Base Shipping Amount = (£3.95 – 20% tax) = (£3.95 / 1.2) = £3.29166666

Base Shipping Tax Amount = (20% tax of £3.95) = (£3.95 / (1.2 * 5)) = £0.65833333

Total of these = £3.95 (notice the extra £0.01 difference)

So Magento seems to occasionally NOT correctly round-up the Base Shipping Tax Amount as the value should be £0.66 if the full value is £0.658333333

Now to find out why, where and fix it!

Here’s the tables for reference of two sequential orders – the first that is calculated incorrectly then the second that is calculated correctly!:


mysql> select base_shipping_amount, base_shipping_tax_amount, base_shipping_incl_tax from sales_flat_order where entity_id like '%298';
+----------------------+--------------------------+------------------------+
| base_shipping_amount | base_shipping_tax_amount | base_shipping_incl_tax |
+----------------------+--------------------------+------------------------+
| 3.2900 | 0.6500 | 3.9500 |
+----------------------+--------------------------+------------------------+
1 row in set (0.00 sec)

mysql> select base_shipping_amount, base_shipping_tax_amount, base_shipping_incl_tax from sales_flat_order where entity_id like '%299';

+----------------------+--------------------------+------------------------+
| base_shipping_amount | base_shipping_tax_amount | base_shipping_incl_tax |
+----------------------+--------------------------+------------------------+
| 3.2900 | 0.6600 | 3.9500 |
+----------------------+--------------------------+------------------------+
1 row in set (0.00 sec)