Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customer Add Product


empo

Recommended Posts

Hi together,

 

I am an new german user, please apologizes my english.....

 

i tried to install Customer Add Product Version 1.4 and now the Problem:

 

installation text:

12.

    ## Open file: admin/includes/languages/customers.php  at line :468(end)

    ## Add code :

              define('CATEGORY_CUSTOMER_APP', 'Approve Customer');

              define('ENTRY_CUSTOMER_APP', 'Approve customer');

              define('YES', 'Yes');

              define('NO', 'No');

 

there is no customers.php !

in ../languages/english (or german)/ is a file named customers.php

but there are only 32 lines ???

 

Could anybody help, where i have to add this code ??

 

Thanks for help

 

J?rgen

Link to comment
Share on other sites

  • 2 weeks later...

Hi jkcool

 

Just add the lines to the lines to

admin/includes/languages/german/customers.php

 

I added them there in my site. just to the danish languages.

 

But i can't get the account_manage.php to work (looks like it can't find my stylesheet.css)

 

I removed the password protected .htacess in my admin folder, and installed the adminlogin contribution.

 

:thumbsup:

Link to comment
Share on other sites

  • 3 weeks later...

I have a very big problem...

 

we installed the contrib CAP 4 times in the shop.. but, we don't know, where we can activadet ist and in the customer area we couldn't found the CAP Ad. We have testwise change the language in englisch.

Have a look.. http://www.live-shop.net

 

What we made wrong?

 

And the next question, can we addet the Codec also in languages german? Without changes?

 

 

And.. your Test-Link doesn't work.....

 

sorry for my bad englisch.. i'm german ;-)

Edited by MotMann
Link to comment
Share on other sites

In...

 

6.

## Open file: includes/languages/english.php

## Add code :

define('MY_ADD_PRODUCT_TITLE', 'Add new Product');

define('MY_ADD_PRODUCT_TITLE', 'Add Product');

 

 

Where i copy it in? Anyway in the .php.. or in the last line?

Edited by MotMann
Link to comment
Share on other sites

  • 2 weeks later...

I am trying to run this:

 INSERT INTO `customers` ( `customers_id` , `customers_gender` , `customers_firstname` , `customers_lastname` , `customers_dob` , `customers_email_address` , `customers_default_address_id` , `customers_telephone` , `customers_fax` , `customers_password` , `customers_newsletter` )
	  VALUES ('0', 'm', 'Administrator', '', '0000-00-00 00:00:00', '', '0', '', NULL , '', NULL);

 

but getting this error:

#1048 - Column 'customers_newsletter' cannot be null

 

I have added the Multi Newsletter contrib and it does this:

 

ALTER TABLE customers CHANGE `customers_newsletter` \

`customers_newsletter` INT( 4 ) DEFAULT '0' NOT NULL;

ALTER TABLE `newsletters` ADD `type` \

INT( 4 ) NOT NULL AFTER `newsletters_id` ;

 

Not sure if this is the problem. Any suggestions?

Link to comment
Share on other sites

One other note:

 

Because I cannot run the above SQL, I am using my original admin\categories.php so that I can see my items.

 

At the moment, everything seems to be working properly. What would the SQL change and the changes in the categories.php give me that I am not seeing right now?

 

Thanks,

Link to comment
Share on other sites

Thanks for yor good contribution.

 

Sory for my bad english. I'm a new user (Portuguese).

 

I have instaled your contribution of customer add prodict V 1.4.

 

Everything works fine, except (Customers) can't make any upload of a picture.

 

Can you tel me what I do wrong.

 

Thanks

rui campos

Link to comment
Share on other sites

  • 2 weeks later...

OK, I find the button....

 

New question : I use Products Extra Field, and i want implement new fields that the customer can change.

I have done some change in the account_manage.php file (I' ve add in account_manage.php the same code that Products Extra Field need in admin/categories.php ) but their in no change in the account_manage page ...

Do I have to change something else ? Where I'm wrong ?

Link to comment
Share on other sites

francoisparis,

 

I had to change both the account_manage and account_add to use the product extra field info.

 

OK, I wanted to change account_add too, but I change only in account_manage for test and it doesn't work. Do you realy think if I change account-add after i will work ?

Link to comment
Share on other sites

Yeah, the account_manage.php should be working with out the account_add.php being changed. Was in a hurry and not thinking everything through.

 

I added my version of the account_manage.php and account_add.php that is currently working for me to the contribution. Try using them to see if it works for you.

 

The only thing that is strange is when you preview before adding or modifying. A column or something is off somewhere. I just haven't had time to look into it. But after submitting, everything looks properly in production.

 

Let me know if it works for you.

Link to comment
Share on other sites

Yeah, the account_manage.php should be working with out the account_add.php being changed. Was in a hurry and not thinking everything through.

 

I added my version of the account_manage.php and account_add.php that is currently working for me to the contribution. Try using them to see if it works for you.

 

The only thing that is strange is when you preview before adding or modifying. A column or something is off somewhere. I just haven't had time to look into it. But after submitting, everything looks properly in production.

 

Let me know if it works for you.

 

Thank you for your help.

In fact, I use a little bit different version of Product extra field, it's Category Fields

 

here is the php code of account_manage.php that I have modified :

 

 

<?php

/*

$Id: account_manage.php,v 1.4 2005/05/01 23:03: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');

require(DIR_WS_FUNCTIONS.'product_manage.php');

require(DIR_WS_CLASSES.'product_manage.php');

require(DIR_WS_CLASSES . 'upload.php');

require(DIR_WS_LANGUAGES . $language . '/account_manage.php');

define (FILENAME_MANAGE,"account_manage.php");

$customer_query = tep_db_query("select customers_firstname,customers_lastname,customers_email_address,customers_ap from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");

$customer = tep_db_fetch_array($customer_query);

 

if (!$customer['customers_ap']) {

echo "<script>alert('Administrator must apporve your account for this function'); window.history.go(-1);</script>\n";

exit();

}

$currencies = new currencies();

 

$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

 

if (tep_not_null($action)) {

switch ($action) {

case 'delete_product_confirm':

if (isset($HTTP_POST_VARS['products_id']) && isset($HTTP_POST_VARS['product_categories']) && is_array($HTTP_POST_VARS['product_categories'])) {

$product_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);

$product_categories = $HTTP_POST_VARS['product_categories'];

 

for ($i=0, $n=sizeof($product_categories); $i<$n; $i++) {

tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "' and categories_id = '" . (int)$product_categories[$i] . "'");

}

 

$product_categories_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "'");

$product_categories = tep_db_fetch_array($product_categories_query);

 

if ($product_categories['total'] == '0') {

tep_remove_product($product_id);

}

}

 

if (USE_CACHE == 'true') {

tep_reset_cache_block('categories');

tep_reset_cache_block('also_purchased');

}

 

tep_redirect(tep_href_link(FILENAME_MANAGE, 'cPath=' . $cPath));

break;

 

case 'new_product_preview':

// copy image only if modified

//echo DIR_WS_IMAGES;

//print_r ($customer);

//die($products_image);

$products_image = new upload('products_image');

$products_image->set_destination(DIR_WS_IMAGES);

if ($products_image->parse() && $products_image->save()) {

$products_image_name = $products_image->filename;

} else {

$products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');

}

break;

 

case 'insert_product':

case 'product_update':

if (isset($HTTP_POST_VARS['edit_x']) || isset($HTTP_POST_VARS['edit_y'])) {

$action = 'new_product';

} else {

if (isset($HTTP_GET_VARS['pID'])) $products_id = tep_db_prepare_input($HTTP_GET_VARS['pID']);

$products_date_available = tep_db_prepare_input($HTTP_POST_VARS['products_date_available']);

 

$products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : 'null';

 

$sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']),

'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']),

'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']),

'products_date_available' => $products_date_available,

'products_weight' => tep_db_prepare_input($HTTP_POST_VARS['products_weight']),

'products_status' => '0',//tep_db_prepare_input($HTTP_POST_VARS['products_status']),

'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']),

'customer_id' => $customer_id,

'manufacturers_id' => tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id']));

 

if (isset($HTTP_POST_VARS['products_image']) && tep_not_null($HTTP_POST_VARS['products_image']) && ($HTTP_POST_VARS['products_image'] != 'none')) {

$sql_data_array['products_image'] = tep_db_prepare_input($HTTP_POST_VARS['products_image']);

}

 

if ($action == 'insert_product') {

$insert_sql_data = array('products_date_added' => 'now()');

 

$sql_data_array = array_merge($sql_data_array, $insert_sql_data);

 

tep_db_perform(TABLE_PRODUCTS, $sql_data_array);

$products_id = tep_db_insert_id();

 

tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$category_id . "')");

} elseif ($action == 'product_update') {

$update_sql_data = array('products_last_modified' => 'now()');

 

$sql_data_array = array_merge($sql_data_array, $update_sql_data);

 

tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");

 

$sql_data_array = array(' categories_id' => tep_db_prepare_input($HTTP_POST_VARS['category_id']) );

tep_db_perform(TABLE_PRODUCTS_TO_CATEGORIES, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");

}

 

$languages = tep_get_languages();

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

$language_id = $languages[$i]['id'];

 

$sql_data_array = array('products_name' => tep_db_prepare_input($HTTP_POST_VARS['products_name'][$language_id]),

'products_description' => tep_db_prepare_input($HTTP_POST_VARS['products_description'][$language_id]),

'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id]));

 

if ($action == 'insert_product') {

$insert_sql_data = array('products_id' => $products_id,

'language_id' => $language_id);

 

$sql_data_array = array_merge($sql_data_array, $insert_sql_data);

 

tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array);

} elseif ($action == 'product_update') {

 

tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'");

}

}

// Category Fields

$extra_fields_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " WHERE products_id = " . (int)$products_id);

while ($products_extra_fields = tep_db_fetch_array($extra_fields_query)) {

$extra_product_entry[$products_extra_fields['products_extra_fields_id']] = $products_extra_fields['products_extra_fields_value'];

}

 

if ($HTTP_POST_VARS['extra_field']) { // Check to see if there are any need to update extra fields.

foreach ($HTTP_POST_VARS['extra_field'] as $key=>$val) {

if (isset($extra_product_entry[$key])) { // an entry exists

if ($val == '') tep_db_query("DELETE FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " where products_id = " . (int)$products_id . " AND products_extra_fields_id = " . $key);

else tep_db_query("UPDATE " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " SET products_extra_fields_value = '" . tep_db_input($val) . "' WHERE products_id = " . (int)$products_id . " AND products_extra_fields_id = " . $key);

}

else { // an entry does not exist

if ($val != '') tep_db_query("INSERT INTO " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " (products_id, products_extra_fields_id, products_extra_fields_value) VALUES ('" . (int)$products_id . "', '" . $key . "', '" . tep_db_input($val) . "')");

}

}

}

// Category Fields EOF

if (USE_CACHE == 'true') {

tep_reset_cache_block('categories');

tep_reset_cache_block('also_purchased');

}

define(EMAIL_TEXT_SUBJECT,'New Product was added/changed');

$category_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id ."'");

$category = tep_db_fetch_array($category_query);

 

$email = "Hello administrator\n\n";

$email .= "New product was added/changed to : ".$category['categories_name']."\n\n";

$email .= "Product was added by : ". $customer['customers_firstname'].' '.$customer['customers_lastname'] ."\n\n";

$email .= "For approve new product go to administrator panel \n\n";

tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_TEXT_SUBJECT, $email,$customer['customers_firstname'].' '.$customer['customers_lastname'],$customer['customers_email_address']);

tep_redirect(tep_href_link(FILENAME_DEFAULT, 'osCsid=' . $osCsid . '&pID=' . $products_id));

}

break;

}

}

 

 

// check if the catalog image directory exists

if (is_dir(DIR_FS_CATALOG_IMAGES)) {

if (!is_writeable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');

} else {

$messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');

}

?>

<!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="stylesheet.css">

<style type="text/css">

<!--

/* data table */

.dataTableHeadingRow { background-color: #C9C9C9; }

.dataTableHeadingContent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; font-weight: bold; }

.dataTableRow { background-color: #F0F1F1; }

.dataTableRowSelected { background-color: #DEE4E8; }

.dataTableRowOver { background-color: #FFFFFF; cursor: pointer; cursor: hand; }

.dataTableContent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; }

 

/* info box */

.infoBoxHeading { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; background-color: #B3BAC5; }

.infoBoxContent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; background-color: #DEE4E8; }

-->

</style>

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

<link id="luna-tab-style-sheet" type="text/css" rel="stylesheet" href="includes/javascript/tabs/tabpane.css" />

<script type="text/javascript" src="includes/javascript/tabs/tabpane.js"></script>

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">

<div id="spiffycalendar" class="text"></div>

<!-- header //-->

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

<!-- header_eof //-->

 

<!-- body //-->

<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(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td width="100%" valign="top">

<?php

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' => '',

'category_id' => '',

'manufacturers_id' => '');

echo $_GET['ip'];

$pInfo = new objectInfo($parameters);

if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {

 

// Category Fields

$products_extra_fields_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " WHERE products_id=" . (int)$HTTP_GET_VARS['pID']);

while ($products_extra_fields = tep_db_fetch_array($products_extra_fields_query)) {

$extra_field[$products_extra_fields['products_extra_fields_id']] = $products_extra_fields['products_extra_fields_value'];

}

$extra_field_array=array('extra_field'=>$extra_field);

$pInfo->objectInfo($extra_field_array);

// Category Fields EOF

$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url,pc.categories_id, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.customer_id = '".(int)$customer_id."' and p.products_id = pd.products_id and p.products_id = pc.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product = tep_db_fetch_array($product_query);

if (sizeof($product)==1){

echo "<br><br><center><font color=red><h2>!!!HACK ATTEMPT!!!</h2><br>Your ip(". $REMOTE_ADDR .") cashed and send to administrator";

die();

};

$pInfo->objectInfo($product);

} elseif (tep_not_null($HTTP_POST_VARS)) {

$pInfo->objectInfo($HTTP_POST_VARS);

$products_name = $HTTP_POST_VARS['products_name'];

$products_description = $HTTP_POST_VARS['products_description'];

$products_url = $HTTP_POST_VARS['products_url'];

}

 

$manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE));

$manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");

while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {

$manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],

'text' => $manufacturers['manufacturers_name']);

}

$languages = tep_get_languages();

//print_r( $languages);

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

//echo $languages[$i]['directory'];

if ($languages[$i]['directory']==$language) $language_id=$languages[$i]['id'];

}

$categories_array = array(array('id' => '', 'text' => TEXT_NONE));

$categories_query = tep_db_query("select a.categories_id,parent_id, b.categories_name from " . TABLE_CATEGORIES . " as a," . TABLE_CATEGORIES_DESCRIPTION . " as b where a.categories_id = b.categories_id and b.language_id = " . (int)$language_id . " order by categories_name");

while ($categories = tep_db_fetch_array($categories_query)) {

//echo $categories['parent_id'];

$parent_id = $categories['parent_id'];

if ($parent_id==0)

{

$categories_array[] = array('id' => $categories['categories_id'],

'text' => $categories['categories_name']);

} else {

$txt=NULL;

while ($parent_id!=0) {

//echo $parent_id;

$category_query = tep_db_query("select a.categories_id,parent_id, b.categories_name from " . TABLE_CATEGORIES . " as a," . TABLE_CATEGORIES_DESCRIPTION . " as b where a.categories_id = b.categories_id and a.categories_id = " . $parent_id . " and b.language_id = " . (int)$language_id . " order by categories_name");

$category = tep_db_fetch_array($category_query);

$txt .=$category['categories_name']."->" ;

$parent_id = $category['parent_id'];

//die($txt.$parent_id.$category['categories_id']);

}

$categories_array[] = array('id' => $categories['categories_id'],

'text' => $txt.$categories['categories_name']);

}

}

 

$tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));

$tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title");

while ($tax_class = tep_db_fetch_array($tax_class_query)) {

$tax_class_array[] = array('id' => $tax_class['tax_class_id'],

'text' => $tax_class['tax_class_title']);

}

 

?>

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

<script language="JavaScript" src="includes/javascript/spiffyCal/spiffyCal_v2_1.js"></script>

<script language="javascript"><!--

var dateAvailable = new ctlSpiffyCalendarBox("dateAvailable", "new_product", "products_date_available","btnDate1","<?php echo $pInfo->products_date_available; ?>",scBTNMODE_CUSTOMBLUE);

//--></script>

<script language="javascript"><!--

var tax_rates = new Array();

<?php

for ($i=0, $n=sizeof($tax_class_array); $i<$n; $i++) {

if ($tax_class_array[$i]['id'] > 0) {

echo 'tax_rates["' . $tax_class_array[$i]['id'] . '"] = ' . tep_get_tax_rate_value($tax_class_array[$i]['id']) . ';' . "\n";

}

}

?>

 

function doRound(x, places) {

return Math.round(x * Math.pow(10, places)) / Math.pow(10, places);

}

 

function getTaxRate() {

var selected_value = document.forms["new_product"].products_tax_class_id.selectedIndex;

var parameterVal = document.forms["new_product"].products_tax_class_id[selected_value].value;

 

if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) {

return tax_rates[parameterVal];

} else {

return 0;

}

}

 

function updateGross() {

var taxRate = getTaxRate();

var grossValue = document.forms["new_product"].products_price.value;

 

if (taxRate > 0) {

grossValue = grossValue * ((taxRate / 100) + 1);

}

 

document.forms["new_product"].products_price_gross.value = doRound(grossValue, 4);

}

 

function updateNet() {

var taxRate = getTaxRate();

var netValue = document.forms["new_product"].products_price_gross.value;

 

if (taxRate > 0) {

netValue = netValue / ((taxRate / 100) + 1);

}

 

document.forms["new_product"].products_price.value = doRound(netValue, 4);

}

//--></script>

<?php echo tep_draw_form('new_product', 'account_manage.php?osCsid=' . $osCsid . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=new_product_preview', 'post', 'enctype="multipart/form-data"'); ?>

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

<tr>

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

<tr>

<td class="pageHeading"><?php echo TEXT_NEW_PRODUCT; ?></td>

<td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<table width="100%" border="0">

<tr>

<td valign="middle" align="left">

 

<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>

 

<div class="tab-page" id="configPane"><script type="text/javascript">

var tabPane1 = new WebFXTabPane( document.getElementById( "configPane" ), 0 )

</script>

<div class="tab-page" id="site-page"><h2 class="tab"><? echo MAIN_DATA; ?></h2><script type="text/javascript">

tabPane1.addTabPage( document.getElementById( "site-page" ) );</script> <table class="adminform">

<td><table>

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_STATUS; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '?' . tep_draw_radio_field('products_status', '1', $in_status) . '?' . TEXT_PRODUCT_AVAILABLE . '?' . tep_draw_radio_field('products_status', '0', $out_status) . '?' . TEXT_PRODUCT_NOT_AVAILABLE; ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_DATE_AVAILABLE; ?><br><small>(YYYY-MM-DD)</small></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '?'; ?><script language="javascript">dateAvailable.writeControl(); dateAvailable.dateFormat="yyyy-MM-dd";</script></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_CATEGORY; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '?' . tep_draw_pull_down_menu('category_id', $categories_array, $pInfo->categories_id); ?></td>

</tr>

 

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_MANUFACTURER; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '?' . tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $pInfo->manufacturers_id); ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<?php

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

?>

<tr>

<td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_NAME; ?></td>

<td class="main"><?php echo tep_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '?' . tep_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? $products_name[$languages[$i]['id']] : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td>

</tr>

<?php

}

?> </table></td><td><table>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr bgcolor="#ebebff">

<td class="main"><?php echo TEXT_PRODUCTS_TAX_CLASS; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '?' . tep_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->products_tax_class_id, 'onchange="updateGross()"'); ?></td>

</tr>

<tr bgcolor="#ebebff">

<td class="main"><?php echo TEXT_PRODUCTS_PRICE_NET; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '?' . tep_draw_input_field('products_price', $pInfo->products_price, 'onKeyUp="updateGross()"'); ?></td>

</tr>

<tr bgcolor="#ebebff">

<td class="main"><?php echo TEXT_PRODUCTS_PRICE_GROSS; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '?' . tep_draw_input_field('products_price_gross', $pInfo->products_price, 'OnKeyUp="updateNet()"'); ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<script language="javascript">

<!--

updateGross();

//-->

</script>

<tr>

 

<td class="main"><?php echo TEXT_PRODUCTS_QUANTITY; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '?' . tep_draw_input_field('products_quantity', $pInfo->products_quantity); ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_MODEL; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '?' . tep_draw_input_field('products_model', $pInfo->products_model); ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '?' . tep_draw_file_field('products_image','') . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . '?' . $pInfo->products_image . tep_draw_hidden_field('products_previous_image', $pInfo->products_image); ?></td>

 

</tr>

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_WEIGHT; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '?' . tep_draw_input_field('products_weight', $pInfo->products_weight); ?></td>

</tr>

 

<!-- Category Fields //-->

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<?php

$extra_fields_query = tep_db_query("SELECT products_extra_fields_id, products_extra_fields_name, products_extra_fields_category, products_extra_fields_type, products_extra_fields_order, products_extra_fields_status from " . TABLE_PRODUCTS_EXTRA_FIELDS . " where products_extra_fields_category = " . (int)$current_category_id . " ORDER BY products_extra_fields_order");

while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {

 

if ($extra_fields[products_extra_fields_type] == 'on') { ?>

<tr bgcolor="#ebebff">

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr bgcolor="#ebebff">

<td class="main"><?php echo $extra_fields['products_extra_fields_name']; ?>:</td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '?' . tep_draw_input_field("extra_field[".$extra_fields['products_extra_fields_id']."]", $pInfo->extra_field[$extra_fields['products_extra_fields_id']]); ?></td>

</tr>

<tr bgcolor="#ebebff">

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<?php

} else {

?>

<tr bgcolor="#ebebff">

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr bgcolor="#ebebff">

<td class="main" valign="top"><?php echo $extra_fields['products_extra_fields_name']; ?>:</td>

<td><table border="0" cellspacing="0" cellpadding="0">

<tr>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '35') . '?' . tep_draw_textarea_field("extra_field[".$extra_fields['products_extra_fields_id']."]", 'soft', '70', '15', $pInfo->extra_field[$extra_fields['products_extra_fields_id']]); ?></td>

</tr>

</table></td>

</tr>

<?php

}

}

?>

 

<!-- Category Fields EOF //-->

 

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

</div>

 

 

 

<div class="tab-page" id="Locale-page"><h2 class="tab"><? echo DESCRIPTION; ?></h2>

<script type="text/javascript"> tabPane1.addTabPage( document.getElementById( "Locale-page" ) );</script>

<table class="adminform">

<?php

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

?>

<tr>

<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>

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

<tr>

<td class="main" valign="top"><?php echo tep_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?>?</td>

<td class="main" width="100%"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '20', '10', (isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>

</tr>

</table></td>

</tr>

<?php

}

?>

</table>

</div>

 

 

<div class="tab-page" id="Locale2-page"><h2 class="tab"><? echo WEB_LINK; ?></h2>

<script type="text/javascript"> tabPane1.addTabPage( document.getElementById( "Locale2-page" ) );</script>

<table class="adminform">

<td><table>

<?php

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

?>

<tr>

<td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_URL . '<br><small>' . TEXT_PRODUCTS_URL_WITHOUT_HTTP . '</small>'; ?></td>

<td class="main"><?php echo tep_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '?' . tep_draw_input_field('products_url[' . $languages[$i]['id'] . ']', (isset($products_url[$languages[$i]['id']]) ? $products_url[$languages[$i]['id']] : tep_get_products_url($pInfo->products_id, $languages[$i]['id']))); ?></td>

</tr>

<?php

}

?>

 

</td></table>

</table>

</div>

 

 

<div align="center" class="tab-page" id="about-page">

<h2 class="tab">About</h2>

<script type="text/javascript">

tabPane1.addTabPage( document.getElementById( "about-page" ) );</script>

<table class="adminform">

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

<tr>

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

<tr>

<td class="pageHeading" align="center">Customer Add Product</td>

<td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

 

</tr>

<tr>

<td class="main" align="center" valign="top">Oscommerce Open Source addon for customer who want add products.<br></td>

</tr>

<tr>

<td class="main" align="center" valign="top"><br></td>

</tr>

<tr>

<td align=center valign=top><img src="images/logo.png">

</td>

 

<tr><td align=center valign=top><font class=small color=#FFA500><a href='http://www.procreator.info' color=#FFA500 target=_blank><font color=#FFA500>www.procreator.info</a></font></td>

 

</tr>

</table></td>

</tr>

 

 

</table></td>

</tr>

</table></td>

</div>

</div>

<?php

} elseif ($action == 'new_product_preview') {

if (tep_not_null($HTTP_POST_VARS)) {

$pInfo = new objectInfo($HTTP_POST_VARS);

$products_name = $HTTP_POST_VARS['products_name'];

$products_description = $HTTP_POST_VARS['products_description'];

$products_url = $HTTP_POST_VARS['products_url'];

} else {

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.customer_id = '".(int)$customer_id."'");

$product = tep_db_fetch_array($product_query);

if (sizeof($product)==1){

echo "<br><br><center><font color=red><h2>!!!HACK ATTEMPT!!!</h2><br>Your ip(". $REMOTE_ADDR .") cashed and send to administrator";

die();

};

$pInfo = new objectInfo($product);

$products_image_name = $pInfo->products_image;

}

 

$form_action = (isset($HTTP_GET_VARS['pID'])) ? 'product_update' : 'insert_product';

 

echo tep_draw_form($form_action, 'account_manage.php?osCsid=' . $osCsid . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"');

 

$languages = tep_get_languages();

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

if (isset($HTTP_GET_VARS['read']) && ($HTTP_GET_VARS['read'] == 'only')) {

$pInfo->products_name = tep_get_products_name($pInfo->products_id, $languages[$i]['id']);

$pInfo->products_description = tep_get_products_description($pInfo->products_id, $languages[$i]['id']);

$pInfo->products_url = tep_get_products_url($pInfo->products_id, $languages[$i]['id']);

} else {

$pInfo->products_name = tep_db_prepare_input($products_name[$languages[$i]['id']]);

$pInfo->products_description = tep_db_prepare_input($products_description[$languages[$i]['id']]);

$pInfo->products_url = tep_db_prepare_input($products_url[$languages[$i]['id']]);

}

?>

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

<tr>

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

<tr>

<td class="pageHeading"><?php echo tep_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '?' . $pInfo->products_name; ?></td>

<td class="pageHeading" align="right"><?php echo $currencies->format($pInfo->products_price); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<!-- Category Fields //-->

<td class="main">

<?php

echo tep_image(DIR_WS_CATALOG_IMAGES . $products_image_name, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"');

$extra_fields_names_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_EXTRA_FIELDS);

while ($extra_fields_names = tep_db_fetch_array($extra_fields_names_query)) {

$extra_field_name[$extra_fields_names['products_extra_fields_id']] = $extra_fields_names['products_extra_fields_name'];

}

 

if ($HTTP_GET_VARS['read'] == 'only') {

$products_extra_fields_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " WHERE products_id=" . (int)$HTTP_GET_VARS['pID']);

while ($products_extra_fields = tep_db_fetch_array($products_extra_fields_query)) {

 

$extra_fields_array[$products_extra_fields['products_extra_fields_id']] = $products_extra_fields['products_extra_fields_value'];

}

}

else {

$extra_fields_array = $HTTP_POST_VARS['extra_field'];

}

 

foreach ($extra_fields_array as $key=>$val) {

?>

<b><? echo $extra_field_name[$key];?>:</b> <? echo $val;?><br />

<?

}

 

echo "<br />" . $pInfo->products_description;

?>

</td>

<!-- Category Fields EOF //--> </tr>

 

<?php

 

 

if ($pInfo->products_url) {

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo sprintf(TEXT_PRODUCT_MORE_INFORMATION, $pInfo->products_url); ?></td>

</tr>

<?php

}

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<?php

if ($pInfo->products_date_available > date('Y-m-d')) {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_AVAILABLE, tep_date_long($pInfo->products_date_available)); ?></td>

</tr>

<?php

} else {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_ADDED, tep_date_long($pInfo->products_date_added)); ?></td>

</tr>

<?php

}

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<?php

}

 

if (isset($HTTP_GET_VARS['read']) && ($HTTP_GET_VARS['read'] == 'only')) {

if (isset($HTTP_GET_VARS['origin'])) {

$pos_params = strpos($HTTP_GET_VARS['origin'], '?', 0);

if ($pos_params != false) {

$back_url = substr($HTTP_GET_VARS['origin'], 0, $pos_params);

$back_url_params = substr($HTTP_GET_VARS['origin'], $pos_params + 1);

} else {

$back_url = $HTTP_GET_VARS['origin'];

$back_url_params = '';

}

} else {

$back_url = FILENAME_MANAGE;

$back_url_params = 'osCsid=' . $osCsid . '&pID=' . $pInfo->products_id;

}

?>

<tr>

<td align="right"><?php echo '<a href="' . tep_href_link($back_url, $back_url_params, 'NONSSL') . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td>

</tr>

<?php

} else {

?>

<tr>

<td align="right" class="smallText">

<?php

/* Re-Post all POST'ed variables */

reset($HTTP_POST_VARS);

while (list($key, $value) = each($HTTP_POST_VARS)) {

if (!is_array($HTTP_POST_VARS[$key])) {

echo tep_draw_hidden_field($key, htmlspecialchars(stripslashes($value)));

}

}

$languages = tep_get_languages();

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

echo tep_draw_hidden_field('products_name[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_name[$languages[$i]['id']])));

echo tep_draw_hidden_field('products_description[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_description[$languages[$i]['id']])));

echo tep_draw_hidden_field('products_url[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_url[$languages[$i]['id']])));

}

 

// Category fields

if ($HTTP_POST_VARS['extra_field']) { // Check to see if there are any need to update extra fields.

foreach ($HTTP_POST_VARS['extra_field'] as $key=>$val) {

echo tep_draw_hidden_field('extra_field['.$key.']', stripslashes($val));

}

} // Check to see if there are any need to update extra fields.

// Category Fields EOF

 

echo tep_draw_hidden_field('products_image', stripslashes($products_image_name));

 

echo tep_image_submit('button_back.gif', IMAGE_BACK, 'name="edit"') . '??';

 

if (isset($HTTP_GET_VARS['pID'])) {

echo tep_image_submit('button_update.gif', IMAGE_UPDATE);

} else {

echo tep_image_submit('button_insert.gif', IMAGE_INSERT);

}

echo '??<a href="' . tep_href_link('account.php', 'osCsid=' . $osCsid . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';

?></td>

</tr>

</table>

</form>

<?php

}

?>

</tr>

</table>

<?

} else {

?>

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

<tr>

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

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

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

<tr>

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

<tr class="dataTableHeadingRow">

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

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

<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>?</td>

</tr>

<?php

 

$products_count = 0;

$products_query = tep_db_query("select p.products_id,p.customer_id,c.customers_firstname,c.customers_lastname, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from " . TABLE_PRODUCTS . " p, ".TABLE_CUSTOMERS." as c , " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and c.customers_id = p.customer_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p.customer_id = ".$customer_id." order by pd.products_name");

 

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

$products_count++;

$rows++;

 

// Get categories_id for product if search

if (isset($HTTP_GET_VARS['search'])) $cPath = $products['categories_id'];

 

if ( (!isset($HTTP_GET_VARS['pID']) && !isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['pID']) && ($HTTP_GET_VARS['pID'] == $products['products_id']))) && !isset($pInfo) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) {

// find out the rating average from customer reviews

$reviews_query = tep_db_query("select (avg(reviews_rating) / 5 * 100) as average_rating from " . TABLE_REVIEWS . " where products_id = '" . (int)$products['products_id'] . "'");

$reviews = tep_db_fetch_array($reviews_query);

$pInfo_array = array_merge($products, $reviews);

$pInfo = new objectInfo($pInfo_array);

}

 

if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id) ) {

echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_MANAGE, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '\'">' . "\n";

} else {

echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_MANAGE, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '\'">' . "\n";

}

?>

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

 

<td class="dataTableContent" align="center">

<?php

if ($products['products_status'] == '1') {

echo tep_image(DIR_WS_ICONS . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . '??' . tep_image(DIR_WS_ICONS . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10);

} else {

echo tep_image(DIR_WS_ICONS. 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '??' . tep_image(DIR_WS_ICONS . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);

}

?></td>

<td class="dataTableContent" align="right"><?php if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id)) { echo tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_MANAGE, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '">' . tep_image(DIR_WS_ICONS . 'ico

Link to comment
Share on other sites

From what you posted, the the two versions(extra fields) line up pretty close in the account_manage.php file. There are some areas that do not however.

 

My only suggestion is to use a program like Winmerge(free) and compare your file and mine to see if you need to move some of the Category Fields code to a different location. It was mainly in the lower section that there were differences.

Link to comment
Share on other sites

Thank you, it work with Product extra field, I use your account_manager field and I can see my new field.

With Category Field, I' ve try to adapt my code, I can see my product but when I click on preview, I've got an error.

Category Field determine specific field for category of product, so, to use it with CAP, it might change dynamicaly that fields when customer edit product, if he changes category.

So, it's m?ore complicated than i thought....

Link to comment
Share on other sites

Hi,EMPO,

I have just installed CAP 1.4 module , it works perfectly. Very great .

I have one idea : Would it be better if there also a confirmation email to customer who sale products.

I dont know how to do it , but I just thinking about using this way :

1.Use product extra field , create new field called : "seller_contact" .And it will be one field of the product.

2.So in the confirmation email , email also be send to the seller with the address is : " product.seller_contact " , would that be ok ,

Thanks alot alot for your great contribution.

Casau

Link to comment
Share on other sites

  • 2 weeks later...

@emp or leathel

 

I installed CAP and i have the following questions.

 

1. Customer Addd product added product detail to databse. should they also predefined the shippment and payment method (enbled in admin). ### I can figure out how to predefined ship and payment, please help and give some idea.

 

2. Now, all the payment for custom add product pay to my paypal account. I would like to know how other CAP user handle this problem. How i can made the payment pay to seller's paypal.

 

I am new osc user, Please forgive me if i am asking stupid question.

 

you can also contact me for discussion. [email protected]

 

Gordon

Link to comment
Share on other sites

Hi

 

This is really powerful mod! I have installed it, but just have one problem:

 

When I login as a customer and add a product I am redirected to the index page. There is neither confirmation nor an error message. But when I check the database nothing has been added.

 

I feel as though I must have over looked something pretty simple, but I have uploaded all the files several times and been through the readme twice.

 

All help would be really appreciated.

 

Many thanks

 

Lewis

Link to comment
Share on other sites

empo, NICE WORK!!

 

It works perfectly for me. I only need one thing... can you tell what code must i change to define that a certain customer can only add products to a defined category? I?m trying to limit user-category, but without any results...

Can you please help me?

 

One more thing... when i click on the calendary, it appears hidden, and i must change to the description tab so that i can see it. ANy fixes for this?

 

TIA

Link to comment
Share on other sites

@empo

 

CAPV1.4

using sharing SSL

 

Need predefine shippment per product by seller

Need predefined payment method per product by seller

 

final pay to seller's paypal bout able to charge handling free

 

www.starunicorn.com/catalog

 

user: demo

login: demo

CAP enabled

 

One more question?

originally, i have cache on but when CAP reset the cache. There is an error message.

Does the CAP doesn't allow the cache on????

 

 

 

Please give me some ideas or directions

Does any contribution i can base on for development?

Link to comment
Share on other sites

  • 2 weeks later...

ei guys,

 

i have created a site using oscomm and personalized it to suit my gui needs. i dont use any template system. i have hand-hack oscomm.

 

my questions are:

- will it install it my mods?or will overwrite one file or two? where will the customers see the link to upload a product?

 

thanks.

 

another inquiry - the link procreator.info is not working. how is that?

Link to comment
Share on other sites

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...