Log in

No account? Create an account

Fri, Nov. 13th, 2009, 02:45 pm
1951 - Jean Patchett

1951 - Jean Patchett
Originally uploaded by myvintagevogue
this is for janelle

Wed, Oct. 28th, 2009, 06:29 pm
Sports Tracker Love

Sports Tracker Love
Originally uploaded by lu_lu
this shit is cute as fucking bunnies

Mon, Oct. 26th, 2009, 02:30 pm

Originally uploaded by Ben Dog
i've recently started sailing competitively,
my body is pretty damn sore due to it, seems every week i find a new muscle that i haven't used in years, and a few layers of skin strangely absent.

but its been a fair amount of fun and it's about time i did something other than lazing about and getting fat.

this is an old picture, but i like it.

Thu, Oct. 22nd, 2009, 03:30 pm
getting my head around the Magento API - part 1

So, i've been tasked to create an upload script for automating Magento updates. the script will take a csv and chop it up... i'm not going to talk about that here.

so, XMLRPC on Python and accessing Magento's API, this is all new to me, so lets see how it works.

firstly lets get the server connected.
amelie:~ bendog$ python
Python 2.5.1 (r251:54863, Feb  6 2009, 19:02:12) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from xmlrpclib import *
>>> server = Server('http://magento.server.address/api/xmlrpc')

next we authenticate our API login
>>> session = server.login('username','pass')

i found this webpage, which explains how to do it with PHP & SOAP, but since i'm using Python and XMLRPC, things are going to be a bit different, so here i go pulling it apart.

first we have to define what our new product looks like.
this is my first attempt at building a simple dict object to define the product, all values are hard coded just to prove that it works.
>>> newprod = dict({'name':'test name', 'websites':[1], 'short_description':'short desc', 'description':'desc', 'price':69.99})

name = name of the product
websites = websites to be update with this product, this value seems to work for the default.(i'm not sure yet what this is all about, really just trying to get a working test going first)
everything else is pretty self descriptive.

this next call gets the current set of product attributes, we will need to pull the set_id out of this later.
(i'm not entirely sure why, will need to look into this)
>>> currset = server.call(session, 'product_attribute_set.list')

now the actual update call to the API
>>> update = server.call(session, 'product.create', ['simple', currset[0].get('set_id'), '101', newprod])

session = API session ID
'product.create' = the module we're calling from the API
Data Passed
- 'simple' = product type (simple, grouped, configurable, virtual, bundle, downloadable (i assume))
- currset[0].get('set_id') = this gets the set_id from the previous call to the product attribute set list
- '101' = Magento's SKU for the prodcut, this would be the item code or product code for the product in the existing system
newprod = this refers to the dict object defined above for the product to be added.

so thats the very basic (just working) run down of Magento and XMLRPC

Mon, Oct. 12th, 2009, 04:18 pm
Jazz Age Fall 2009

Jazz Age Fall 2009
Originally uploaded by Anna Fischer
i want to be this guy.

Wed, Sep. 23rd, 2009, 11:24 am
hands off my porn, kev

hands off my porn, kev
Originally uploaded by mugley

hands off my porn, kev

The Australian government has been promising a high speed national broadband network for a while. And now we know why - we'll need the extra capacity when the proposed mandatory net censorship cripples our access speeds.

If you don't want a slow, broken, censored internet experience, give our sorry excuse for a leader - and the monkey he put in charge of communications - a piece of your mind.

Keep your slimy hands off my porn, Kev!

Uploaded by mugley on 1 Nov 08, 1.51PM WST.

Fri, Sep. 11th, 2009, 12:42 pm
i'm sorry

i just don't seem to find the time to update you anymore livejournal.

Mon, Jul. 27th, 2009, 12:53 pm

So, melbourne.

So far I have spent a great deal of it in bed,
Anne fell ill on the first night here, mostly due to lack of sleep,
So I'm using her sickness as my excuse to sleep away the day.

Saturday was nice, slept most of the day, as we arrived at 6am.
Woke at Midday and had breakfast at a place called Las Chicas,
There are some photos on Flickr.
Most notable was the staffy in a hoodie, sitting quite close to us, she looked so uncomfotable, poor rough dog in girly outfit.
Food was great.

We walked back via stores and such.

Got back to the house, changed into a suit to get ready for the show.

More later

Posted via LiveJournal.app.

Sat, Jul. 11th, 2009, 10:53 pm

Originally uploaded by leonryan.com
some people are just born with inspiration.

Tue, Jul. 7th, 2009, 11:12 pm
if i were a woman...

if i were a woman...
Originally uploaded by Ben Dog

skipped back 10