Jump to content
Sign in to follow this  
eXcaliburN

Create Page Management Module

Recommended Posts

Hey

 

Fairly new to osCommerce but I have enjoyed playing with it.

 

I've found a way to display what I want on the front end, but my main issue is making it integrate in the back end! I have no idea how to make something just slip into the standard admin layout.

 

If I could get some kind of abstracted overview of how it works, and what I need to do I'll figure out how to make it, and as thanks I will make it a nice contribution to the community! With comments and documentation and anything else needed to make it nice.

 

Basically;

Using osCommerce 2.3.1 - need to learn the principles of making a module integrate into the admin area so it may utilize the standard scheme for administration! - Will polish final product for community access!


// No comment

# No comment

<!-- No comment -->

/* No comment */

Share this post


Link to post
Share on other sites

Xavier,

 

You could use Information Pages Unlimited as a template for a v2.3.1 contribution. Another member tried to take it and make it CKeditor for 2.3.1, but I think FCKeditor is much better.

 

 

 

Chris


:|: Was this post helpful ? Click the LIKE THIS button :|:

 

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

Share this post


Link to post
Share on other sites

The package you provided me a link for was for osCommerce 2.2 - I am using 2.3.1

 

I was hoping to create something to suit my purposes instead of migrating someone else's code.

 

Is there an overview of how the 2.3.1 administrators area works? and how to implement functionality to fit those standards?

 

Cheers


// No comment

# No comment

<!-- No comment -->

/* No comment */

Share this post


Link to post
Share on other sites

I have tried Information Pages Unlimited for 2.3.1 and the things i didnt get to work was the menu's in catalog and admin. hope there will be a 2.3.1 release on that addon soon :(

Share this post


Link to post
Share on other sites

Are you trying to write modules for 2.3.1? The module system is not hard to figure out. I suggest taking one of the existing modules and using it as a template. Or take one of my addon modules -- I've written over 30 of the things. If you have specific questions, just ask.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Ive tried but well i just gave up and hope someone will make a version for 2.3.1 :)

 

information box looks like this on dynamic information pages

<?php
/*
 $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

?>
<!-- information_pages //-->
         <tr>
           <td>
<?php

//BEGIN Added Lines: Dynamic Information pages
   $information_pages_query = tep_db_query("select p.pages_id, pd.pages_name from " . TABLE_PAGES . " p, " . TABLE_PAGES_DESCRIPTION . " pd where p.pages_status = '1' and p.pages_id = pd.pages_id and pd.language_id = '" . $languages_id . "' order by p.sort_order, pd.pages_name");
   $info_box_contents = array();
   $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

   new infoBoxHeading($info_box_contents, false, false);

//To use numbered listing like in the bestsellers box: Replace || . tep_image(DIR_WS_IMAGES . 'tri.gif') . || with || . tep_row_number_format($rows) .

   $rows = 0;
   while ($information_pages = tep_db_fetch_array($information_pages_query)) {
     $rows++;
     $information_list .= '<a href="' . tep_href_link(FILENAME_PAGE_INFO, 'pages_id=' . $information_pages['pages_id'] . '&pages_name=' . $information_pages['pages_name']) . '">' . $information_pages['pages_name'] . '</a><br>';
   }

//END Added Lines: Dynamic Information pages

   $info_box_contents = array();

 $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
                                        '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
                                        '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
                                        '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .
                                        '<a href="' . tep_href_link(FILENAME_IMPRESSUM) . '">' . BOX_INFORMATION_IMPRESSUM . '</a>'
//BEGIN Added Lines: Dynamic Information pages
                          . '<br>' . $information_list
                                        );
//END Added Lines: Dynamic Information pages

   new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- information_pages_eof //-->

Share this post


Link to post
Share on other sites

Yeah, The things I'm mainly looking with for assistance is in keeping a consistent user interface in the backend.

 

I think it would be awful to create something that fell on itself for looking entirely out of place.

 

Main things I'd like to know:

-How do I add the string to the module box menu to open my interface?

-Are there any rules or guidelines that should be acknowledged in the layout of the interface page I create?

-Is there a specific method of accessing the layout of standard osCommerce admin modules? (The centre list, and info/option box on the right)

-Is there a special function recommended for accessing the database? (instead of writing custom mysql_query($strings))

 

Once I've got it working on my site, I'll strip back anything specific, comment it a bit and give it to the community for free use and feedback.


// No comment

# No comment

<!-- No comment -->

/* No comment */

Share this post


Link to post
Share on other sites

1. Copy one of the existing arrays and change the constants. The arrays look like this:

     array(
       'code' => FILENAME_STATS_PRODUCTS_PURCHASED,
       'title' => BOX_REPORTS_PRODUCTS_PURCHASED,
       'link' => tep_href_link(FILENAME_STATS_PRODUCTS_PURCHASED)
     ),

2. No rules, but following the layout of an existing page is usually a good idea.

 

3. There are standard functions that you can use. Most of the useful ones are in admin/includes/functions/html_output.php and admin/includes/functions/general.php.

 

4. See admin/includes/functions/database.php for the standard functions. As far as the SQL goes, just write code that will work under MySQL 4 and higher.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×