Category: IT

  • Copy or move Magento to another instance

    A quick how-to if you want to copy or move Magento to another database instance, e.g. to create a test site, or move test to live.

    (1) Backup Magento using the built in backup tool. Download and uncompress the resulting SQL script. If changing the server or domain, search and replace “old.mysite.com” with “new.yoursite.com” Execute it to populate the new database instance.

    (2) Copy all Magento files with the exception of the contents of the var/ directory.

    (3) Edit app/etc/local.xml on the target instance and change the database, user and password, but not the encryption key. Also edit downloader/pearlib/pear.ini to correct the absolute paths it contains; no reason why these shouldn’t be relative to the Magento root directory, e.g. “./downloader/pearlib”.

    (4) Execute the following SQL to prevent those nasty “Integrity constraint violation: 1062 Duplicate entry” errors from the log files when adding to the basket:

    TRUNCATE `log_customer` ;
    TRUNCATE `log_quote` ;
    TRUNCATE `log_summary` ;
    TRUNCATE `log_url` ;
    TRUNCATE `log_url_info` ;
    TRUNCATE `log_visitor` ;
    TRUNCATE `log_visitor_info` ;
    TRUNCATE `log_visitor_online` ;

    Now tidy up permissions:

    chmod o+w var var/.htaccess app/etc
    chmod -R o+w media

    That should be it.

  • Flip Text Generator

    Something searching for a use.

    http://www.fliptextgenerator.com/

    Uses apparently little-known character codes to invert most text (struggles with capitals).

  • reCAPTCHA for Magento

    Well done Fontis for integrating reCAPTCHA into Magento to prevent SPAM through the contact form and “social” pages. About time!
    Well though-out and integrated beautifully into admin.
    Keys are required from reCAPTCHA andthe extension can be installed through Magento Connect using the extention key on the Magento Extention page.

  • Free Map Tools

    This site has some super Google Map tools – including Meeting Centre Of Gravity by Postcode and Map Tunnelling.

    http://www.freemaptools.com

  • Magento

    Since I last looked (around 9 months ago, I think) the Magento web store project seems to have shaped up nicely. It is certainly prettier than OSCommerce, but more importantly they have kept the code and the presentation separate using – of course – CSS.

    It is written in PHP, and has a growing collection of add-ins, so I’ll be seriously evaluating it as an alternative to OSC for the Oriental Food Shop.

  • More fonts

    Not sure why I haven’t come across this before, but a great source of free fonts;

    dafont.com

  • Skype Supernode Registry Hack

    If you are running Skype v3 or later, there is a registry change (provided by Skype for Universities etc.) that reportedly prevents your PC becoming a supernode. I say reportedly, because whilst I have been a guinea pig for the last week I haven’t noticed being a supernode, but of course Skype may not have tried. If you aren’t running the latest version of Skype yet you should probably upgrade (Help, Check for updates), because later versions allow you to edit previous messages, and voice quality is improved.
    If you think that being a supernode may cause you problems, try editing the registry as shown in the code below. (WordPress security doesn’t allow this file to be uploaded). You will need to reboot your PC for it to take effect.
    This is the edit:

    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Skype]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Skype\Phone]
    "DisableSupernode"=dword:00000001

  • WordPress 2.3 – Canonical URLs and “/page/1”

    Well, the motiveAuto website is up and is based on WordPress – and because WordPress 2.3 is now on GA I thought it would be a good idea to upgrade before the launch. Big mistake; yes, it is a good idea to be on the current release, but not without  some serious integration testing.

    The biggest problem arises from the tidying up of URLs used to access posts, Canonical URLs. The author of these changes Mark Jaquith blogs the background to these changes and makes a good case for them. The first problem is that www.motiveauto.com/page/1 is no longer a valid URL; this is unfortunate because this is a commonly used method of accessing the posts from a static home page (see using WordPress as a CMS). The correct (i.e. valid) URL is now www.motiveauto.com/?page=1

    OK, lesson learnt, but it is a pity that it took four hours to find the cause of the problem – WordPress documentation is – shall we say – “loose”.

    The next problem relates to the “share this” plugin; this encourages linking to he social bookmarking sites and also emailing a page to a friend. The CSS form doesn’t seem to work (possibly because of a new version of prototype.js) but should degrade gracefully to a web page. Unfortunately this doesn’t work if the source is a WordPress static page rather than a post. URL rewriting again? Looks like it, but I can’t quite put my finger on the cause.