About: paul
Posts by paul:
P38 Part4 – ‘Time’ for a change
After fitting a new Android head unit, powerfold mirrors and rear seat entertainment my next project was decided by my partner’s plaintive question of ‘where’s the clock’ when we were driving at night. The P38 as standard has this in the dash: I think the face is supposed to light up at night, but mine […]
P38 Part 3 – Rear seat entertainment
P38 part 2 – folding wing mirrors
P38 part 1 – adding android
Docker – add host.docker.internal on linux
Just a quick note (for my own memory more than anything)… If you need to connect from a docker container to something running on your local host, it can be a bit of a pain on Linux. On windows & Mac, there’s a special DNS entry ‘host.docker.internal’ which always points to the host machine. However […]
e-Commerce building blocks
I’ve been working in e-commerce for a good few years now, for very similar companies (early stage, fast fashion focussed) and there’s always the same sorts of problems to solve. Here’s a very basic, very generic guide to the things you need to get up and running. Each bit has a ‘too long / didn’t […]
Merchandise magento category by product age / availability
Just a quick snippet of code today, it grabs all the products in a certain category (given in category_id), sorts them by age and stock availability (you can adjust the relative weighting of these using $stock_weight) and then updates the category. The end result is a nice mix of newer products, and products with loads […]
Access magento database outside magento
Just a quick note, sometimes you need to access the magento database from a script, but don’t want the overhead of loading the whole magento framework….. Here’s a little snippet of code that grabs the database details from the magento xml config, so you don’t have to store them in your script: <?php class db […]