Re: Shopping cart - Mailing list pgsql-general

From Jonathan Bond-Caron
Subject Re: Shopping cart
Date
Msg-id 000001c9345c$6dfb9690$49f2c3b0$@com
Whole thread Raw
In response to Re: Shopping cart  ("Andrus" <kobruleht2@hot.ee>)
Responses Re: Shopping cart  ("Andrus" <kobruleht2@hot.ee>)
Re: Shopping cart  (Aarni <aarni@kymi.com>)
List pgsql-general
On Wed Oct 22 10:16 AM, Andrus wrote:
> Jonathan,
>
> Thank you.
>
>> For PHP, your best option is http://www.magentocommerce.com/ --
>> http://svn.magentocommerce.com/source/branches/1.1
>
> Magento is only for MySql.

Wow that's too bad/sad for the mySQL only. At least they are using innoDB.

> My shopping cart must get products and add orders to existing
> PostgreSQL database.
> So I must re-write some parts of any shopping cart.
>
> Only shopping cart which has PostgreSql support seems to be Drupal
> module Ubercart  (http://www.ubercart.org/) pointed by Ivan.
> Amout of work adding existing PostgrSql database support to MySql or
> PostgreSql cart PHP code is probably not much different.
> However all other solutions require hosting separate MySql database
> which probably increases support cost a lot.
>
> So is'nt it best to use Drupal+Ubercart ?

I'm not sure / have not used either. Magento seems to use Zend_Db as the
database abstraction so it seems like a matter of porting the schema.

Ubercart does look simpler, go whatever you find more interesting or faster
to do.

If there's no time constraints, I'd do as someone mentioned and build it
yourself. Open source or even commercial e-commerce solutions tend to get
very complicated in trying to be 'flexible'.

i.e.
CREATE TABLE shopping_carts
(
  carts_id serial NOT NULL,
  carts_date_created timestamp without time zone NOT NULL,
  carts_date_updated timestamp without time zone NOT NULL,
  carts_subtotal numeric(9,4) NOT NULL,
  carts_total numeric(9,4) NOT NULL,
  carts_tax1 numeric(9,4),
  carts_tax2 numeric(9,4),
  CONSTRAINT shopping_carts_pkey PRIMARY KEY (carts_id)
)
WITHOUT OIDS;

CREATE TABLE shopping_carts_products
(
  products_id serial NOT NULL,
  products_code character varying(64) NOT NULL,
  products_name character varying(100) NOT NULL,
  products_description character varying(1024),
  products_date_added timestamp without time zone NOT NULL,
  products_date_modified timestamp without time zone NOT NULL,
  products_taxable boolean NOT NULL DEFAULT true,
  products_qty double precision NOT NULL,
  products_price numeric(9,5) NOT NULL,
  shopping_carts_id integer NOT NULL,
  shopping_carts_pos smallint NOT NULL,
  CONSTRAINT shopping_carts_products_pkey PRIMARY KEY (products_id),
  CONSTRAINT shopping_carts_products_shopping_carts_id_fkey FOREIGN KEY
(shopping_carts_id)
      REFERENCES shopping_carts (carts_id) MATCH SIMPLE
      ON UPDATE CASCADE ON DELETE CASCADE,
  CONSTRAINT shopping_carts_products_products_code_key UNIQUE
(products_code)
)
WITHOUT OIDS;

CREATE TABLE products
(
  products_id serial NOT NULL,
  products_code character varying(64) NOT NULL,
  products_name character varying(100) NOT NULL,
  products_description character varying(1024),
  products_status int,
...
)
WITHOUT OIDS;

Displaying products and adding to a shopping cart is not much work, but the
product *management* and analytics / reporting will eat your time.

Best of luck!


pgsql-general by date:

Previous
From: Ivan Sergio Borgonovo
Date:
Subject: Re: Shopping cart
Next
From: "Jonah H. Harris"
Date:
Subject: Re: syncing with a MySQL DB