Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customer Add Product


empo

Recommended Posts

Hello I am new, and would like to allow customers to sell products on my website. However, I looked here and it looked like the download was gone or something... is there an updated version of this that I can download?

 

And out of curiosity is there any other software that allows for this kind of feature (allowing customers to put products on your shop)?

Link to comment
Share on other sites

Has anyone solved the issue of the Administrator customer_id which keeps changing? This column is set as a 'NOT NULL' due to its being an auto-increment, so anytime any maintenance is done with the DB, the '0' values changes to whatever the next auto-increment value is.

 

Can someone please explain what the idea is behind having this 'Administrator' for this contribution rather than using an existing store admin, for example with customer_id = 1 ? Is there a specific reason why it needs to be '0' ... could I edit this contribution to use admin #1 instead? In fact, when I log into the store to approve products, I log in with the usual store admin. I do not log in with Administrator (0), so what is its purpose?

Link to comment
Share on other sites

i saw this when i went to download the contribution someone else had posted this:

 

Customer Add Product 1.4.2 has an error when you try to add product from the admin side. You can see the new added product from the public however it doesnt shown in the admin - categories/products field, which means you can not edit the contents in the future.

Would someone please suggest a fix to the bug.

Thank you.

 

has it been fixed yet???

Link to comment
Share on other sites

i saw this when i went to download the contribution someone else had posted this:

 

Customer Add Product 1.4.2 has an error when you try to add product from the admin side. You can see the new added product from the public however it doesnt shown in the admin - categories/products field, which means you can not edit the contents in the future.

Would someone please suggest a fix to the bug.

Thank you.

 

has it been fixed yet???

 

This is the same problem I mentioned. Log into the raw DB using PHPMyAdmin or whatever program you have access to and double check that in the customer table, the customer_id value for "Administrator " is '0'. Then you will be able to see all of the products again.

Link to comment
Share on other sites

  • 2 weeks later...
I searched the form but could not find a solution for this problem.

 

I've installed CAP and it works well, but when the Categories are displayed in the first tab, the sort order is wrong. The categories are sorted alphabetically by a mix of categories and subcategories ... which makes it difficult for customers to find the proper slot to place a product.

 

I would like them sorted the way they appear in the Categories sidebar

Category A

Category A--> Subcategory A1

Category A--> Subcategory A2

Category A--> Subcategory A3

Category B

Category B--> Subcategory B1

Category B -> Subcategory B2

etc.

 

Is there a way to sort them alphabetically by Category then subcategory?

 

I assume changes would need to be made to the following code (in account_add.php)but do not know php well enough to solve this alone.

 

thanks in advance

larry

 

==========

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']);

}

}

 

This will work for 2 levels of categories. Probably not the most efficient, but easier for users to understand the categories. You are replacing the code in account_manage.php and account_add.php

//	$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']);
//											 }
//	}

$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']);


		  // NOW GET THE SUBCATS FOR THIS PARENT
		   $this_parent_id=$categories['categories_id'];
		   $this_parent_name=$categories['categories_name'];
		   $subcat_query = tep_db_query("select a.categories_id,parent_id, b.categories_name from " . TABLE_CATEGORIES . " as a," . TABLE_CATEGORIES_DESCRIPTION . " as b where parent_id=" . $this_parent_id . " and a.categories_id = b.categories_id and b.language_id = " . (int)$language_id . " order by categories_name");
		   while ($subcat = tep_db_fetch_array($subcat_query)) {
				$categories_array[] = array('id' => $subcat['categories_id'],
									  'text' => $this_parent_name ."->". $subcat['categories_name']);
		  }
	   }
}

Link to comment
Share on other sites

Does anyone have any problems with taxes? After the installation, all products I add (no matter if they added from the admin panel or via the CAP section) dont register (calculate) the tax on checkout... - All the old products (the ones I had before the installation) work fine. And the strange thing is that I do see the taxes set in the products, and everything looks good, but when I try to check-out, the taxes are skipped if I have at least one "new" product in cart.

 

PS: by "new" i am referring to the products added to the store after the CAP installation.

 

 

Thanks in advance.

Link to comment
Share on other sites

  • 4 weeks later...

Hi there, and congratulation for the nice contrib:).

Just want to know one thing:

 

there is some way to make a single page in the admin section with the sum of the submissions taken with this contrib?

So , it would be more easy and intuitive to approve/not approve products to sell trough the portal!!

If not, how can i do it? :thumbsup:

 

Thanks a lot for your time and keep up a good work! :lol:

Link to comment
Share on other sites

  • 1 month later...

Hello, there is a means of entering the products with a presentation which comprises jumps of line of the text in fat ect?

If required to integrate fck editor? Because carractères HTML are not taken into account, the return to the line either.

Thank you

Link to comment
Share on other sites

This will work for 2 levels of categories. Probably not the most efficient, but easier for users to understand the categories. You are replacing the code in account_manage.php and account_add.php

 

With this only the subcatégorie name is on e-mail.

How can i do for have categorie/subcatégorie ?

Link to comment
Share on other sites

Ok attempt at integration of fck éditor: - I have well the bar with the tools in the box description. But two problems (perhaps one depend on the other):

Warning: ereg_replace() [function.ereg-replace]: REG_EMPTY in /home/.filer4/bourseauxlivres/www/account_add.php on line 43

// ########## [Delaballe] ADD FCKeditor ##########

case 'new_product_preview':

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

$products_image_name = $HTTP_POST_VARS['products_image'];

} else {

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

}

$products_image_name = htmlspecialchars(stripslashes($products_image_name));

$products_image_name = strstr($products_image_name, 'src=');

$products_image_name = ereg_replace('src="', '', $products_image_name);

$products_image_name_end = strstr($products_image_name, '"');

$products_image_name = ereg_replace($products_image_name_end, '', $products_image_name); <=== ligne 43

$products_image_name = ereg_replace(DIR_WS_CATALOG . DIR_WS_IMAGES, '', $products_image_name);

break;

// ########## [Delaballe] END - ADD FCKeditor ##########

 

And aucunne beacon does not leave correctly, nor the returns to the line. Caution: I have make modifs on the files account_ass (for the moment I deal with him). A blow of hand would have come well!

To download the package

If you know a means of making, that the products added by oblique this find yourself with dimensions admin, in the products on standby I am taking (to validate it is simpler).

sorry for my english

Link to comment
Share on other sites

ok:

// ########## [Delaballe] ADD FCKeditor ##########
  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($_POST['products_previous_image']) ? $_POST['products_previous_image'] : '');
	}

	if ($products_image_swf){

						/*  echo $products_image_swf;
						  $products_image_swf = new upload('products_image_swf');
						  $products_image_swf->set_destination(DIR_WS_IMAGES);
						  if ($products_image_swf->parse() && $products_image_swf->save()) {
							$products_image_name2 = $products_image_swf->filename;
						  } else {
							$products_image_name2 = (isset($_POST['products_previous_image']) ? $_POST['products_previous_image'] : '');
						  }*/

	}
	//die($products_image_name);
	break;
	if (isset($HTTP_POST_VARS['products_image']) && tep_not_null($HTTP_POST_VARS['products_image']) && ($HTTP_POST_VARS['products_image'] != 'none')) {
	  $products_image_name = $HTTP_POST_VARS['products_image'];
	} else {
	  $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');
	}
		$products_image_name = htmlspecialchars(stripslashes($products_image_name));
	  $products_image_name = strstr($products_image_name, 'src=');
	  $products_image_name = ereg_replace('src="', '', $products_image_name);
	  $products_image_name_end = strstr($products_image_name, '"');
	  $products_image_name = ereg_replace($products_image_name_end, '', $products_image_name);
	  $products_image_name = ereg_replace(DIR_WS_CATALOG . DIR_WS_IMAGES, '', $products_image_name);
	break;
	// ########## [Delaballe] END - ADD FCKeditor ##########

  case 'insert_product':
  case 'update_product':
  // ########## [Delaballe] ADD FCKeditor ##########

 

But if i write in description :

blabla

 

blabla bla

 

i show this in prewiew:

_p_blabla_/p_ _p align="center"_blabla bla_/p_

Link to comment
Share on other sites

  • 2 weeks later...

-Description product HTML -> you can do it by your self

Forgiveness for my English. Afflicted but I do not arrive there, nor with fck editor. I does not understand that it is done at the base, because I do not see the interest to have to correct by the administration. Could somebody explain once how to make? If is needed it I would add it with the contrib, and if I manages to make function fck editor with too.

Autre chose j'ai une erreur quand je valide l'annonce:

1054 - Unknown column 'language_id' in 'where clause'

select categories_id from categories where categories_id = '284' and language_id = '1'

[TEP STOP]

Link to comment
Share on other sites

I am looking to use this wonderful contribution to allow customers to add products to a store but also charge them for doing it. I need to be able to charge them different amounts depending on the fields they add information to such as

Product name and description would cost $20

Product name, description and an image would cost $30

etc.

 

I can create separate pages for each of these as there won't be to many but I need to pass the price variable to the payment processor. Any ideas would be helpful.

 

Thanks :)

Link to comment
Share on other sites

  • 2 weeks later...

Hi ,

Thanks for the great contrbution I'll be waiting for a long to it.

So,in my site how can I modify the output of function that will display the categories in the select field "Products Category:" so that the user can select it using radio buttons?or,what about creating a direct link that will preselect the category chosen from the customer in this add new product form?

Any help would be greatly appreciated :'(

 

problemje3.th.jpg

Link to comment
Share on other sites

  • 4 weeks later...

I mean... I don't know how to code it, but we could mark the inserted product with the seller's 'customers_id' and then display 'entry_city' and 'entry_state' in a product field. This way, the buyer could choose a closer seller to buy from.

Link to comment
Share on other sites

  • 2 weeks later...
Hi ,

Thanks for the great contrbution I'll be waiting for a long to it.

So,in my site how can I modify the output of function that will display the categories in the select field "Products Category:" so that the user can select it using radio buttons?or,what about creating a direct link that will preselect the category chosen from the customer in this add new product form?

Any help would be greatly appreciated :'(

 

problemje3.th.jpg

You need to create function (for example you can look at /includes/function/html_output.php)

that will do it and replace code at "account_add.php:353" tep_draw_pull_down_menu with your function

Link to comment
Share on other sites

Hi.

 

is there a way for visitor to enter a new product, cause I have removed the account creation.

 

any suggestion how to hack this?

remove all mention of user session check in files that included in.

Link to comment
Share on other sites

  • 5 weeks later...

Hello I just added this contrib to my site - its great in that it will do what I need - however I cant get it to work.... I have a few issues

 

As a customer (I already approved from admin side) when I go to add new products, I see two texts at the bottom "IMAGE_PREVIEW" and "IMAGE_CANCEL" (looks like I am missing some image). After entering all info for the product, when I click on the "IMAGE_PREVIEW" (expecting to go to a preview page) it just goes back to my home page.

 

You can try it here : http://softwaredrive.net

login as "[email protected]"

pass "test1" - I have approved add product.

 

On Admin Side 2 issues:

 

#1 - When I go to the Catalog, I do not see any products. I added a new product from admin side - it shows up when I browse as a user but I dont see it as admin.

 

#2 When I go to "Customers" module I get these warning messages. I went back and have verified that I put right things on correct line.

 

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/katbamna/public_html/softwaredrive/admin/customers.php on line 736

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/katbamna/public_html/softwaredrive/admin/customers.php on line 736

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/katbamna/public_html/softwaredrive/admin/customers.php on line 738

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/katbamna/public_html/softwaredrive/admin/includes/classes/object_info.php on line 17

Warning: Variable passed to each() is not an array or object in /home/katbamna/public_html/softwaredrive/admin/includes/classes/object_info.php on line 18

Edited by chirag11
Link to comment
Share on other sites

  • 1 month later...

Firstly....this is an awesome idea!! Which I guess is why people are still using this contrib after 2 + years.

 

I just have a few questions which I hope someone can answer;

 

1) How are payment made....are they made direct to the person who listed the item for sale? Can commission rates be set?

 

2) Does the item have a symbol or something to indicate that it is for sale from a partner, and not directly? In much the same way as Amazon do.

 

Thanks guys.

Link to comment
Share on other sites

  • 2 weeks later...

Hello!

 

1. Prompt how to make please so that the manager should not approve each user. (Administrator must approve your account for this function)

 

2. Where I can edit the goods added by the user?

 

3. Whether there is an opportunity to make so that after each sale to shop from it the user the sold goods paid automatically %?

 

thx

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