Installation

Backup Your Site

Important: Please backup your site and database first. If you need instructions on how to backup your site files and your database, refer to the backing up your site documentation.
Once you have a working backup, proceed as follows:

Installing The Modules

Download the files

You will need two packages to install Drupal e-Commerce: the Token Module and the e-Commerce package. The e-Commerce package contains many sub-directories each containing their own modules relating to e-Commerce.

  1. Download e-Commerce (v4) from the project page. There are three main options to choose from. From most stable, to most recent they are:
    • If you have a live site or new site going live soon, please stick with the stable version (eC3) which can be found in the "view all releases section" of the project page.
    • eC4 has an alpha candidate available for download from the project page. It is considered to be stable, and does not include modules which are under very active development or which still need debugging.
    • The latest version of Drupal e-Commerce is 5.x-4.x-dev. Note that the "4" part is what people are referring to when they mention "version 4." This version can also be downloaded from the project page.
  2. Download the Token module
  3. Download the Views module
  4. Download the Rules module
  5. Download the "Views Bulk Operations" module
    • Note: The "Views Bulk Operations" module Requires PHP5 to be running on your webserver

The above packages should be unzipped and untarred and placed in an appropriate module directory such as /sites/default/modules. If you are working from the command line within Linux/Unix you can expand these packages by using the following two commands:
gunzip packagename.tar.gz
tar -xvf packagename.tar

Enable the base module(s)

Navigate to the Modules page via Site building » Modules. Select the following modules:

  • Other » Token
  • e-Commerce Core » Store
  • e-Commerce Core » Anonymous Purchasing

Scroll to the bottom and click "Save configuration." This will install all of the main e-Commerce modules. Note: You must install these three modules before installing any other e-Commerce-related modules. Do not try to install additional modules at the same time. It will not work. If you install other e-Commerce-related modules before you have installed the Store module, the additional modules will not be correctly installed. This is because of a bug within Drupal.

Additional modules

Once you have installed the Store module, you may consider adding additional modules. The rest of the modules are considered optional. e-Commerce modules are grouped into 4 major categories:

  • core,
  • payment,
  • product, and
  • uncategorized.

There is information next to the module defining dependencies with some modules requiring you to install modules from outside e-Commerce (for example: ec_media).

Configuring e-Commerce

Go to e-Commerce configuration » Mail and here you can set up the emails templates that correspond to various situations. You can use special placeholders, like %user that will be replaced with the actual data.

Go to e-Commerce configuration » Store and make some simple decisions about your store:

  • Can the customer purchase anonymously?
  • Do you want transaction notices sent periodically (requires cron)?
  • Are the e-Commerce core modules all installed?
  • What text would you like to display on the user's order history page?
  • Set emails for invoice, payment error, questions, cancellations
  • Should "add to cart" be a link? Or allow entering a quantity?

Go to e-Commerce configuration » Payment and check that your price formatting is to taste. Also on this page is a payment testing option that you should be aware of, because this setting is usually in addition to settings used by the various payment modules.

Set the order of pages in the checkout process by going to
e-Commerce configuration » Payment. Adjust the order as required and click Update screen order.

You can optionally enable the cart block at:
Site building » Blocks

Grant the proper access to user accounts under:
User management » Access control. The main access control provided by e-Commerce core is "administer store" in the Store section. Remember, each time you enable a module, you should check this page for new permissions that may need to be assigned.

Comments

Riddled with install errors

Hi all,

The current production release is riddled with installer error against mysql 4 and php 5 and drupal 5.3.

I have to manually destroy the tables, its so corrupted. I just checked perms and they are ok, as are the other 20 or so modules installed. Only this module is blowing up.

Any ideas here:

Apache php errors:ient 24.9.129.177] PHP Fatal error: Call to undefined function product_form_is_product() in /modules/ecommerce/ec_anon/ec_anon.module on line 101
[Tue Dec 18 15:01:49 2007] [error] [client 24.9.129.177] PHP Fatal error: Call to undefined function product_form_is_product() in /modules/ecommerce/ec_anon/ec_anon.module on line 101
[Tue Dec 18 15:01:58 2007] [error] [client 24.9.129.177] PHP Fatal error: Call to undefined function product_form_is_product() in /modules/ecommerce/ec_anon/ec_anon.module on line 101
[Tue Dec 18 15:02:04 2007] [error] [client 24.9.129.177] PHP Fatal error: Call to undefined function product_form_is_product() in /modules/ecommerce/ec_anon/ec_anon.module on line 101
[Tue Dec 18 15:19:10 2007] [error] [client 208.72.40.226] PHP Fatal error: Call to undefined function payment_get_status_id() in /modules/ecommerce/store/store.module on line 1320
[Tue Dec 18 15:19:34 2007] [error] [client 208.72.40.226] PHP Fatal error: Call to undefined function payment_build_status() in /modules/ecommerce/store/store.module on line 1509
[Tue Dec 18 15:21:24 2007] [error] [client 208.72.40.226] PHP Fatal error: Call to undefined function payment_get_status_id() in /modules/ecommerce/store/store.module on line 1320

JE

Fatal error and the Php 4 vs. php 5

I'm getting the same fatal error as already posted. I'm lucky though, I'm just starting and can switch my Mysql database to the newest version which is apparently 5. Is this the same as php 5? All I'm doing at this point is playing around and learning so it's no big deal for me to clear everything out and start new. I get the feeling this would be best but at the same time I keep hearing things that Mysql 5 isn't perfect yet and there's lots of problems.

Are these things related? (mysql version 5 and php5)?
Would it be wise to simply go with the latest version with the future in mind?

Thanks.

I'm sort of answering my own

I'm sort of answering my own question here but thought I'd leave it in case anyone else has the same question.

The choice of:
Php version 4
or
Php version 5

is something provided as a choice by my host (godaddy.com). It appears to having nothing to do with what version of mysql you have selected to use. I'm assuming any hosting service can switch it for you or provide you with the link to make the switch (within your account) yourself.

I was running php 4 and have now selected php 5. It comes with this warning: "Changing to PHP 5.x may make your PHP files run incorrectly. " Kind of funny considering that I'm selecting it to make some files work CORRECTLY! It also says it can take up to 24 hours to complete the installation of the new language (but I doubt it....godaddy.com is usually fast). I'll wait for the language change to take place then re-install everything and see what happens.

Note the word "language"! When making changes to accounts the word "language" refers to the server language (php, html etc.) and not vocal languages like Chinese, English, Russian, Spanish, French etc.!!! I had never clicked on the "languages" tab on my hosting account because I thought it meant what language I talk and read!! (ha ha ha....you learn something new everyday!)

If anyone else is using "godaddy.com" for hosting the logical progression to make the change is:
- Select My Account
- Select Hosting Accounts
- Look at the list and find the account you're working on
- Click "open" under the control panel part of the list for that account
- Select "content"
- Select "language"
- Here you can choose the version of php you want to use.
- If the version you chose doesn't work with your site just follow the steps again and choose your old version of PHP to revert back.

AN AFTERTHOUGHT TO THE DOCUMENTATION FOLKS!
How about putting some reference into the Installation section that the newest version is using elements from php 5 and recommend that people make sure php 5 is the chosen "language" to use on their site.

Using Php 5 eliminates the

Using Php 5 eliminates the fatal error but a bunch of new ones come up!!

Mostly the errors are about a non-existant module named "e_location". But I found that and uploaded it and that brought on even MORE problems!

Here's the error messages:
1)
Error message after switching to php 5 and clicking ALL the “non categorized” because the “product types required EC_Recurring”:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AUTO_INCREMENT PRIMARY KEY, region_name VARCHAR(255) NOT NULL, regi' at line 2 query: CREATE TABLE ec_region ( regid AUTO_INCREMENT PRIMARY KEY, region_name VARCHAR(255) NOT NULL, region_realm VARCHAR(32) NOT NULL ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */ in /home/content/c/a/b/cabinack/html/drupal-5.4/includes/database.mysql.inc on line 172.

2)
New error Warning after uploading the damn Location module (haven’t even gone to the "modules" section yet!)......
warning: Error parsing modules/ec_location/ec_location.info on line 6 in /home/content/c/a/b/cabinack/html/drupal-5.4/includes/module.inc on line 195

Maybe the "location" module had to be uploaded and installed before the Ecommerce one (like the "Token" module" had to be?).

I also got a message that a table was missing. The table is called "ec_region" and has the fields "region_realm" and "region_name". I can create the table but have no idea what the parameters are for it.

Soooooo......frustrating!

URGENT HELP REQUIRED !! PLS HELP

I have a website named http://communiqs.com where i have installed ecommerce alpha 4 but soon after install when i click to admin the following error occurs and am not able to administer the site,
i have yet not installed a gateway too.
i am struck !! pls help at urgent

http://communiqs.com/?q=admin

Fatal error: Call to undefined function: array_intersect_key() in /home/communiq/public_html/modules/ecommerce/ec_receipt/ec_receipt.module on line 917

Same problem

Fatal error: Call to undefined function: array_intersect_key() in /home/aislingp/public_html/digital/modules/ecommerce/ec_receipt/ec_receipt.module on line 926

I get the same error but on the /admin/ecsettings/rtypes/settings when I click on the setting tab
I am using 5.x-4.0-alpha6 php4 Mysql4 any clues?

i'm getting the same error after my install

i seem to be able to get to every page except /admin on my site due to this same error.

array_intersect_key is PHP 5 - only

Go to php.net documentation page for this function and scroll down to user comments. There are a few examples how to create this function in PHP 4. I have copied the latest one to my includes/common.inc file and the admin page started working.

Another PHP 5 function which you will need to emulate under PHP 4 is array_combine. This one will "only" bite you when you try a checkout. I added it to my includes/common.inc the same way as array_intersect_key above and it works fine now.

Where?

Can you post this fix....thanks

I see the same error - line 917 - 1 page doesnt display

Note - I am running php 5

System Linux this 2.6.16-1.2115_FC4smp #1 SMP Mon Jun 5 15:01:58 EDT 2006 i686
Build Date Nov 8 2005 08:28:03
Configure Command './configure' '--build=i386-redhat-linux' '--host=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-pear=/usr/share/pear' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/etc/httpd/conf/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba'

lay-out

hi, who can help me to change the lay-out of the e-commerce? does anyone know a site where this program is operational so i can see what i can change or do?
Like it is now i don´t like it a lot.

thx
danny
www.motorvitamine.eu

Internal Server Error

Everytime I click on Create Content-> Product -> Donation I am transfered to:
http://www.mywebsite.com/node/add/product/donate

And the error is always:
The server encountered an internal error or misconfiguration and was unable to complete your request.

Any clues?

Regards,

404

I get a 404 error when I try to get to the download page... am I the only one ??

Token Module is also 404

Download Token module and put it in your modules directory also. (broken link).