Comdev - PHP Scripts For Your Website
Fast Website Development with PHP Components

Back To List eCommerce > Installation Showing 2 Of 2 Prev

Integrating eCommerce 4.0 To Your Web Page

Modified on 2006-07-05

Step 1 : Create new PHP page

Create a web page where you would like to publish your online store. Save the web page file with .php extension, say, for example catalog.php.

* Note: You can put the file into web root directory or any directory on the server.

Step 2 : Find the Document Path

To ensure that your eCommerce works regardless of the location of your web page, you will need to add your server's Document Path to all the PHP include codes.

To find the Document Path, open the ' /oneadmin/config.php ' file with your text editor, and note this path down. Let's assume the Document Path is /home/sitename/public_html/oneadmin/.

Step 3 : Call the config.php file

Before calling any file, use one of the following codes to call the oneadmin/config.php file. The config.php file will loads all the class libraries and creates database connection.

I. Enabling Image Verification Feature

If you have enabled the image verification to your eCommerce system, insert this line to your web page file. To do this, open the catalog.php file with a text editor, and put it to the topmost line (line 1) of the catalog.php file, without any preceded character.

      include_once ("/home/sitename/public_html/oneadmin/config.php");
      include_once ("/home/sitename/public_html/oneadmin/common/session.php");

II. Disabled Image Verification Feature

If the image verification feature of your eCommerce is disabled, insert the following line to the topmost line (line 1) of the catalog.php file, without any preceded character.

<?php include_once ("/home/sitename/public_html/oneadmin/config.php"); ?>

Step 4 : Load menu, categories, login and content area

Insert the code below into the menu area where you want to display your shopping cart.

<?php include("/home/sitename/public_html/oneadmin/ecommerce/home.cart.php"); ?>

To display the product categories and featured products list, put the code below to the menu section.

<?php include("/home/sitename/public_html/oneadmin/ecommerce/home.category.php"); ?>

As for member login section, use the code below:

<?php include("/home/sitename/public_html/oneadmin/ecommerce/home.login.php"); ?>

Finally, insert this code into the body content to show your product catalog, view cart page, and checkout page.

<?php include("/home/sitename/public_html/oneadmin/ecommerce/home.ecommerce.php"); ?>

Save your web page file and upload it via FTP.

Step 5 : View integration result

Now, proceed to your web page URL, eg: to view your web store front-end integration result.

To preview your sample eCommerce in real time, click on the 'front-end' link on the top right menu from within the One Admin panel.

We recommend that you place your codes on a hidden web page to test before placing them on a public page.

If you need more references on code plug-in guidelines, you may open the /oneadmin/ecommerce/sampleecommerce.php with your text editor.

* Note:  Substitute the path in green to your Document Path (the complete path to your /oneadmin directory).

Printer Friendly Version
Tell A Friend

Related FAQs In This Category

Installing eCommerce 4.0

Integrating eCommerce 4.0 To Your Web Page