I have installed it ok with the exception of one issue that I won't go into now as I'm pretty sure its unrelated.

My problem is that I can't see how to put the products menu item in. I have a shopping cart link where you can go to products but its that products link that I want direct access in the menu.

Also I can't see anyway to add products. I go into the store configuration and it tells me I have no products but i can't find a link anywhere to add them.

Help! :)

Comments

wisdom’s picture

In ecommerce products are just like other contents (nodes). To add a product go to create contents and select the product type of interest. Then a product specification form will appear. There is also where you define a link to your product under menu settings.

For all this to work first of all the relevant ecommerce modules need to be enabled. This can be done in administer--->site building-->modules page.

Redsmartie’s picture

I found the add product but when I add a test shippable product I get an error:

user warning: Table 'U8729112.ec_shipping_product' doesn't exist query: SELECT service, method FROM ec_shipping_product WHERE vid = 6 in /mounted-storage/home41c/sub001/sc13830-JODH/site/includes/database.mysql.inc on line 167.
user warning: Table 'U8729112.ec_shipping_product_attribute' doesn't exist query: SELECT field, value FROM ec_shipping_product_attribute WHERE vid = 6 in /mounted-storage/home41c/sub001/sc13830-JODH/site/includes/database.mysql.inc on line 167.

All the modules are enabled with the exception of EC Devel and E-CiviCRM

dreamwvr’s picture

* warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "ec_shipping_product" does not exist in /php/database.pgsql.inc on line 94.
* user warning: query: SELECT service, method FROM ec_shipping_product WHERE vid = 7 in /php/database.pgsql.inc on line 113.

OK this is in 4.7 so the shipping module for
$Id: shipping.install,v 1.5.2.1 2006/12/12 05:18:32 sammys
does not include the ec_shipping product relation for postgresql.

CREATE TABLE (ec_shipping_product) (
vid integer NOT NULL default '0' CHECK (vid >= 0),
nid integer NOT NULL default '0' CHECK (nid >= 0),
service varchar(40) NOT NULL default '0',
method varchar(40) NOT NULL default '0'
)

CREATE INDEX ec_shipping_product_vid_idx ON ec_shipping_product (vid)
CREATE INDEX ec_shipping_product_nid_idx ON ec_shipping_product (nid)
CREATE INDEX ec_shipping_product_service_idx ON ec_shipping_product (service)
CREATE INDEX ec_shipping_product_method_idx ON ec_shipping_product (method)

AFAIK this was not added to the recent diff for 4.7.* version of drupal?

Redsmartie’s picture

I'll try that although I also have the option of a reinstall as its a fresh copy of Drupal. I assume that this table should have been created on install?

I think I may have enabled too many module components in one go when installing, some with dependancies. Could this have lead to the error?

Redsmartie’s picture

I'm getting this error too

user warning: Table 'U8729112.ec_shipping_product_attribute' doesn't exist query: DELETE FROM ec_shipping_product_attribute WHERE vid = 8 in /mounted-storage/home41c/sub001/sc13830-JODH/site/includes/database.mysql.inc on line 167.

Another table needed?

FreeFox’s picture

Count me in too. Fresh install on D5.1 of latest e-Commerce beta4 (followed the three phases (see install instructions)) and when I want to edit or create a product I get:

user warning: Table 'drupal_mysite.ec_shipping_product' doesn't exist query: SELECT service, method FROM ec_shipping_product WHERE vid = 80 in /web/drupal/includes/database.mysql.inc on line 172.

Note that I have the error on line 172!

Help please
Jan

Redsmartie’s picture

I should note that I had to change the SQL to:

CREATE TABLE ec_shipping_product (vid integer NOT NULL default '0' CHECK (vid >= 0), nid integer NOT NULL default '0' CHECK (nid >= 0), service varchar(40) NOT NULL default '0', method varchar (40) NOT NULL default '0')

CREATE INDEX ec_shipping_product_vid_idx ON ec_shipping_product (vid);
CREATE INDEX ec_shipping_product_nid_idx ON ec_shipping_product (nid);
CREATE INDEX ec_shipping_product_service_idx ON ec_shipping_product (service);
CREATE INDEX ec_shipping_product_method_idx ON ec_shipping_product (method);

i.e. removed () from ec_shipping_product, removed carriage returns and added the semicolons after the CREATE INDEX lines

dpashkin’s picture

Have same problem, I'm on 5.0. The SQL string worked for creating one table, but I'm still getting an error on ec_shipping_product_attribute table. Patiently awaiting for a genius solution, thanks everyone

TX1121’s picture

Open up your ecommerce folder, go to the shipping folder and take the code out of the shipping.install for the mysql or pgsql code:

manipulate it to read something like this:

CREATE TABLE ec_shipping_product (
vid int(10) unsigned NOT NULL default '0',
nid int(10) unsigned NOT NULL default '0',
service varchar(40) NOT NULL default '0',
method varchar(40) NOT NULL default '0',
KEY (vid),
KEY nid (nid),
KEY (service),
KEY (method)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;

CREATE TABLE ec_shipping_transaction (
txnid int(10) unsigned NOT NULL DEFAULT '0',
service varchar(255) NOT NULL DEFAULT '',
method varchar(255) NOT NULL DEFAULT '',
cost decimal(10,2) UNSIGNED NOT NULL DEFAULT '0.00',
PRIMARY KEY (txnid)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;

CREATE TABLE ec_shipping_product_attribute (
pid int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
vid int(10) UNSIGNED NOT NULL DEFAULT '0',
nid int(10) UNSIGNED NOT NULL DEFAULT '0',
field varchar(255) NOT NULL DEFAULT '',
value varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY pid (pid),
KEY field (field),
KEY vid (vid),
KEY nid (nid)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;

CREATE TABLE ec_shipping_shipfrom (
sid int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
title varchar(255) NOT NULL DEFAULT '',
code varchar(255) NOT NULL DEFAULT '',
city varchar(255) NOT NULL DEFAULT '',
region varchar(255) NOT NULL DEFAULT '',
country varchar(2) NOT NULL DEFAULT '',
status int(3) NOT NULL DEFAULT 0,
PRIMARY KEY sid (sid),
KEY title (title)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;

Then open up your phpmyadmin or whatever you use to manipulate your database and insert the above queries in your database.. should create the right tables and that should fix it. For whatever reason the shipping tables weren't installed properly.

mlarose’s picture

Can I just replace the code as shown above for the code in the shipping.install file and just rerun the module or do you need to create the queries in phpmyadmin, etc. only?

beatnikdude’s picture

This is the way to go. I have ran into a similar problem on other modules. If errors complain of a missing table check the CREATE TABLE commands in the related .install files.

Yes you can just adjust the tables via phpmyadmin or some such database admin tool.

mlarose’s picture

I had the same errors and by connecting to the database via ssh and copy/paste the code worked flawlessly. thanks.

shane birley’s picture

---
Shane Birley
Left Right Minds
http://www.leftrightminds.com

---
Shane Birley
Left Right Minds
https://www.leftrightminds.com

jtothejeff’s picture

This worked like a charm! All I had to do was go into my db using mySQL and copy the above and paste to create new tables. The error then went away once I refreshed the product page. THANKS A LOT! :-)

psi-borg’s picture

most of us chose sql as opposed to sqli at the initial drupal installation. the *.install file has no case statements after case 'mysql'

//======================================

switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {ec_shipping_product} (
vid int(10) unsigned NOT NULL default '0',

.
.
.

//======================================

i was getting same error.

psi-borg [no green eggs and spam at] psi-b dot org
=======================================
psi-borg and drupal to elope in las vegas on server69

_dynamic’s picture

Is there an easy solution to this?
I have installed e-commerce and donations modules but when I try to use donations I get the same message as above. I can see, as psi-org says, there is no statement after 'mysql', but what shall we do about it? What code should be added after the mysql case? And can somebody explain a little clearer what to do with the code snippet above - the query-code. Exactly which phrases should be exchanged in shipping.install and do we have to manipulate something in the database tables also? Isn't this code supposed to do the creation and manipulation?
Thanks

giltprawn’s picture

Solved my problem as well, goggled the results ,and ended here. Thank You "Bow"