Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Supplier Admin Area Contribution


Guest

Recommended Posts

Checking again, its like yor problem with application_top , but its NOT the same problem

because i can acces to my admin and add suppliers, with images.

 

The problem is when try to login in the supplier limk:

http://www.robbierendo.com.ar/shop/catalog/supplier/supplier_area.php

 

I guess the problem is with the configure.. but i cannot find the way to solve.

The error is the same:

 

Warning: require(/home/wi930872/public_html/shop/catalog/admin/includes/functions/compatibility.php) [function.require]: failed to open stream: No such file or directory in \\hmfsw\web\dtcwin093\robbierendo.com.ar\public_html\shop\catalog\supplier\includes\application_top.php on line 34

 

Fatal error: require() [function.require]: Failed opening required '/home/wi930872/public_html/shop/catalog/admin/includes/functions/compatibility.php' (include_path='.;E:\php5\ext;E:\php5\PEAR;E:\php5\PhpCommon') in \\hmfsw\web\dtcwin093\robbierendo.com.ar\public_html\shop\catalog\supplier\includes\application_top.php on line 34

 

This is my shop/catalog/supplier/includes/configure.php

 

<?php

/*

$Id: configure.php,v 1.14 2003/02/21 16:55:24 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

// define our webserver variables

// FS = Filesystem (physical)

// WS = Webserver (virtual)

define('HTTP_SERVER', 'http://www.robbierendo.com.ar'); // eg, http://localhost or - https://localhost should not be NULL for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.robbierendo.com.ar/');

define('HTTPS_CATALOG_SERVER', '');

define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', '/home/wi930872/public_html/shop/catalog/'); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

define('DIR_WS_S_ADMIN', 'supplier/');

define('DIR_WS_ADMIN', 'admin/');

define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);

define('DIR_FS_S_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_S_ADMIN);

// define our Catalog path / or /catalog/

define('DIR_WS_CATALOG', '/shop/catalog/');

define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

define('DIR_WS_IMAGES', DIR_WS_ADMIN . '/images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . '/images/');

define('DIR_WS_INCLUDES', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN . 'includes/');

define('DIR_WS_SUPPLIER_INCLUDES', DIR_FS_DOCUMENT_ROOT . DIR_WS_S_ADMIN . '/supplier/includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

 

// define our database connection

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', 'ESTO ESTA BIEN');

define('DB_SERVER_PASSWORD', 'ESTO ESTA BIEN');

define('DB_DATABASE', 'ESTO ESTA BIEN');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

?>

 

I need some help, please, this is my third day around these... thanks!

 

Daniela

Edited by DanielaQ
Link to comment
Share on other sites

I would be really interested in using this mod. But I just don't have time to debug unfinished code. I would appreciate it if you would let us know when this is really, finally ready to be used in a live site. We are in the process of setting up our first on-line store front and just don't have the time to invest in a mod that's not ready for "prime time". It's everything we can do just to get the store configured and loaded with inventory. I'd hate to start introducing errors from a mod that is just not ready.

 

This mod seems it might be a good fit for store owners who use dropshippers, which is what we are doing. There are no "suppliers" as you are applying it, but we need a way to define where a product comes from and what the upcharges are for each dropshipper. I will follow the progress with interest.

 

I picked up this module as I needed. I can say that the idea is good, but amour of bugs I have corrected is very ridiculous.

Edited by web-project

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Link to comment
Share on other sites

Checking again, its like yor problem with application_top , but its NOT the same problem

because i can acces to my admin and add suppliers, with images.

 

The problem is when try to login in the supplier limk:

http://www.robbieren...pplier_area.php

 

I guess the problem is with the configure.. but i cannot find the way to solve.

The error is the same:

 

Warning: require(/home/wi930872/public_html/shop/catalog/admin/includes/functions/compatibility.php) [function.require]: failed to open stream: No such file or directory in \\hmfsw\web\dtcwin093\robbierendo.com.ar\public_html\shop\catalog\supplier\includes\application_top.php on line 34

 

Fatal error: require() [function.require]: Failed opening required '/home/wi930872/public_html/shop/catalog/admin/includes/functions/compatibility.php' (include_path='.;E:\php5\ext;E:\php5\PEAR;E:\php5\PhpCommon') in \\hmfsw\web\dtcwin093\robbierendo.com.ar\public_html\shop\catalog\supplier\includes\application_top.php on line 34

 

This is my shop/catalog/supplier/includes/configure.php

 

<?php

/*

$Id: configure.php,v 1.14 2003/02/21 16:55:24 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

// define our webserver variables

// FS = Filesystem (physical)

// WS = Webserver (virtual)

define('HTTP_SERVER', 'http://www.robbierendo.com.ar'); // eg, http://localhost or - https://localhost should not be NULL for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.robbierendo.com.ar/');

define('HTTPS_CATALOG_SERVER', '');

define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', '/home/wi930872/public_html/shop/catalog/'); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

define('DIR_WS_S_ADMIN', 'supplier/');

define('DIR_WS_ADMIN', 'admin/');

define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);

define('DIR_FS_S_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_S_ADMIN);

// define our Catalog path / or /catalog/

define('DIR_WS_CATALOG', '/shop/catalog/');

define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

define('DIR_WS_IMAGES', DIR_WS_ADMIN . '/images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . '/images/');

define('DIR_WS_INCLUDES', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN . 'includes/');

define('DIR_WS_SUPPLIER_INCLUDES', DIR_FS_DOCUMENT_ROOT . DIR_WS_S_ADMIN . '/supplier/includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

 

// define our database connection

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', 'ESTO ESTA BIEN');

define('DB_SERVER_PASSWORD', 'ESTO ESTA BIEN');

define('DB_DATABASE', 'ESTO ESTA BIEN');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

?>

 

I need some help, please, this is my third day around these... thanks!

 

Daniela

 

As I can see the issue is in paths. with this module don't forget to update the supplier configure.php file.

 

P.S. Personally I have provided the help to one to one basis, as I know that this module is not perfect, specially confusing paths, as some people are still using older version of oscommerce.

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Link to comment
Share on other sites

As I can see the issue is in paths. with this module don't forget to update the supplier configure.php file.

 

P.S. Personally I have provided the help to one to one basis, as I know that this module is not perfect, specially confusing paths, as some people are still using older version of oscommerce.

 

Hi Web-project!

 

I'm using the osCommerce 2.2-MS2, with PHP 5.1.2 and i updated the supplier/configure..

I know the problem is in some path... i try a lot of options, using like example the configure.php of my shop,

but i can´t find the way it works. so that's why i copy my /supplier/configure.

 

Thanks

Link to comment
Share on other sites

I found the path error, i didnt noticed than my hosting server change the "paths" if are on unix or windows servers.

 

Now i can acces to the supplier area, and login; but also have other problems:

 

To start when i acces to my admin, all is working except whn try to acces to the categories.php:

 

Parse error: syntax error, unexpected ';', expecting ')' in \\hmfsw\web\dtcwin093\robbierendo.com.ar\public_html\shop\catalog\admin\categories.php on line 373

 

if ($action == 'new_product') {

$parameters = array('products_name' => '',

'products_description' => '',

'products_url' => '',

'products_id' => '',

'products_quantity' => '',

'products_model' => '',

'products_image' => '',

'products_price' => '',

'products_weight' => '',

'products_date_added' => '',

'products_last_modified' => '',

'products_date_available' => '',

'products_status' => '',

'products_tax_class_id' => '',

'manufacturers_id' => ''; This is the 373 line

$pInfo = new objectInfo($parameters);

 

 

The others problems is when i access to supplier/supplier_area.php the image supposed to show

(supplier.gif) didnt show, and when i see the image properties, the document is looking for

admin//admin/images/categories/supplier.gif

 

The other links (Categories/Products , Order History , Suppliers Statistic , Products Most Viewed)

disnt work, goes to dead pages, but i'm sure its a related problem with the acces to categories.php

 

That's all.. i'm hearing suggestions!!

 

Daniela

Link to comment
Share on other sites

Now i can acces to the supplier area, and login; but also have other problem:

when i access to supplier/supplier_area.php the image supposed to show

(supplier.gif) didnt show, and when i see the image properties, the document is looking for

http://www.robbierendo.com.ar/shop/catalog/supplier/admin/images/categories/supplier.gif

 

The other links (Categories/Products , Order History , Suppliers Statistic , Products Most Viewed)

disnt work, goes to dead pages,

 

That's all.. i'm hearing suggestions!!

 

Daniela

Link to comment
Share on other sites

I solved the bad url in the links Categories/Products , Order History , Suppliers Statistic , Products Most Viewed)

also have problems with paths; i have to put the complete path in the filenames.php

Still have a problem in the Static, but im sure can fix it.

 

But cannot find the solution with images:

In the supplier_area.php the image supposed to show (supplier.gif) didnt show,

and when i see the image properties, the document is looking for

http://www.robbierendo.com.ar/admin//images/categories/supplier.gif

obviusly it thasnt exist; but i cannot finf where "glues" admin/

 

Of course, when your logged as supplier, cannot see the images..

/admin comes again!.

 

 

That's all.. i'm hearing suggestions!!

 

Saludos, Daniela

Link to comment
Share on other sites

Parse error: syntax error, unexpected ';', expecting ')' in \\hmfsw\web\dtcwin093\robbierendo.com.ar\public_html\shop\catalog\admin\categories.php on line 373

 

if ($action == 'new_product') {

$parameters = array('products_name' => '',

'products_description' => '',

'products_url' => '',

'products_id' => '',

'products_quantity' => '',

'products_model' => '',

'products_image' => '',

'products_price' => '',

'products_weight' => '',

'products_date_added' => '',

'products_last_modified' => '',

'products_date_available' => '',

'products_status' => '',

'products_tax_class_id' => '',

'manufacturers_id' => ''; This is the 373 line

$pInfo = new objectInfo($parameters);

 

haven't seen any issues, any other modules has been installed? probably missed one of installation steps?

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Link to comment
Share on other sites

Hi!

 

No, i'm installing it in a basic store, have anything except this contribution.

 

I solved the mayor problems; but still have one with the images paths, and i canntot find

the answer:

 

In the supplier_area.php the image supposed to show (supplier.gif) didnt show,

and when i see the image properties, the document is looking for

http://www.robbierendo.com.ar/admin/images/categories/supplier.gif

obviusly it thasnt exist; but i cannot finf where "glues" admin/

 

Of course, when your logged as supplier, cannot see the images..

the only images show is from categories, but in the others /admin comes again!.

 

If you want to see, can login with user: prueba pass: prueba

 

http://www.robbierendo.com.ar/shop/catalog/supplier/supplier_area.php

 

 

That's all.. i'm hearing suggestions!! I want it works!

 

Saludos, Daniela

 

(sorry for my english)

Edited by DanielaQ
Link to comment
Share on other sites

Pleaseee! I need to resolve this last problem, because the module IS WORKING,

but continues with the problem of the images suppose to show on supplier area.

 

When you logging the first thing:

problema-login.jpg

the supplier.gif dont show and if i check the images properties is looking for

domain/images/categories/supplier.gif; supposed to look for domain/shop/catalog/images/categories/supplier.gif

 

If i go to Categories/Products, the category image is screen correctly

(domain/shop/catalog/images/category_software.gif) but not again in the

categories products: is looking for domain/images/icons/folder.gif supposed to look for

domain/shop/catalog/admin/images/icons/folder.gif

problema-categories.jpg

 

So its for shure i have some problems in the paths; i try in the configure.php

but all the changes i made ends with a warninh of some line in application_top, like in the beggining;

and t the same time the "defines" of images confusing me when is refering to the supplier module,

like:

 

define('DIR_WS_IMAGES', DIR_WS_ADMIN . '../images/');

or

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . '../images/');

or

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

 

Any suggestions please?? I need to move on with this job, i dont want to install any other contribution

till these is really working.

 

Thanks

Link to comment
Share on other sites

  • 3 weeks later...

Hi all , I just install v1.3.

Everythings in admin site and catalog site still work well but when going to /supplier site, it go to blank page. I had double checked step by step of install introduction.

Add supliers in admin site work well and very easy. Add testing product by admin (not supliers) work well - there are new option to chose "Suplier" and now can chose the suplier for that product . I said many things above to show that after install this great contribution , my site still work well.

So, please help my why going to /supplier/supplier_area.php it return blank site. There is not any error text. There is no erea to login. There is nothing !

 

My site have :

Admin site login (dont remember the exactly name, but i can fix it to show Suppliers Admin to add new suppliers)

Pagecache (but turn off, and the function cache Configuration still work. But i check in application_top in supplier folder, there is not that function)

Paint for VietNamese :

Link to comment
Share on other sites

I found that it has an issuse with Access with Level Account 2.2a !

In admin site there two box to enable : supplierarea and suppliersadmin

I can enable suppliersadmin because it point to catalog/admin/suppliersadmin.php . Access with Level Account 2.2a can handle files in /admin.

But supplierarea cant's enable because it piont to file out of /admin - catalog/supplier. So Access with Level Account 2.2a can't enable these files for users to execute.

 

Really /supplier still work like admin site so Access with Level Account 2.2a prevent anyone that don't login by Access with Level Account 2.2a's account (which have permisson on these file) to execute.

 

Please, are there any solution for this great contribution ?!

Paint for VietNamese :

Link to comment
Share on other sites

  • 3 months later...
  • 2 months later...

I have this add on working perfectly. I just wondered if anyone knew how to make it so you could select the Manufacturer's names like you can in the main admin panel, so that is carries that information through as well.

 

Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

this has got to be one of the worst written plugins i have tried to use. almost every file path it spits out is incorrect if the cart files are not on the root of the server. what is the best way to set up the configuration file if the cart is in a sub directory of the site? for instance... www.yoursite.com/cart/

 

define('HTTP_SERVER', 'http://www.yoursite.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.yoursite.com/');

define('HTTPS_CATALOG_SERVER', 'http://www.yoursite.com/');

define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', '/usr/local/apache/htdocs/cart/'); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

define('DIR_WS_S_ADMIN', '/supplier/');

define('DIR_WS_ADMIN', '/admin/');

define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);

define('DIR_FS_S_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_S_ADMIN);

// define our Catalog path / or /catalog/

define('DIR_WS_CATALOG', '/cart/');

define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

define('DIR_WS_IMAGES', DIR_WS_ADMIN . 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . '/images/');

define('DIR_WS_INCLUDES', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN . 'includes/');

define('DIR_WS_SUPPLIER_INCLUDES', DIR_FS_DOCUMENT_ROOT . DIR_WS_S_ADMIN . 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

Link to comment
Share on other sites

  • 6 months later...

Version 0.6 has now been released with a LOT of the errors now fixed..

The errors generated are because I'm pulling the files from my site which is a heavily modified site and not stock OSC so there were still a few references to other contributions in the files that I missed when removing the references..

 

Hope you find the contribution of some use and I hope that someone can add to it and make it better.

 

Have you updated this since the last time if so what is the link to the most current contribution.

Knowledge is useless, unless transferred.

Link to comment
Share on other sites

  • 1 year later...

This looks like an awesome contribution, I have downloaded version 1.3 and attempted to install it on OC version 2.32.

Can someone advise what I will need ot update to make this compatible with V2.32 as there is new password security.

I am keen to assist with the development of this contribution although still fairly new to php.

Link to comment
Share on other sites

  • 3 weeks later...

I have this add on working perfectly. I just wondered if anyone knew how to make it so you could select the Manufacturer's names like you can in the main admin panel, so that is carries that information through as well.

 

Thanks.

 

How did you get the contrib to work? We have been working for 15 days now and haven't been able to get it to work properly.

 

Supplier Admin Area V.1.3

PHP: 5.3; mySQL: 5.0

Template: http://www.templatemonster.com/oscommerce-templates/28703.html

Link to comment
Share on other sites

How did you get the contrib to work? We have been working for 15 days now and haven't been able to get it to work properly. Are there any issues with PHP: 5.3; mySQL: 5.0? or OsCommerce 2.2RC2? I can provide website access to anyone willing to help and ANY help would be GREATLY appreciated!

 

Supplier Admin Area V.1.3

PHP: 5.3; mySQL: 5.0

Template: http://www.templatemonster.com/oscommerce-templates/28703.html

Edited by tmckee
Link to comment
Share on other sites

This is one of the error messages: Parse error: syntax error, unexpected T_ECHO in /home/content/44/9392844/html/supplier/supplier_s_statistic.php on line 103

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

<?php

/*

$Id: stats_products_purchased.php,v 1.29 2003/06/29 22:50:52 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

if (!tep_session_is_registered('login')){

require('includes/supplier_area_top.php');

}

 

require(DIR_WS_CLASSES . 'currencies.php');

$currencies = new currencies();

 

$suppliers_id = $_SESSION['login'];

 

$osCAdminID = $_REQUEST['osCAdminID'];

 

$years_array = array();

$years_query = tep_db_query("select distinct year(date_purchased) as date_purchased from " . TABLE_ORDERS . "");

while ($year = tep_db_fetch_array($years_query)){

$years_array[] = array('id' => $year['date_purchased'], 'text' => $year['date_purchased']);

}

 

$months_name = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');

$months_array = array();

for ($i = 1; $i < 13; $i++){

$months_array[] = array('id' => $i, 'text' => strftime('%B', mktime(0,0,0,$i,15)));

}

 

$type_array = array(array('id' => 'daily', 'text' => 'One Month'),

array('id' => 'monthly', 'text' => 'One Year'),

array('id' => 'yearly', 'text' => 'All Year') );

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

<script language="javascript" src="includes/general.js"></script>

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">

<!-- header //-->

<?php require('includes/header_supplier.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<center>

<table border="0" width="100%" cellspacing="2" cellpadding="2">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">

<!-- left_navigation //-->

<?php require('includes/supplier_column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo 'Supplier\'s Statistic'; ?></td>

<td class="pageHeading" align="right"> </td>

</tr>

</table></td>

</tr>

<tr>

 

<td align="left"><table border="0" width="100%"><tr>

<td>

<?php

/*echo "<form method='post' action = 'supplier_s_statistic.php?osCAdminID=" .$osCAdminID . "'>";*/

echo tep_draw_form('year', FILENAME_SUPPLIER_STATISTIC, '', 'get');?>

<?php //echo tep_draw_hidden_field('month', $HTTP_GET_VARS['end_month']); ?>

<?php echo tep_draw_hidden_field('osCAdminID', $osCAdminID);?>

<?php echo 'Type: ' . ' ' . tep_draw_pull_down_menu('type', $type_array, (($HTTP_GET_VARS['type']) ? $HTTP_GET_VARS['type'] : 'daily'), 'onChange="this.form.submit();"'); ?> <input name="Update" type="submit" value="Update">

</td>

<?php

switch($HTTP_GET_VARS['type']){

case 'yearly': break;

case 'monthly':

echo '<td align="left">' . 'Year: ' . ' ' . tep_draw_pull_down_menu('year', $years_array, (($HTTP_GET_VARS['year']) ? $HTTP_GET_VARS['year'] : date('Y')), 'onChange="this.form.submit();"') . '</td>';

break;

default: case 'daily':

echo '<td align="left">' . 'Month: ' . ' ' . tep_draw_pull_down_menu('month', $months_array, (($HTTP_GET_VARS['month']) ? $HTTP_GET_VARS['month'] : date('n')), 'onChange="this.form.submit();"') . '</td>';

echo '<td align="left">' . 'Year: ' . ' ' . tep_draw_pull_down_menu('year', $years_array, (($HTTP_GET_VARS['year']) ? $HTTP_GET_VARS['year'] : date('Y')), 'onChange="this.form.submit();"') . '</td>';

break;

}

?>

</tr>

<?php echo "</form>";?>

<tr>

<td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php

$start_year = echo date('Y')-2;

$start_month = '1';

$end_year = date(Y) + 1;

$end_month = '1';

$order = " AND TO_DAYS(date_purchased) >= TO_DAYS('" . $start_year . "-" . $start_month . "-01') AND TO_DAYS(o.date_purchased) <= TO_DAYS('" . $end_year . "-" . $end_month . "-01') -1";

$order1 = " AND TO_DAYS(date_purchased) >= TO_DAYS('" . $start_year . "-" . $start_month . "-01') AND TO_DAYS(o.date_purchased) <= TO_DAYS('" . $end_year . "-" . $end_month . "-01') -1";

 

switch($HTTP_GET_VARS['type']){

case 'daily':

$start_year = $HTTP_GET_VARS['year'];

$start_month = $HTTP_GET_VARS['month'];

$end_year = $HTTP_GET_VARS['year'];

$end_month = $HTTP_GET_VARS['month'] + 1;

if ($end_month == '13') {$end_month = '1'; $end_year = $end_year +1;}

$order = " AND TO_DAYS(date_purchased) >= TO_DAYS('" . $start_year . "-" . $start_month . "-01') AND TO_DAYS(o.date_purchased) <= TO_DAYS('" . $end_year . "-" . $end_month . "-01') -1";

$order1 = " AND TO_DAYS(date_purchased) >= TO_DAYS('" . $start_year . "-" . $start_month . "-01') AND TO_DAYS(o.date_purchased) <= TO_DAYS('" . $end_year . "-" . $end_month . "-01' -1) ";

break;

case 'monthly':

$start_year = $HTTP_GET_VARS['year'];

$start_month = '01';

$end_year = $HTTP_GET_VARS['year'] + 1;

$end_month = '01';

$order = " AND TO_DAYS(date_purchased) >= TO_DAYS('" . $start_year . "-" . $start_month . "-01') AND TO_DAYS(o.date_purchased) <= TO_DAYS('" . $end_year . "-" . $end_month . "-01') - 1";

$order1 = " AND TO_DAYS(date_purchased) >= TO_DAYS('" . $start_year . "-" . $start_month . "-01') AND TO_DAYS(o.date_purchased) <= TO_DAYS('" . $end_year . "-" . $end_month . "-01') - 1 ";

break;

default:

// $order = " AND TO_DAYS(date_purchased)";

break;

}

 

?>

<tr>

<td class="smallText" align="left"><?php echo 'From' . ' ' . date("d-M-Y", mktime(0,0,0,$start_month ,1,$start_year)); ?>  <?php echo 'To' . ' ' . date("d-M-Y", mktime(0,0,0,$end_month ,0,$end_year)); ?></td>

</tr>

<tr class="dataTableHeadingRow">

<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_NUMBER; ?></td>

<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?></td>

<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_PURCHASED; ?> </td>

<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_VIEWED; ?> </td>

<td class="dataTableHeadingContent" align="center"><?php echo 'Total Price'; ?> </td>

</tr>

<?php

if (isset($HTTP_GET_VARS['page']) && ($HTTP_GET_VARS['page'] > 1)) $rows = $HTTP_GET_VARS['page'] * MAX_DISPLAY_SEARCH_RESULTS - MAX_DISPLAY_SEARCH_RESULTS;

$products_query_raw = "select p.products_id, p.products_ordered, pd.products_name, pd.products_viewed, od.products_price, sum(od.products_quantity) from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " od, " . TABLE_ORDERS_STATUS_HISTORY . " odh where odh.orders_id = o.orders_id and od.orders_id = o.orders_id and od.products_id = p.products_id and pd.products_id = p.products_id and pd.language_id = '" . $languages_id. "' and p.suppliers_id = '" . (int)$suppliers_id . "' and odh.orders_status_id= '3'" . $order . " group by pd.products_id order by p.products_ordered DESC, pd.products_name";

$products_query = tep_db_query($products_query_raw);

$products_query_numrows = tep_db_num_rows($products_query);

$products_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $products_query_raw, $products_query_numrows);

 

$rows = 0;

$total = 0;

 

while ($products = tep_db_fetch_array($products_query)) {

$products_id = $products['products_id'];

 

$orders_products_query = tep_db_query("select products_price, final_price from " . TABLE_ORDERS_PRODUCTS . " where products_id = '" . $products_id . "'");

//$products_purchased = tep_db_num_rows($orders_products_query);

$final_price = 0;

 

//$rdrs_products_query = tep_db_query("select sum( products_quantity ) from " . TABLE_ORDERS_PRODUCTS . " where products_id = '" . $products_id . "'");

//$prdcts_purchased = tep_db_fetch_array($rdrs_products_query);

//$products_purchased = $prdcts_purchased['products_quantity'];

 

 

$total += $products['products_price'] * $products['sum(od.products_quantity)'];

 

$rows++;

 

if (strlen($rows) < 2) {

$rows = '0' . $rows;

}

?>

<tr class="dataTableRow" onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)" onClick="document.location.href='<?php echo tep_href_link(FILENAME_SUPPLIER_S_CATEGORIES_PRODUCTS, 'action=new_product_preview&read=only&pID=' . $products['products_id']); ?>'">

<td class="dataTableContent"><?php echo $rows; ?>.</td>

<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_SUPPLIER_S_CATEGORIES_PRODUCTS, 'action=new_product_preview&read=only&pID=' . $products['products_id']) . '">' . $products['products_name'] . '</a>'; ?></td>

<td class="dataTableContent" align="center"><?php echo $products['sum(od.products_quantity)'];?> </td>

<td class="dataTableContent" align="center"><?php echo $products['products_viewed']; ?> </td>

<td class="dataTableContent" align="center"><?php echo $currencies->format($products['products_price'] * $products['sum(od.products_quantity)']); ?> </td>

</tr>

<?php

}

?>

</table></td>

</tr>

<tr><td colspan="3" class="smallText" align="right"><?php echo 'Total: ' . $currencies->format($total);?></td></tr>

<tr>

<td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="smallText" valign="top"><?php echo $products_split->display_count($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>

<td class="smallText" align="right"><?php echo $products_split->display_links($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?> </td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

</tr></table></td>

<!-- body_text_eof //-->

</tr>

</table>

</center>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

  • 2 weeks later...

I have this add on working perfectly. I just wondered if anyone knew how to make it so you could select the Manufacturer's names like you can in the main admin panel, so that is carries that information through as well.

 

Thanks.

 

Did you ever get this figured out? I am having the same problem.

Link to comment
Share on other sites

  • 3 months later...

Is there a way to add a link to beneath the login box on supplier/supplier_area.php?

 

For example:

 

Not already a member? Click here to become one! to go to become_a_consignor.php

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...