Awesome, Talented and Eager PHP Magento Developers Wanted

Hi there potential employee, are you a PHP Developer? Looking for a job in the Manchester area? We’re still hiring … We are Sonassi, a Manchester based PHP development agency that specialises in Magento development. We specialise in the creation of e-commerce solutions, using Magento as the platform for all of our projects. There are two big aspects to our business, one is Magento web development (our key focus) and the other is Magento web hosting (we have our own rack-space and equipment in data centres across Manchester). Right now, we are looking to grow our current extraordinary team and have PHP developer positions to fill. Sound interesting, read on … The job role You will be required to build new websites (both front-end and back-end development), maintain existing websites, speak to customers on the odd occasion (we like our customers to speak direct with who they are working with), … Continue reading

The nolocal theming and packaging methodology

So this will cause ultimate uproar and go against the grain of every Magento developer – but we’ve got a solid process for theming – that does not use local.xml (more on that later). We always work off the base/default template – but zero out the CSS. Even though all designs don’t particularly lend themselves to the structural layout of a vanilla Magento store – we find it good practice to use the default theme as a starting point; we can remove un-used methods/loops/divs etc. as necessary during the templating. When starting a theme For EE We install this extension first, so that we get a level of theme fallback – when we later remove the theme files we copied. The package We first start by creating the package and copying in the entire base/default theme; so for example (say it was our own website, we’d call the package sonassi) … Continue reading

Running Magento in PHP 5.4′s built-in web server

Whilst this isn’t a good idea for a production store, if you want to just experiment or develop locally, this works just fine. Instructions for Debian cat >> /etc/apt/sources.lst <<EOF deb http://packages.dotdeb.org squeeze-php54 all deb-src http://packages.dotdeb.org squeeze-php54 all EOF wget -qO – http://www.dotdeb.org/dotdeb.gpg | apt-key add – apt-get update apt-get install php5-cli php5-mysqlnd php5-mcrypt php5-common php-pear php5-dev php5-mysql php5-curl php5-mcrypt php5-gd php5-cli php5-xsl php5-imagick Then make a simple router, that mimicked the rules in a stock Magento .htaccess. Put this in router.php in your Magento base directory. <?php if (preg_match(‘#^/api/rest#’, $_SERVER["REQUEST_URI"])) { $_SERVER["REQUEST_URI"] = ‘api.php?type=rest’; } elseif (preg_match(‘#^/(media|skin|js)#’, $_SERVER["REQUEST_URI"])) { return false; } elseif (file_exists(“.”.$_SERVER["REQUEST_URI"])) { return false; } else { include_once ‘index.php’; } ?> Then start the PHP server and point it at router.php (the file from above). php -S 127.0.0.1:80 router.php That’s it – now just point your web browser at your new PHP web server.

Deconstructing the cache image path on Magento

The image URL that you’ve given is impossible to have with a Magento store. I’m guessing you wanted it to be obfuscated, but in doing so have made it impossible to answer. So using a real example. Eg /media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/m/e/me-d1_2.jpg De constructing the cache image path /media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/m/e/me-d1_2.jpg |___________________________|_|_____|________________________________|_|_|__________| | | | | | | | Cache Directory | | | | | | Mage/Catalog/Model/Product/Media/Config.php | | | | getBaseMediaPath() | | | | | | | | | | | | | | | | | | Store ID | | | | Mage::app()->getStore()->getId() | | | | | | | | | | | | | Subdirectory | | | | Mage/Catalog/Model/Product/Image.php | | | getDestinationSubdir() | | | | | | | | | | | | MD5 of Image Params | | | See below | | | Mage/Catalog/Model/Product/Image.php Line +324 | | | | | | | … Continue reading

APC and Memcache with Magento

You need to understand the clear distinction between these two products to understand how to use them. APC is both an OPCode Cache and Fast Backend Memcache is just a Fast Backend Using APC as an OPCode Cache Simply install the module on your server pecl install apc And enable it in your php.ini echo “extension=apc.so” >> /usr/lib/local/php.ini (RedHat/Centos) echo “extension=apc.so” >> /etc/php5/conf.d/20apc.ini (Debian) You then enable and fine-tune the runtime configuration to suit, eg. apc.enabledapc.shm_segmentsapc.shm_sizeapc.optimizationapc.num_files_hintapc.user_entries_hintapc.ttlapc.user_ttl… Then restart PHP/Apache /etc/init.d/httpd restart (RedHat/Centos) /etc/init.d/apache2 restart (Debian) After that, there is nothing else to do. Confirm APC is enabled with a quick phpinfo() – but otherwise, at this point, the OPCode cache portion of APC is active. Nothing needs to be configured on Magento’s side. Using APC as a Fast Backend You need to add the following to your ./app/etc/local.xml <global> … <cache> <backend>apc</backend> <prefix>mystore_</prefix> </cache> … </global> Then flush your existing … Continue reading