Remove a tag from GIT version control

Recently I accidentally added a wrong tag to one of my git repositories. So I had to remove a tag from GIT. Here is how I did it: $> git tag -d release_2.0.0 $> git push origin :refs/tags/release_2.0.0 What these two lines do is: delete tag from local repository pust the update (deletion of tag) […]

OpenSource file sharing with pydio dataware

Just discovered pydio (https://pydio.com). I didn’t now this nice little file sharing tool before. A partner of my agency uses this OpenSource application to share files with customers and partners. It looks very nice, is responsive, provides native apps for iOS and Android, file synchronization over all platforms, flexible access control list (ACL) and is […]

MySQL server has gone away error fix for Magento

Today I wanted to test a tiny shell script, that didn’t do such magic stuff. It only generates a few websites, stores and storeviews and associates approximately 200 products to 4 websites. When I ran it locally I had no problems at all. But on the staging server I got the following error message when […]

Associate products to all websites more performant

Recently I had to associate all products of a shop to newly created websites in a setup shell script (Associate products to all websites). This could have been implemented like that: <?php /** * Associates products to the newly created websites */ private function _associateProducts() { $aWebsiteIDs = Mage::getModel(‘core/website’) ->getResourceCollection() ->getAllIds(); //remove default website array_shift($aWebsiteIDs); // […]

Enable https behind loadbalancers for Contao CMS

Recently I had the pleasure to setup Contao (https://contao.org/) in the Amazon cloud (AWS – Elastic Beanstalk). Therefore I had to enable HTTPS behind loadbalancers. The problem was, that the AWS-Loadbalancer is the SSL Endpoint / SSL Terminator in an AWS Beanstalk – architecture. Contao didn’t recognize, that it was running under HTTPS and therefore set the wrong […]

Formatted CSV output on Linux shell

If you want to output a CSV file on Linux shell, you could just open it with less, cat or nano (un-formatted CSV output): $> less mydummyfile.csv $> cat mydummyfile.csv $> nano mydummyfile.csv The problem with this approach is, that you will get an unformatted ugly chunk of characters like that: A much better way is it, […]

Get all attribute options

To get all attribute options from a Magento dropdown attribute (select field) you can use the following snippet: <?php $oAttibute = Mage::getModel(‘eav/config’)->getAttribute(Mage_Catalog_Model_Product::ENTITY, ‘sheldon_special’); $aOptions = $oAttibute->getSource()->getAllOptions(); var_dump($aOptions); That gives you an array like that: <?php $aOptions = {array} [6] 0 = {array} [2] label = “” value = “” 1 = {array} [2] label = […]