E-Commerce Application with Delphi for PHP and InterBase

Posted by on in Blogs
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


Comments

  • Guest
    Pawel Glowacki Sunday, 22 April 2007

    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.

  • Guest
    Andreano Lanusse Monday, 23 April 2007

    Hi Pawel,



    thanks, now the link is ok.

  • Guest
    Ricardo Mendes Tuesday, 24 April 2007

    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/">http://ricardobmendes.blogspot.com/

  • Guest
    Elizeu Thursday, 26 April 2007

    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.

  • Guest
    Terry Carnes Thursday, 26 April 2007

    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".

  • Guest
    Andreano Lanusse Thursday, 26 April 2007

    Hi Terry,



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

  • Guest
    Andreano Lanusse Thursday, 26 April 2007

    Elizeu,



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

  • Guest
    sd Monday, 4 June 2007

    asf

  • Guest
    swww Monday, 4 June 2007

    wedfdcfff

  • Guest
    Gilberto Müller Friday, 29 June 2007

    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..

  • Guest
    velislav Sunday, 1 July 2007

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

    llink http://cc.codegear.com/item/24557">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 ...

  • Guest
    g lampro Sunday, 8 July 2007

    thanks

  • Guest
    André Prado Friday, 3 August 2007

    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

  • Guest
    Andreano Lanusse Friday, 3 August 2007

  • Guest
    hduquec Wednesday, 14 November 2007

    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

  • Guest
    Andreano Lanusse Wednesday, 5 December 2007

    Hi Nando,

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

    Best,
    Andreano

  • Guest
    bobbert Sunday, 9 December 2007

    Hello,

    I am new to VCL for PHP. I need to link the ecommerce example of Author: Andreano Lanusse to a erp/logistic database. To start with i did create a leftmenu with productcatagory navigation. And i use the include derective placed in index.php. The problem is that it takes to long to renew the whole index.php including the left navigation menu. I proberbly should use an other technique then include. Is it possible to use 2 frames, 1 for left menu with a php content and one for maincontent and let apache /php parse both frames ?
    http://blogs.codegear.com/andreanola...07/04/22/34116
    I use the latest Delphi IDE from codegear and the latest vcl. And Delphi IDE is a bought/registered version. The goal is to port some Delphi 2006 IDE programs to webapplications. Any advise what the cause is of the delay when a new link is clicked ?

  • Please login first in order for you to submit comments
  • Page :
  • 1

Check out more tips and tricks in this development video: