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





eCommerce PRO : Step 3: Front-end Integration



One of our product uniquenesses is that, we made our scripts capable to fit into your own design template.

Before   After Integration

Inside the One Admin panel : Preference : Integration Guides, we provide you with the complete integration codes, which you can copy and paste them directly into your web pages.

1. Create PHP Pages

In general, you will need to create 2 PHP pages, one page is for publishing your catalog, says store.php; while the other file is for displaying your store site map, e.g. sitemap.php.

Apart of this, eCommerce PRO allows you to separate the check out page from catalog, which means you could integrate check out to a different file, says checkout.php. This method facilitates you to apply SSL to the check out URL, if you wish to do so.

However, such check out integration is optional, if no separated check out to be done, your check out process will still be run on the store.php.

You can put these files in any directory on the server, usually these will be located on the root directory.

2. Find the Document Path

You have to add the root path of your One Admin directory (Document Path) to all the include codes.

To find the Document Path value, open the

/myadmin/config.php

file with a text editor, and note down the value for $path["docroot"]. Let's assume the Document Path is C:/wwwroot/user/myadmin/

3. Integrate Online Store / Catalog

  1. Open store.php with a text editor, insert the lines below to the

    topmost line (line 1)

    , without any preceded character.
    <?php if (!defined("HTML_Generator")) {
      include_once("C:/wwwroot/user/myadmin/config.php");
      include_once("C:/wwwroot/user/myadmin/common/session.php");
      include_once("C:/wwwroot/user/myadmin/common/css.php");
      } else { include("C:/wwwroot/user/myadmin/common/css.php"); }
      include("C:/wwwroot/user/myadmin/ecompro/css.php"); ?>
  2. Put the following code within the tag of store.php. This will shows meta info for your product and category.
    <?php include("C:/wwwroot/user/myadmin/ecompro/home.meta.php"); ?>
    Example:<head><?php include("C:/wwwroot/user/myadmin/ecompro/home.meta.php"); ?></head>

  3. On the menu area of store.php, add the line below to display the shopping cart, product categories, search product, and customer login area:
    a. To display shopping cart:-
    <?php include("C:/wwwroot/user/myadmin/ecompro/home.cart.php"); ?>
    b. To display the product categories, and featured products:-
    <?php include("C:/wwwroot/user/myadmin//home.category.php"); ?>
    c. To display customer login:-
    <?php include("C:/wwwroot/user/myadmin/ecompro/home.login.php"); ?>
  4. To show your product catalog, cart details, customer sign up form, use the line below.
    <?php include("C:/wwwroot/user/myadmin/ecompro/home.ecommerce.php"); ?>

4. Integrate Check Out

If you would like to separate the Check Out page to a different URL/file, repeat the step 1 to step 4 above by adding all inclusion codes into the checkout.php file. For reference, see `samplecheckout.php` in 'myadmin/ecompro/' folder.

5. Integrate Store Site Map

  1. On the sitemap.php file, insert the lines below to the

    topmost line (line 1)

    , without any preceded character.
    <?php if (!defined("HTML_Generator")) {
      include_once("C:/wwwroot/user/myadmin/config.php");
      include_once("C:/wwwroot/user/myadmin/common/session.php");
      include_once("C:/wwwroot/user/myadmin/common/css.php");
      } else { include("C:/wwwroot/user/myadmin/common/css.php"); }
      include("C:/wwwroot/user/myadmin/ecompro/css.php"); ?>
  2. Add the following code to the content area of sitemap.php.
    <?php include("C:/wwwroot/user/myadmin/ecompro/plugins/sitemap/home.storemap.php"); ?>

6. View Front End

Click on the 'Front End' link on the menu of the eCommerc PRO's back-end area to view your store front.


Proceed to Buy Now , Online Demo or Talk to Us