Tuesday, 29 November 2011

Importing Commerce Kickstarter into Aquia Drupal desktop.

There is a video by Tom Geller of Lynda.com about this, but I lost it and got a 1 week pass on Lynda.com fo
Installing Drupal Commerce using Commerce Kickstart

The free forever video is http://www.youtube.com/watch?v=rubREehi7qY
Install Aquia Drupal desktop, which no mysteriously works. I remember something about using the Zip version on the right and not the more compressed Tar version on the left of the download page because of a windows bug.

Unzip Drupal Commerce Kickstarter, which is a full version of Drupal with an extra shop bit, and name it something nice like "Two Trees" for a fictional Olive Oil Company in California.
Next, open the control panel of Aquia Drupal desktop from the start menu, and click-about on it till you find an "import" button. It's under settings>Sites>Import.

An "Import Site" form pops-up with boxes to fill in:
"codebase": Two Trees
"database" Click the option to create a new database, and name it Two Trees. A spare box dissapears.
"domain server": change "localhost" to "two trees". Ignore the other boxes under "domain server".



On the video, a Drupal install starts at this point with options of plain drupal or this Kickstarter thing.
On my screen, an error message pops-up reading

"hosts file doesn't exist or is not writable/ 'C:\WINDOWS\System32\drivers\etc\hosts' "

Googling for answers I found one on the linked page:

"Windows only" go to:

Posted on July 19, 2010 - 7:48pm by Ouail E..
"Windows only"
go to: C:\windows\system32\drivers\etc
locate the hosts file, right click it, click properties, un-check Read only, create your new site via the Acquia CP.
when all done, go back to the hosts file and check red only.
should work fine.


 Clicking from the My Computer link, I found there really is a file called HOSTS in one called ETC, and right clicking allows a change to writable from read only.



Bizarrely, it works: a set of Drupally forms appears and a site is set-up. I chose not to install a mail server with the Aquia Drupal Desktop, which could be why there's an error message:
  • Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in DefaultMailSystem->mail() (line 76 of C:\temp\veganline\modules\system\system.mail.inc).
  • Unable to send e-mail. Contact the site administrator if the problem persists.

I will pretend I didn't see that because underneith it says Congratulations, you installed Drupal Commerce!  - and has a link to visit the new site on my hard disc.



The new site wants some updates, and knows where to get them. They download straight into the site which swallows them a lot more smoothly than my Drupal experiments crammed onto shared hosting. Those ones often run-out of memory during an update and need a few goes with the alt-backarrow keys and repeated tries before the update works. This manages all the updates at once without a hitch. Except for updating Drupal Core which is more manual. This is a warning transcribed from the video while I still have a free subscription.


Now for you experienced Drupal folks, I want to show you something very quickly about how Drupal Commerce sets things up. It's a little different from how standard Drupal does things, and that means you have to watch out when you update your site. To show you that I'll go back to my [hard disc] and open up my [kickstart] folder.

INCLUDES
MISC
MODULES

PROFILES
-MODULES  
--ADDRESSFIELD
--COMMERCE
--CTOOLS
--ENTITY
--RULES
--VIEWS
SCRIPTS
SITES

-ALL
--MODULES
---- SITES Now normally in Drupal, all the information that's specific to your site is in this Sites folder here....
--THEMES
--readme.txt
-DEFAULT
-TWOTREES
example.sites.php
THEMES



...it would be in Modules, and then "Modules" would contain the modules, but you don't see them here. This is because Kickstart is a profile: All of the information is stored in 
PROFILES

Now I'm talking about the things that are specific to Commerce Kickstart - the modules, and the way that it is set-up - and if we open this PROFILES/MODULES folder, we see all of this extra stuff. In fact the PROFILES/MODULES/COMMERCE folder contains all the stuff that is specific to Drupal Commerce.

I mention this because if you try to update the site the normal way, by just replacing everything except for the SITES folder, you will actually loose all of your commerce functionality, so be careful about that.


The video doesn't say which other folders to keep. Presumably the PROFILES/MODULES/COMMERCE one.

No comments:

Post a Comment