Compare Prices on Digital Downloads with Findr.fm

I recently launched a new website – http://findr.fm. It’s a sort of comparising shopping site for digital music downloads. It was build using the Laravel PHP framework and the data is gathered from a few different sources. Currently it’ll gather prices from iTunes, Amazon, and 7Digital. Read more…

WordPress Check IF iPad

Created a very simple solution to check if the browser is using an iPad. The wordpress wp_is_mobile() function detects iPad as a mobile device. But if you wanted different content for a mobile and an iPad you can use this function: Read more…

PHP explode by new line

PHP5 provides this very handle constant called End of Line:

PHP_EOL

It can be used like below:

$delivery_options = explode(PHP_EOL,$_options);

if(count($delivery_options) > 0){
    $delivery_html .= '<p>';
    $delivery_html .= ' <h2>Delivery Options</h2><ul>';
    
    foreach($delivery_options as $key=>$val){
        $delivery_html .= '<li>- '.$val.'</li>';
    }

    $delivery_html .= '</ul></p>';
    echo $delivery_html;
}

Magento: Automate Related Products with Current Category

Personally, I’d prefer to show other products from the same category rather than have no related products. This seems to be the case with most of my clients too. I wrote this piece of code to check for manually set related products, and if there are none go and get a random collection of products from the current category. Read more…

Kuk Sool Won Edinburgh

Not long till Beirut in Leeds

I’ll be travelling down to Leeds on the 12th of September to see the incredible “world music” band, Beirut. I bought tickets for my girlfriend and I way back in like March! Finally it’s just round the corner, and I cannot wait! Although named Beirut the band was actually started by American musician Read more…

Dog Shaming

Adding Custom Attributes to the Manage Products Admin Grid

I was asked by a client if I could add a custom attribute to the admin manage products grid/list. They were spending a load of time clicking into each product just to see the attribute. Here is how I added it to the grid. Read more…

Bulk update Magento images to excluded/not excluded via SQL

To bulk update magento product images to be excluded or non-excluded you can run this SQL update command:
Read more…

Magento: Get Collection of Special Offer Products

I recently had to create a collection of special offer products to list on the clients homepage. There’s a few different attributes that we need to filter to get the proper results.

1. The products visibility must NOT be set to 1. This means that the product is going to be visible individually. If we tried to link to a product that was not visible individually we might get a 404 or even worse, the mage error screen! See this post for a list of visibility options ->addAttributeToFilter(‘visibility’, array(‘neq’=>1)) Read more…

Load More