
-------------------------------------------
PgMarket: summary installation instructions
-------------------------------------------

PgMarket is developed using PostgreSQL 7.0.x but it supports
also PostgreSQL 6.5.
If you want to use MySQL (>= 3.22) instead of PostgreSQL,
please download the MySQL module.

Extract the tarball in the web shop directory tree;
probably you will need to rename the pgmarket-x.y.z directory
as simply "pgmarket" :)

Create the database and set it up through the included PostgreSQL dumps.
See the FAQ if you need some explanation on how to perform this step.
Please consider that pgmarket.start.dump has to be used to obtain
an empty market without any user apart the root, while
pgmarket.demo_data.dump is related to the demo site,
whose images are provided in a distinct tarball (products-1.2.tar.gz).
The default root password is "password" (change it immediately !!!
you can change it simply logging in the shop as "root" and following
the "Change password" link).
in pgmarket.demo_data.dump a user is provided: pratesi (me :), with password
"marco71" (yes, I'm still young... but that's not my real password ;)))

Choose the application-??.inc.php best suited to your needs,
rename it as application.inc.php, and customize it
(I hope it is sufficiently self-explanatory :)
In particular, you will very likely have to edit
the database name, username, and password (even though the default settings
should be OK for the default PostgreSQL configuration),
the installation path and url, the e-mail address of the "Technical support",
the name and the e-mail address of the seller.
You will also very likely want to customize the settings of
$SESSION["brand_used"], $SESSION["iva_used"], and so on.
For such variables, "0" = no, "1" = yes; by settings them,
you decide if you want to use frames, the layers menu,
brands, IVA (a Value Added Tax), weight, delivery price, and so on.
Moreover, you should set $SESSION["max_file_size_import"]
and $SESSION["max_file_size_images"] to values that are reasonable
in your case; hint: simply set $SESSION["max_file_size_import"] to 0
if you want to disable the import feature... :)
Moreover, here and there you may want to change other settings...

The "products" directory is used to upload product images,
and to store corresponding thumbs, hence it must be writable
for the web server process UID.
To be (almost :) sure that this is working even if you make
simply a "fast" installation only to see PgMarket in action,
in the released tarball I have set permissions
to 777 (drwxrwxrwx) for the "products" directory;
please note that this is very likely not necessary
and not good for security in a working installation.
Hence, I strongly suggest you to set the "products" directory
permissions to the minimum needed to make images upload work,
according to your server settings and security policies.

Thumbnails are created through a system call to UNIX;
you must have the programs giftopnm, djpeg, pngtopnm, pnmscale, cjpeg.
By default, I suppose they are in /usr/bin ; edit the value of
$CFG->pnmpath in application.inc.php if this is not your path.
Look into REQUIREMENTS and FAQ for some more explanation.

Read SECURITY for some useful hints.

Remove directories DOCS, DUMPS, IMPORTS, and files COPYING, LICENSE, README...
... all UPPER CASE files and directories :)
Furthermore, remove unused application-??.inc.php files.

Fill your web shop after logging in as "root".
Add categories and subcategories to organize your products.
Remember: a product can belong to more than one category;
products are shown ordered by special_level ; products with
special_flag = 1 are shown in the home page,
in the Special Products section.
Starting from version 1.2.0, categories, products, and so on,
can be added (and edited) also importing text files - easily obtainable
through a spreadsheet - and compressed archives of images;
look into the IMPORT directory to see examples related to the demo;
I hope that the examples are sufficiently self-explanatory.
W.r.t. the import feature, keep in mind that
in the "users" table, the "usertype" field is "pf" for persons
(Persona Fisica in Italian) and "az" for Enterprises (AZienda in Italian).

Customize cart.inc.php to set the right dependence of the delivery price
from the shopping cart weight.

Customize the global.inc.php and template (.ihtml) files to your needs.

Send me an e-mail... I am happy to know that you are using PgMarket
(can you link the PgMarket's home page ?  I would appreciate it very much.)

--
Marco Pratesi
http://www.telug.it
pratesi@telug.it

