Controlling the cache size when using database as a backend Magento

If you have been using the database as a cache storage mechanism (Eg. ) and you have a large number of SKUs, you will start to see a database that increases in size by quite a measure. A customer of ours with around 160k SKUs, had a “core_cache” table that had grown to just under 10Gb and around 960k rows – causing difficulties during some operations due to table locks. Whilst it is safe to empty the table, truncating a 10Gb table will take quite a long time, and all the while it will be locked, causing connections to queue up, eventually maxing out the available connections for your MySQL user/total – not good. To make it a little more manageable, we quickly added a little intelligence to the table, so that it can “self-rotate”. This could be applied in the PHP itself, but for now, it was quicker to … Continue reading

Amasty multiple coupons bug fix for Magento 1.4.0.x

We installed the Amasty Mutiple Coupons extension for a client recently, but ran into a few hiccups immediately after installation. Fortunately, it is quickly fixed. In Amasty_Coupons_Model_Rewrite_Mysql4_Rule_Collection on line +62 + if (version_compare(Mage::getVersion(), ’1.4.1.0′, ‘>=’)) $this->getSelect()->where(‘main_table.coupon_type = ?’, Mage_SalesRule_Model_Rule::COUPON_TYPE_NO_COUPON);

How to fix PaymentSense’s gateway “orderStatus” error

We recently integrated the PaymentSense’s gateway for one of our customers. While making some test transactions, we noticed the extension raised a basic PHP error on the callback: Undefined variable: orderState in /http/app/code/local/Paymentsense/Paymentsensegateway/controllers/PaymentController.php on line 812 Hopefully, this error will be fixed in their new release. Undefined variable: orderState The following fix removed the error and assigned the right status to the order. If you still face problems after applying it, please let us know and we will update this ticket. Editing on app/code/local/Paymentsense/Paymentsensegateway/controllers/PaymentController.php on line +812, change : $order->setState($orderState, ‘pys_paid’, $message, false); To $order->setState($status, ‘pys_paid’, $message, false);