Magento import complex category

July 9th, 2011

$new_category = $inv->call($sess,”catalog_category.create”, array($par, array(“name”=>$cd[‘name’],”is_active”=>$cd[‘is_active’],”available_sort_by”=>array(‘price’),”default_sort_by”=>”price”,”include_in_menu”=>1,”position”=>$cd[‘position’],”level”=>$cd[‘level’],”parent_id”=>$cd[‘parent_id’],”created_at”=>$cd[‘created_at’],”updated_at”=>$cd[‘updated_at’],”url_key”=>$cd[‘url_key’],”description”=>$cd[‘description’],”image”=>$cd[‘image’],”meta_title”=>$cd[‘meta_title’],”meta_keywords”=>$cd[‘meta_keywords’],”meta_description”=>$cd[‘meta_description’],”display_mode”=>$cd[‘display_mode’]) ));

Create a Random String in PHP

June 3rd, 2011

$uniqueID = “”;
$max = 10; // length of string to create
$cs = “0123456789abcdefghijklmnopqrstuvwxyz”;
$uniqueID = “”;
for( $i=0; $i<$max; $i++ ){ $uniqueID .= $cs[rand(0,strlen($cs))]; }

Debian Squeeze | Setup and Configuration

May 19th, 2011

Here is my fun new project:

I purchased a new SSD Sata drive and installed it in my e-sata enclosure. The purpose, workstation anywhere.

So here is the concept, boot off my e-sata drive from grub in either my workstation or my laptop.

1) Install OS, this was rather easy, just booted off a live cd, selected the external drive, and let it add an entry to grub’s menu.lst

2) Add an entry to my laptop’s grub menu.lst with the same drive id etc… ( worked like a charm )

3) Configure Wifi Debian Squeeze, this was a little more difficult, as I didn’t have internet initially to download and update. Plugged in my Netgear usb wifi device and it auto-configured it. This is a few steps, first enable the non-free repo’s that’s easy google if you can’t remember how to do this. Then aptitude install firmware-iwlwifi wireless-tools.

4) Enable wired networking to be managed, by default it is not managed. Open, /etc/NetworkManager/NetworkManager.conf and change the line managed=false to managed=true

5) Sound: worked out of the box

6) Quad Video with NVIDIA Quadro 380: Coming next.
6) NVidia Drivers (

Ubuntu 11.04 to Debian 6.04

May 15th, 2011

So, the love affair with Ubuntu is over, they are obviously going after the Mac user, with the release of 11.04. In the newest release they have switched to Unity a system I hate for the decoration and window behaviour of the desktop.

Laptop today, workstation tomorrow and so on….

linux screen commands — screen shortcuts

May 8th, 2011

Mine are all setup on the ctrl+a then command setup:

Dummies guide to linux screen

COMMAND FUNCTION
ctrl+a A name window

ctrl+a c new window

ctrl+a n next window

ctrl+a ” list windows

ctrl+a S split horizontal

ctrl+a | split vertival

ctrl+a X remove region

ctrl+a tab move between regions

ctrl+a d detach screen from terminal so you can reconnect

ctrl+a ? show key bindings / command names

Looking to sell your car

April 8th, 2011

Checkout http://www.sellmycarmaps.com/ they are a dealers group looking to purchase low mileage lightly used vehicles and early lease ending cars with low mileage.

If you are preparing to sell your car, and want more then wholesale or trade-in, visit http://www.sellmycarmaps.com/sell-my-car.html fill out the form and they will contact you within 24 hours to make arrangements.

It’s fast, it’s free, and it gets your car sold fast.

http://www.sellmycarmaps.com

Sick of holding for A2 Hosting in Ann Arbor

January 14th, 2011

Today:

I’ve been working on transfer of several domains from a local host in Ann Arbor MI, known as A2Hosting.com to GoDaddy.com. The problem is their system is so basic it doesn’t have a way to get your authorization codes.

I can’t believe how unusable A2 really is, please if you are considering them visit http://www.liquidweb.com and become satisfied with your hosting provider.

Javascript Math.round vs toFixed

January 4th, 2011

Earlier today, I was using these two functions in combination and came across an article detailing that math.round was the better use of the two.

Here are my thoughts. Math.round will round off to the number of decimal places you are trying to get, however if the trailing decimal is a zero, it will not display. So $4.30 becomes $4.3 so if you use the (Math.round( whatever *100)/100).toFixed(2) would be your best combination.

Nvidia Quad Video Ubuntu 10.10

December 28th, 2010

So today I went through hell and back configuring my quad video for ubuntu. Currently I’m running dual Nvidia Quadro FX 380 dual-head video cards on Ubuntu 10.10 32bit.

Steps I tried before finding the answer:
1) Remove and Reinstall Driver
2) Remove and Reinstall Second GPU
3) Downloaded Nvidia Experimental Drivers
4) Deleted and Recreated xorg.conf over and over

** Then I checked my error log, and noticed this message:
Failed to Load PCI 2:0:0 Nvidia GPU

I’ve come to find out it’s a limitation with the 32 bit version of linux, not allocating enough resources to start the second GPU.

Opened up /etc/default/grub and added
GRUB_CMDLINE_LINUX=”vmalloc=192M”