Skip to content

E-Commerce Application with Delphi for PHP and InterBase

Delphi for PHP includes a lot of examples; one of these examples is an E-commerce application. This application uses MySQL and uses proprietary commands.

I ported this application to work with InterBase and other databases.

With this example you will see:
- New components
- Smarty Templates
- URL parameters
- Database Access
- Cookies
- Others

After you download the example read the Readme file.

You will need to update only the parameters on configure.php for database setup

One of these parameters is named $SQLNextOrderID. This parameter is a SQL to define how to get the next ID on table Order.

I could use Select MAX, in my opinion not the best solution, then for InterBase I’m using Select Gen_ID(gen_orders_id,1) as NEXTID from RDB$DATABASE, which means this is the unique point where you will see a specific SQL command.

Of course the database metadata is included and you will need to change these triggers, the triggers here were used only as AutoIncrement field.

Download -> http://cc.codegear.com/item/24557

Have fun!!

Versão em Português clique aqui
Versión en Español clic aca

{ 16 } Comments

  1. Pawel Glowacki | April 23, 2007 at 5:00 am | Permalink

    Hi Andreano,

    It looks like the download link is malformed. The closing anchor tag is after and not before "Have".

    I’m just downloading your example.

    P.

  2. Andreano Lanusse | April 23, 2007 at 10:11 am | Permalink

    Hi Pawel,

    thanks, now the link is ok.

  3. Ricardo Mendes | April 25, 2007 at 5:59 am | Permalink

    Andreano,

    Sobre a primary key, eu atualizei a VCL,tenho uma tabela que a PK dela é o CPF, na hora que faço o insert não esta aceitando o valor da PK, tem alguma sugestão sobre isso.

    Desde já te agradeço.

    Ricardo Mendes

    http://ricardobmendes.blogspot.com/

  4. Elizeu | April 26, 2007 at 7:59 am | Permalink

    Quando tenho abrir o projeto aparece a seguinte mensagem: "error generating component"

    e em baixo diz q nao conseguiu abrir um monte de arquivos..

    Alguma sugestao ?

    Grato.

  5. Terry Carnes | April 26, 2007 at 9:35 am | Permalink

    Thank you for providing this demo.

    There seem to be some problems in the Admin.php and related pages. The included db has the Admins table to have a column named "Pass". The code included in the demo all refer to "Password".

  6. Andreano Lanusse | April 26, 2007 at 11:51 am | Permalink

    Hi Terry,

    this was fixed and the source code was reposted in CC, please download again

  7. Andreano Lanusse | April 26, 2007 at 11:52 am | Permalink

    Elizeu,

    você tem que instalar os componentes antes, de uma lida no README.TXT

  8. sd | June 5, 2007 at 6:52 am | Permalink

    asf

  9. swww | June 5, 2007 at 6:53 am | Permalink

    wedfdcfff

  10. Gilberto Müller | June 29, 2007 at 9:00 pm | Permalink

    Hi All,

    When I running sample application, occurs the following error:

    Application raised an exception class EDatabaseError with message ‘Cannot connect to database server’

    Callstack #0 File: C:\InterBaseECommerceExample\index.php Line: 9

    |_Callstack #1 File: C:\InterBaseECommerceExample\DbModule.php Line: 38

    ….

    PS: In Data Explorer tab, its open normally..

  11. velislav | July 1, 2007 at 9:39 am | Permalink

    I’m trying to download the zip for a week but

    llink http://cc.codegear.com/item/24557

    does not work

    I think in CodeGear people bite their asses about introducing this product : no support, no examples …

  12. g lampro | July 9, 2007 at 3:49 am | Permalink

    thanks

  13. André Prado | August 3, 2007 at 11:00 am | Permalink

    Olá, eu gostaria de saber onde posso me cadastrar naquele site para fazer o download do E-Commerce Application with Delphi for PHP and InterBase.

    Alguém pode me indicar um usuário/senha?

    Obrigado

  14. Andreano Lanusse | August 3, 2007 at 11:03 am | Permalink

    Pode se cadastrar através do link: https://members.codegear.com/

  15. hduquec | November 15, 2007 at 5:32 am | Permalink

    Working arround this example for several days (I’m novice in PHP) I gave up after this error:

    Fatal error: Smarty error: the $compile_dir ‘/tmp’ does not exist, or is not a directory. in C:\Archivos de programa\CodeGear\Delphi for PHP\1.0\vcl\smarty\libs\Smarty.class.php on line 1095

    Any help will be appreciated

    Nando

  16. Andreano Lanusse | December 5, 2007 at 1:42 pm | Permalink

    Hi Nando,

    this is because Smarty Template, create a directory tmp in your drive C

    Best,
    Andreano

{ 1 } Trackback

  1. […] After you download the example read the Readme file and my first post about this demo. […]

Post a Comment

Your email is never published nor shared. Required fields are marked *
Close