PDA

View Full Version : Understanding Images



thepuma
June 1st, 2003, 02:52 PM
When I add a product, do I HAVE to upload the image, or is there some way that I can specify the location of the image? I want to have my images in separate subfolders by manufacturer.

Also, is it possible to upload products to the database via text file or something?

Jamie
June 2nd, 2003, 09:59 AM
Hi,


When I add a product, do I HAVE to upload the image, or is there some way that I can specify the location of the image? I want to have my images in separate subfolders by manufacturer.

There is no way to manually specify the image using the cart. You could do this by modifying the image fields with phpMyAdmin, but it is not recommended or supported. We will be adding support for entering URLs and server paths to files, in addition to just uploading images.


Also, is it possible to upload products to the database via text file or something?

Yes, you can do this. You need to create an SQL file with the appropriate query lines to insert products into the Products table, and import it using phpMyAdmin.

This line will insert 1 product:

INSERT INTO Products VALUES (177, 'Bookshelf Speakers', '79.99', 0, 1, 'category default', '', 'If you\'re looking for a compact, affordable bookshelf speaker, this bookshelf speaker a great choice. The 3-way design includes an 8\'\' direct-coupled woofer for bass that\'s rich and powerful. The 3\'\' midrange and 1/2\'\' tweeter ensure your music and movies are clear and detailed.\r\n\r\n', '', 0, 50, '', 2, 'products/speaker2-t.jpg', '', 'products/speaker2.jpg', '', '15.00', '0.00', '0.00', '0.00', 0, 2, 5, 1, '0.50', 1, 0, 0, '', '2002-07-28 16:30:52');

The fields for the Products table are:

record_number int(11) NOT NULL auto_increment,
Name varchar(100) NOT NULL default '',
Base_Price decimal(10,2) NOT NULL default '0.00',
Not_For_Sale tinyint(4) NOT NULL default '0',
Show_Base_Price tinyint(4) NOT NULL default '1',
Tax_Item varchar(25) NOT NULL default '',
Keywords text NOT NULL,
Description text NOT NULL,
Brief_Description text NOT NULL,
Sort_Index int(11) NOT NULL default '0',
Category int(11) NOT NULL default '0',
Options text NOT NULL,
Option_Behavior tinyint(1) NOT NULL default '0',
Thumbnail_Image varchar(255) NOT NULL default '',
Featured_Image varchar(255) NOT NULL default '',
Image varchar(255) NOT NULL default '',
Large_Image varchar(255) NOT NULL default '',
Weight decimal(10,2) NOT NULL default '0.00',
Height decimal(10,2) NOT NULL default '0.00',
Width decimal(10,2) NOT NULL default '0.00',
Depth decimal(10,2) NOT NULL default '0.00',
Ship_Separately tinyint(1) NOT NULL default '0',
Ship_Using tinyint(1) NOT NULL default '0',
Ship_Service int(11) NOT NULL default '0',
Postage_Is tinyint(1) NOT NULL default '0',
Postage decimal(10,2) NOT NULL default '0.00',
Qlfy_Media_Mail tinyint(1) NOT NULL default '0',
Qlfy_BPM tinyint(1) NOT NULL default '0',
Number_in_Stock int(255) NOT NULL default '0',
Product_Code varchar(100) NOT NULL default '',
Date_Added_to_Cart datetime NOT NULL default '0000-00-00 00:00:00',

You will also need to add your products to categories. If you want to do this using phpMyAdmin as well, this post should help:
http://www.ldev.com/forums/showthread.php?s=&threadid=431&highlight=import

Thanks,
Jamie

Thanks,
Jamie