Witty and insightful observations on the world? Sorry to disappoint, this is a techie blog purely for self reference - published online in the hope it will help others!

WordPress under Magento multistore

This is a 'Note to Self' as much as anything else. It's explains how we got the Wordpress install to work on a Magento multistore using country stub directories. The SO question it relates to is here; http://stackoverflow.com/questions/32613815/htaccess-wordpress-under-magento-site-with-multi-language-sub-directories We have this in production, hopefully this answer might help someone at some point. The way we've done this is to add a RUN_CODE environmental variable which is used in a custom Wordpress filter to get the urls all working. I've used the 'eu' example from my question to illustrate it below. Note we had to do this for both Apache and Nginx so I've added the .htaccess and server blocks for both. APACHE - .htaccess In the `eu` country stub subdirectory you add this ... Read more

Sagepay – Magento – Armed Forces – INVALID. 3139 : The DeliveryState format is invalid.

The title says it all. Magento installation with failed transactions using Sagepay fail when the delivery address is Armed Forces Middle East, Armed Forces Africa or Armed Forces Canada. It's for a good reason - Magento itself sets the region ID for these options as 'AM', 'AF' and 'AC' respectively; Which is dandy until you realise that these region codes don't actually exist anywhere. As you can see from this instructional on stamps.com, Middle east and Africa should be designated as 'AE' whilst Canada is part of America and should be designated 'AA'; This is all fine when your payment ... Read more

Magento URL Rewrites – custom url redirect for CMS page

OK, so why this post? Well there just wasn't very much (or indeed anything at all) on this in Google when I looked. There is loads on how to use Magento's built in url rewrite system from teh backend. And there's loads on Stackoverflow and Alan Storm's blog on how to create a custom controller to over ride the PageController and IndexController. Nothing on how to just create a custom redirect for a cms page though. I needed to do this because I am doing a project with Peter Warren at Synoptive (Magento product configurators) on a Magento multistore. It is for United Carports (custom built carports), I've made ... Read more

Enabling and using ImageMagick in PHP on Plesk 11

I am currently building a configurator in Magento - it's a native configurator using Magento's custom options on a simple product coupled with some javascript which I've coded up on separate custom product/view-custom.phtml and product/view/media-custom.phtml templates (applied to a specific product using this technique -> http://prattski.com/2010/11/04/magento-use-different-template-files-for-specific-products/). The concept is simple enough but I have had to create a script to generate all the images. I've used PEAR Math Combinatorics to handle all the images configurations but that involved enabling ImageMagick on the server. What a struggle that's been. Honestly, I couldn't be a server admin, desperate stuff. Anyway..... Maybe this might help some other poor unfortunate like myself a few frustrating hours. Read more

Magento: Remove all toplinks via local.xml

If you Google trying to fin out the best way to remove all the toplinks from the masthead of your Magento store you will be presented with a rash of different options on how and how not to do it. As always with Magento, there's a number of ways to skin a cat - some of the ones I found ranged from easy and efficient to completely ludicrous. Particularly ott are the ones suggesting it be done by modifying template files, but you also see suggestions about modifying/overriding multiple layout files, or disabling modules through the Advanced system config menu in the backend. You don't need to do any of that, your theme (should) have it's own local.xml file, you can ... Read more

Magento admin dashboard 404 with multiple store

Exactly what is says in the title. When you have multiple store views or store groups you login to the admin and instead of the dashboard you get a 404 panel (in the main admin content section - the same thing you get when you install a module and don't logout/login again); This happens irrespective of whether you add the store codes to the URLs in System -> Configuration -> General -> Web. Although, if you logout and log back in again it doesn't happen which makes me think it is also related to the cookie expiration. This is one of those really annoying ones where I knew I'd solved it before ... Read more

MAGMI – Image import

I've been using the mighty MAGMI to speed up importing a Magento catalog that has a lot of configurable products and MAGMI has been doing a great job of it. Just run into one issue though with respect to the images. MAGMI has an Image attributes processor option in the Itemprocessors section at the bottom; This lets you rename images, overwrite images, pull in remote images, add them as 'Extra Product Images', determine whether they are the Base, Small or Thumbnail, exclude them.... http://sourceforge.net/apps/mediawiki/magmi/index.php?title=Image_attributes_processor ...however it doesn't actually appear to let you resize them (unless I'm doing something wrong - answers on a postcard). So after my massive import I realise ... Read more

Magento Community vs Enterprise Editions

I thought I would copy out and publish this - it's actaully from a series of emails to a new client which took place last December. He decided to use Magento as he wanted to use the Synoptive product configurator. However, he didn't know anything about Magento and being a very diligent and experienced project manager he didn't just Google it, he phoned them up. In his reply to me he said; I have initiated discussions with Magento and hope to get more information this week. For the size of company we are Magento Go is the obvious and clear winner over Magento Enterprise. Hmm..... Seems the Magento rep must have forgotten to mention Magento Community Edition, lol! We've all ... Read more

Magento – Hide content based on IP address

This post will be useful to anybody who has been asked to hide or display Magento content (specifically prices and add to cart stuff) based on visitor IP. As a kickoff you can read my initial Stackoverflow question on it. I can't say who the client was (NDA) in this case but here's the synopsis; They are a UK based manufacturer and they don't want to compete with their worldwide supply chain, so they want; 1. All users with IPs originating in North America get redirected to a totally different website (non-Magento, nothing to do with me) ideally with a redirect message. 2. All user with IPs originating anywhere other than North America, The UK and ... Read more

Magento on PHP upgrade from 5.2.11 to 5.2.17

I've got a VPS which was running PHP 5.2.11 and I decided to upgrade it as; A: There wasn't any massive changes between those versions and B: The Magento minimum system requirements as of right now are 5.2.13 to 5.3.15 Ideally I would have upgraded the whole box to 5.3 but there is an old 1.3 Magento installation on it with a good client who has no scope to upgrade things right now. I've been advised by the hosts Nublue that it just won't work on 5.3 so for the moment we have an interim upgrade. Wasn't really expecting any massive problems but this is Magento we are talking about here. ... Read more

Categories