Simple cPanel Backup Rotation Script

cPanel has a brilliant backup facility built in, however it only keeps 1 backup per backup type. So if you have daily backups enabled running every day of the week, your previous day’s backup will be lost – the same applies to weekly and monthly backups. This can be a bit of a nuisance if you need to restore a file deleted the day before a backup ran. So using a simple script that hooks into cPanel’s backup script, you can retain backups for any number of days, weeks or months and it will only consume a very minimal amount of space – as the script uses hard links. So only the files that have changed will actually take up disk space. Backup rotation script Create a new file /scripts/ and put the following in it. You can customise the types of backups to be rotated and the retention period. … Continue reading

Magento Product Price Is Zero with Catalogue Price Rule

We have come across a somewhat critical core code error in Magento versions less than 1.5 when using the “Fixed Amount discount”. Any SKU that the respective rule applies to results in the final sale price of the product being £0. This seems to only occur in certain scenarios, but is easily replicated on a Magento clean demo store. The fix Rather than posting the full code for an extension based override, we’re just going to post the code snippet and the simpler PHP autoloader priority based fix using the ./app/code/local directory. Create ./app/code/local/Mage/CatalogRule/Helper/Data.php And paste the following code inside: class Mage_CatalogRule_Helper_Data extends Mage_Core_Helper_Abstract { public function calcPriceRule ($actionOperator, $ruleAmount, $price) { $priceRule = 0; switch ($actionOperator) { case ‘to_fixed': $priceRule = $ruleAmount; break; case ‘to_percent': $priceRule= $price * $ruleAmount / 100; break; case ‘by_fixed': $priceRule = $price – $ruleAmount; break; case ‘by_percent': $priceRule = $price * (1 – … Continue reading

Success through the Magento Partner Program

First, I’ll introduce who we are, we are Sonassi – a web development company that for almost 4 years has specialised in developing Magento stores, providing the fastest, most reliable and stable Magento hosting in Europe and providing Magento consultative services. Amongst our peers; Blue Acorn, Inchoo, Classy Llama, Sumo Heavy and a few more; we are one of a few companies in the world who can claim to be Magento experts. We have watched the Magento community has grow rapidly over the past 4 years, with new companies adopting the platform by the day; as a very early adopter, this is great to see. What prompted this article was an email from Phil Robinson at Magento, inviting us to be part of the Magento Trusted extension program for our excellent Magento/Wordpress Integration Extension. Finally, I thought, validation of Magento extension quality and the overall improvement of Magento connect – … Continue reading