May 7, 2010

Magento upgrades will kill your store (probably)

Posted in: // Tech-tip, //Website Design

I find it staggering that every release of Magento is a complete gamble as to whether it destroys your store or not. I’ve upgraded Magento sites about 8 times and EVERY time has been an absolute pain in the arse resulting in hours spent fixing annoying niggly errors.

I now take the policy of not upgrading stores. I have a client on 1.3.2.3 and it does most of what they need and is relatively stable – so I leave it that way.

I have setup a staging server to test upgrades on – I just attempted to update a 1.3.2.3 store to 1.4.0.1 and it is an absolute mess – can’t add products, delete products, import products. I’ve spent about half a day troubleshooting it, hitting the Magento forums etc and have finally decided to give up. It simply isn’t worth the effort. (more…)

May 7, 2010

Remove all products in your Magento store with PHPMyAdmin

Posted in: // Tech-tip, //Website Design

After upgrading a store to 1.4.0.1 I found I was unable to delete/amend products in the backend.

The only solution was delete all products in the database. Here is the command/query I used.

Please note: ensure you have a backup of your site and data before running this. It worked for me, it may not work for you… (more…)

April 30, 2010

Test your website on the iPhone simulator

Posted in: // Tech-tip, //Website Design

iphone sim included with XcodeIt’s a common frustration – you’ve designed a website only to check it out on an iPhone and realise the design looks all screwy. Rather than troubleshoot the CSS with the phone itself, it’s possible to use Apple’s own iPhone Simulator to test and re-test your designs. (more…)

April 29, 2010

benfrain.com 2010 redesign

Posted in: // Personal, //Website Design

benfrain.comI’ve been trying to get around to a site redesign for literally a couple of years. Finally, got the chance to revamp the site and blog and you’re looking at the results.

I ditched the photo gallery as it was a private indulgence and I wanted the site to be a little more focused this time around. Plus I just haven’t had chance to get out and take photos since I’ve not been biking so it was looking rather stale.

I’ve chosen to use quite a bit of jQuery in the site this time around, hopefully not in an over the top ‘look at this’ kind of way. Here are the scripts I’ve used and where they were applied: (more…)

April 12, 2010

Tags: , ,

XHTML & CSS coding for Virtual Trader

Posted in: // Website Design

Virtual Trader

On behalf of Push Creative, I was tasked with converting a set of Photoshop PSD files into standards compliant (X)HTML and CSS. The results can be seen at the Virtual Trader website here.

April 12, 2010

The most watchers you’ve had on an ebay item?

Posted in: // Personal

Well, with over 5 days to go my beloved Orange 5 mountain bike had already attracted some serious attention. 133 watchers was a record for me! It topped out at 154 watchers – probably because Orange bikes are just soooo expensive to buy new…

Anyone beat that?

Ben Frain's Orange 5 on ebay

February 16, 2010

MAMP Error – “You don’t have permission to access /MAMP/ on this server.”

Posted in: // Tech-tip, //Website Design

If you’re seeing this message when trying to view MAMP, chances are you have just been amending a WordPress on your localhost and have altered the url’s ready for upload to a live server? Sound about right?

Same thing happened to me and I found this blog post that detailed the solution:

Basically, browse to the root of your hard drive and delete the .htaccess file (it should show today’s date but if you’re super cautious renaming the file will work too).

However, if you can’t see this file in the root, there’s a chance your OSX isn’t showing the system files. To see system files fire up Terminal (Appications > Utilties > Terminal.app) and enter the following:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

When you’ve deleted the file, if you want to re-hide the system files enter the following in Terminal and hit return:

defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder

Good old MAMP should fire up properly again now. Phew, that was a relief…

February 15, 2010

Chicubes 2010 re-design. Cubecart enhanced with jQuery

Posted in: // Website Design

chicubesUpdate 27th July 2010: Chicubes is now being looked after elsewhere and I am no longer involved in the on-going development of the site. Therefore, some of the info below may no longer be relevant.

Chicubes is a website I first built back in 2008. At the beginning of 2010 the owners wanted a refresh.

The basis for the store is Cubecart. However, besides creating a completely bespoke ‘skin’ for the store, I also added lots of jQuery to add enhanced functionality as well as implementing search engine optimisation to provide better Google rankings. (more…)

February 3, 2010

Internet Explorer 6: let’s kill it…

Posted in: // Website Design

I’m extremely encouraged that the calls for companies to upgrade away from Internet Explorer 6 are intensifying. If you’re reading in the UK, there’s now an online petition to register your feelings on Microsoft’s crippled and ageing browser (it was released in summer 2001 no less). If your outside the UK, sign the Twitter based equivalent.

IE6 is both slow and insecure and if you’re using it as your primary browser, it’s likely your view of the world wide web is extremely limited. The motoring equivalent of driving a 1982 model car when you could have a 2010 model, complete with ABS, traction control, Air Con etc (for free)!

From a designer’s point of view, making a website Internet Explorer 6 compatible currently takes an unacceptable length of  development time. Time that could be spent further improving a site for more mainstream browsers. As such I’ve taken the policy that I won’t be supporting the browser in future development work. I’d encourage other designers to discourage their clients from supporting the browser too. This means we can all look forwards to newer technologies like HTML5, CSS3 and Jquery 1.4 without the headaches of workarounds for Microsoft’s tired old browser.

In the meantime, it’s possible guide users to a different browser with a gentle warning. For example, my own site has only a handful of IE6 visitors (that’s quality readership for you) so with the imminent design refresh I’ll be implementing a Jquery based warning to IE6 users.

Use Jqquery to guide users to other browsers

January 22, 2010

Adding Jquery and jquery lightbox to Cubecart 4

Posted in: // Tech-tip, //Website Design

As you will note from my previous post I’ve been working on another Cubecart based site. Cubecart 4 uses the Prototye & Scriptaculous Javascript library, which I’m not a fan of and I wanted to add some Javascript functionality to the site I can only find in Jquery. The task was therefore to remove add Jquery and remove the other unneeded libraries (multiple Javascript frameworks rarely run happily together). The one additional task was to amend Cubecart to use a Jquery lightbox rather than the default.

So here is a step by step of how you can add Jquery to your Cubecart 4 based site (interestingly, Cubecart 5 is using Jquery rather than Protoype/Mootools) and amend the Cubecart templates to use a Jquery lightbox instead of the default:

1. Download jquery

2. Save jquery to the JS folder of your Cubecart site. I also renamed mine from ‘jquery-1.4.min.js’ to simply ‘jquery.js’.

3. Download Lightbox and extract the ‘jquery.lightbox.min.js’ from the JS folder of the archive into the JS folder of your Cubecart installation (it’s in the root). Rename the file to ‘jquery.lightbox.js’ for simplicity.

4. Now extract the jquery.lightbox.packed.css file from the CSS folder of the Jquery Lightbox archive to the CSS folder of your Cubecart skin which will be like so: ‘skins/your skin/styleSheets’. For simplicity rename the file to simply jquery.lightbox.com

5. Within the ‘skins’ folder of Cubecart, within your skin, browse to ‘styleTemplates’ > ‘global’ and open index.tpl

By default (for example with the Carreta-Bright skin), line 17-19 are this:

1
2
3
<script src="js/jslibrary.js" type="text/javascript"></script>
 <script src="js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
<script src="js/lightbox.js" type="text/javascript"></script>

Replace those lines with the following:

1
2
3
 <script src="js/jquery.js" type="text/javascript"></script>
<script src="js/jquery.lightbox.js" type="text/javascript"></script>
 <script src="js/jslibrary.js" type="text/javascript"></script>

6. You will also need to change the style sheets so amend the following line:

1
<link href="skins/{VAL_SKIN}/styleSheets/lightbox.css" rel="stylesheet" type="text/css" media="all, screen" />

To read:

1
<link href="skins/{VAL_SKIN}/styleSheets/jquery.lightbox.css" rel="stylesheet" type="text/css" media="all, screen" />

So the other libraries won’t get loaded now and we have also added the stylesheet for the new Lightbox plugin.

7. By default the ‘next’ and ‘previous’ images of the Jquery lightbox effect live in an ‘images’ folder at the same level as the ‘JS’ folder. Therefore, extract all four images from the ‘images’ folder of the Jquery Lightbox archive into the ‘images’ folder in the root of your Cubecart installation.

8. Now open ‘viewProd.tpl from the skins/your skin/styleTemplates/content folder of your Cubecart installation.

9. Around line 21, change the following line of code:

1
rel="lightbox[imageset]"

To read:

1
rel="lightbox-myGroup"

This is the call for the new Jquery based Lightbox.

That’s it, Jquery is added and the default lightbox effect has been switched for a Jquery based one. Best of all you can now add new Jquery scripts to your site without any javascript conflicts.

Happy coding…