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!

Magento Base url Markup Tag

A wee shorty here (that might well turn into my own personal wiki). The Magento markup tags are very useful to use within CMS pages and static blocks. The wiki for it is great too. However the store url tag is no use if you are running Magento with multiple store views and you have cms pages or static blocks which cover multiple views. In this case the store url will include (now I'm incorporating the store view into the url here, see this post for details) the store view code. So if you are sharing CMS pages across multiple views you are going to need to ... Read more

Magento urls – remove the appended ?___store=

A typical Magentoism. If you are setting up multiple shop/store views within a website in Magento then you'll notice if you use the store switcher to switch between them that Magento (by default) will append a pretty horrible looking; parameter on the end of urls. Their alternative store will be http://www.myshop.com/?___store=otherstore but even worse, the default store when switched back will be http://www.myshop.com/?___store=default Not only does it look bad seeing that sitting in your browser address bar but it's not good from an SEO point of view. If you are Googling about this then you'll probably see a raft of forum threads from Google Base / Google Merchant Centre users whinging mercilessly about this 'Bug' which Varien has neglected ... Read more

Payment Sense – “Transparent” redirect

I've just launched a Magento site that uses Payment Sense as the payment gateway. I was really impressed by Payment Sense, and wrote another blog post about it here. However now that it's all up online, and working I have to admit to being a bit disappointed by the so called 'Transparent Redirect' they do, and can't help but think it will result in lots of abandoned carts right at the end of the checkout process. After final review in the Magento one page checkout, the user (who has entered their card details in the payment section) has their payment information passed across to Payment Sense who verify it, process the transaction and redirect back ... Read more

Magento VAT setup for companies trading worldwide

I have just finished setting up a Magento site with all the tax rules applicable to the client. They are a VAT registered UK company who are shipping worldwide, so it's not totally straightforward to set up. For those new to this there are a few points you might want to bear in mind; You only charge VAT within the EU. For EU VAT registered businesses outwith the UK you don't have to charge VAT, but you would need to verify that they have a EU VAT number or you will be liable for it. No VAT is charged to customers (business or consumer) buying from outwith the EU. VAT is chargeable at your local tax rate. You don't ... Read more

Custom Facebook Feed based on Graph API

First of all, this is a copy of my Stackoverflow answer here; I really dislike Facebook. They constantly change the way things are done and make it difficult for developers to work out what the changes are and what the new methods should be. Designers don't really appreciate this, they just stick in custom facebook feeds on their scamps, the clients love them and then we have to work out how to do it! It used to be easy to access an RSS feed from a public Facebook page. In truth it still is, the reason it can be hard for some is that all the blog posts and resources are out of date on it ('how ... Read more

jScrollable Custom scroll bars

I'm working on a nice little Wordpress job today. The designs are great, but the designer hasn't really catered for variable content heights (it's a list of items driven from a post category, each one has a little drop down box which displays the full post content). Something I see quite a lot to be honest, the designer uses the same piece of Lorem Ipsum for each section - that's fine but it's a CMS and the client is going to be sticking in all kinds of different content which will need to be catered for. We are left with the following list of options; The client has to create content which is exactly the same length as the ... Read more

jQuery UI in WordPress

I normally just dismiss the Wordpress 'Welcome' screen and disable it in the Screen Options menu for the Dashboard. However, I realised this wasn't actually very sensible for a pro Wordpress developer as it shows you what's new and what you should be aware of. As it turns out I noticed on this feed that they now ship the jQuery UI library with the Wordpress core, so you can enqueue it and use it straight from your functions.php file. Simple, eh? Well not really to be honest, mainly because it's not that obvious how to do it (or at least it wasn't tonight, on 05/06/2012). Seasoned users of jQuery UI will know you can build your own ... Read more

Custom Metabox for Specific Category

There are various ways of handling metaboxes and post category types in Wordpress. If time allows it's often better for the clients if you can create custom post types for specific categories and then add in meta boxes specific for those post types. Occasionally that can feel a bit heavyweight, depending on the application. A quicker and easier way to do it is to create a normal post category and then display your metabox only if the user checks that category in their post edit screen. We do this using Javascript, the essence of it being that technically speaking the metabox is created and sitting there all the time, it's only displayed if the user checks the appropriate ... Read more