Magento Delayed Migration

August 25th, 2010

Weird title, I know. Here is the synopsis, you are running a Magento store and build a “sandbox” copy of the server so people can add/edit items and you can “push” them to the live server every 45 days.

Well this was far tricker than I originally thought, first I copied the db and the front-end. No problems there, now everything is the same and they can begin editing. Next they added 1k products to the sandbox, but also updated a bunch of information in the live server. So I exported all items from the live server and imported them in to the sandbox, now the sandbox has all the current updates and the new items.

1) Exported this and imported in to the live server. Crashed mysql ruined this and all my other magento stores.
2) Exported this and split in to 10 files of 200 records each and began importing, broke magento and all my other magento stores.
3) Exported, split, edited and created my own command line import program, success, partially. It imported the base information no options, no images, no cross-sell data, etc….
4) Exported a fresh copy of the sandbox with the updates, then exported a fresh copy of the live server, imported both in to new dbs. From there I deleted all catalog_ tables, all eav_ talbes, all rating tables, all review tables, all salesrule tables, all tag tables and the core_url_rewrite table. Once this was done, I copied the images from one server to the other with the -u option so only new or updated images would copy to the /media/catalog/products etc… finally I exported the tables from the sandbox db that I had just truncated in the live db, and viola … worked like a charm

Magento hates everybody, and I hate magento!!

August 12th, 2010

So we’ve put up store after store using the magento open source e-commerce platform. I’ve had magento 1.2.1.1 – 1.4.1.1 and none of them are worth a damn when you try to import products.

At this point I’m writing a new import process that will still handle all the EAV crap, and indexing etc… maybe even use the Mage structure, but it’s going to be faster.

For now here are a couple of things you can do to increase the import process.

1) Truncate all log files, doesn’t seem like it should be tied together but whatever.
2) Truncate table datatflow_batch_export and dataflow_batch_import
3) Truncate table report_event (this is the event log basically, so you will mostl likely have these in your var/reports folder also.
4) remove cache and session values from the system, locate in var/session/ and var/cache/

I’ll update when I’ve written some new code, it’s going to be for 1.3.2.4 and 1.4.1.1 so keep an eye out.

Couple of pics I found that are fun

August 12th, 2010


Take a look

Move Magento to New Server

June 4th, 2010

Here is a good one for the community, do you need to move a magento install from one server to another and don’t want to lose your categories and attributes.

1) Setup the domain on the new server. in my example elephant.rob.

2) Download a copy of the same magento that is already running. In my case 1.4.0.1 and extract the cotents to your www directory.

3) Next we will need to dump the data from the database. Using phpmyadmin or the comand line export a copy of the entire magento db as an sql insert query.

4) Open this downloaded query in a text editor and do a find and replace for the old domain to the new domain. In my case it was going from a local domain, elephant.rob to a public domain of elephant….com so I just replaced them all.

5) During the magento install process you had to create an admin user, if you didn’t used the same credentials remove the admin_role inserts from the .sql file also. One more step remove the adminnotificaiton_inbox and admin_rule inserts also.

6) Once you are done with the sql updates go to the new server and import the data.

7) Move your skin and you are done.

Equipment Appraisals and Auctions

June 2nd, 2010

We’ve finished another site, this time it’s a heavy equipment appraiser and auction house. Please take a minute and visit http://www.equipmentappraisalsandauctions.com and have a look at all they have to offer.

Yahoo MX Records

April 26th, 2010

At long last, I’ve gotten yahoo to reveal two of their mx records. So the next time you have a client that is hooked on yahoo mail, just setup their server to use yahoo’s mail servers.

Yahoo MX Records:
mx1.biz.mail.yahoo.com
mx2.biz.mail.yahoo.com

Thank you Yamu, from Yahoo!!

Sed find and replace in directory of files

April 9th, 2010

Today I needed to find and replace an error in 55,000 files, and decided to use grep and sed.
1) I created a sed source file with the following s/\$this/$this/g and saved it as s.sed (i’m removing the backslash in front of $this)
2) grep -rl ‘/$this’ /home/sandusky/pathtofiles/ | xargs sed -i -f s.sed

this second command looks for files in the path that contain the search term, then sed updates them for a single file you could just type it out, sed -i ’s/find/replace/g’ < filename.ext
(g for global replace all instances)

Google Checkout Not Getting Shipping Prices

March 3rd, 2010

So if you are having Magento – Google Checkout timeout issues, 404 issues on your uri callback or just can’t figure out how to configure it in magento try this first

Disable the xml post of shipping methods, I don’t know why magento is sending this information twice but it was stopping my system from working.
edit: /app/code/core/Mage/googlecheckout/Checkout.php and comment out the two sections where it has just add

Google is dropping support for IE 6

February 2nd, 2010

The day has finally come that we web designers have been waiting for. In an effort to assure that users are getting the best experience possible online google has sent out an e-mail letting the community know that they will be phasing out Internet Explorer 6 support as of March 2010.

As a developer, I’m personally very excited to see that a world leader such as google.com is willing to oust browsers that make our life hell. They’ve gone on to say that they will no longer support any browser that is no longer being supported by it’s manufacturer. So long, farewell, aufiderzein, good bye!

Customize Magento Skin | Magento Tutorial | Magento How To

January 26th, 2010

Today, I’m getting ready to launch yet another Magento e-Commerce website for a client and have decided to do a step by step howTo on fully customizing a Magento skin.

1) You’ve already installed Magento on the webserver you are using for your test enviornment.

2) You’ve got one of the default themes already running

3) You need to next make copies of the default skin and template directories. cp ./app/skin/frontend/default/default to ./app/design/frontend/default/project_name and cp ./skin/frontend/default/default to ./skin/frontend/default/project_name .

4) You need to next tell the backend that you are using a custom skin and template. Login to the Magento admin section, and navigate to System -> Configuration this will take you to the main setup area, choose Design on the left and enter your project_name in both the template box, and the skins box and save.

5) You should now be using your new template, we will customize the skin in my next post!