Web Authoring
  Home arrow Web Authoring arrow Page 5 - Personalizing osCommerce
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WEB AUTHORING

Personalizing osCommerce
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 33
    2004-12-06

    Table of Contents:
  • Personalizing osCommerce
  • What to know before you make changes
  • Logo and colors
  • Site content
  • InfoBoxes, step one
  • InfoBoxes, steps two and three

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Personalizing osCommerce - InfoBoxes, step one


    (Page 5 of 6 )

    The infoBoxes are a versatile and dynamic feature of the catalog.  Different pages or actions will cause different boxes to be displayed, and one of the things you may want to do is create your own infoBox. This is a three-part process. It starts with the file that actually creates the infoBox. For this example, I’ll show you how to make a box called links.php, containing links taken from other areas of the site.

    You may be used to using notepad to create HTML and script files. For working in PHP, you may find that one of the many specialist code editors that are available will help make your life easier. I like to use the excellent Xint text editor: it’s free, it has line numbers (useful for debugging) and it features color coding (which helps you sort your HTML from your PHP and your If statements from your XML).  It has a whole bunch of other features too, but these are the main benefits.

    Whichever text editor you use, open it now and add the PHP declaration and an ID and date comment:

    <?php
    /*
      $Id: links.php,v 1.01 2004/06/28 01:13:58 hpdl Exp $
     
      osCommerce, Open Source E-Commerce Solutions
     
    http://www.oscommerce.com

      Released under the GNU General Public License
    */
    ?>

    To keep with the consistency of the pre-defined boxes, the above statement should be kept intact, and comments used to mark the beginning and end of the box:

    <!-- links //-->

    In order to give the box an appropriately colored heading bar, you’ll need to embed your box in a table and include the following array:

    <tr>
                <td>
    <?php
      $link_box_contents = array();
      $link_box_contents[ ] = array('text' => BOX_HEADING_LINKS);

    The box heading is defined in another file, which is explained in full in step two. For the actual links, add the following code:

    $link_box_contents = array();
    $link_box_contents[ ]= array('text' =>
    '<a href=" ' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' .
           BOX_LINKS_CREATE_ACCOUNT . '</a><br>' .
    '<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">' .
           BOX_LINKS_LOGIN . '</a><br>' .
    '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">'.
           BOX_LINKS_MY_ACCOUNT . '</a><br>' .
    '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' .
           BOX_LINKS_CART_CONTENTS . '</a><br>' .
    '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' .
            BOX_LINKS_CHECKOUT . '</a>');
    new linkBox($link_box_contents);}
    ?>

    The names of your links can be changed of course, but essentially, once you have finished the code:

    </td>
              </tr>
    <!-- links_eof //-->

    then saved the file as links.php, step one is pretty much complete. Upload the file in the normal way to the includes folder.

    More Web Authoring Articles
    More By Dan Wellman


       · the up and coming program is Zen Cart a fork of the osC project that is leaps and...
       · As always when making changes to any software - particularly e-commerce software get...
       · Thanks for the sound advice, whilst not discussed in this article, security is...
       · Zen Cart owes its very existence to osCommerce and like any child it will eventually...
       · An excellent point of veiw and one that I share myself.
       · Yes, osCommerce is a fairly good app to build an online shop ...But when it's...
       · Thank-you sooooooooo much for the info. This was more than enough to get me started....
     

    WEB AUTHORING ARTICLES

    - Yahoo Pipes: Worth a Look
    - Completing an EAR
    - Building and Deploying an EAR
    - New Nuke Security Sentinel: Worth Taking a C...
    - Administering Your CMS-Based Web Site
    - What You Need to Know Before Using a CMS
    - Introducing the Google Maps API
    - An Overview of the Yahoo User Interface Libr...
    - Basic configuration of osCommerce, concluded
    - Basic configuration of osCommerce, continued
    - Basic configuration of osCommerce
    - Deploying your Site with PHPEclipse, continu...
    - Deploying your Site with phpEclipse
    - Macromedia Captivate Review
    - Macromedia and Adobe Planning to Tie the Knot







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek