Jump to content
empo

Customer Add Product

Recommended Posts

hi

i installed this contribution.

 

my question is that how can we approve the customer form admin section.

 

when i login in admin section and click on customers i go this error

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in C:\wamp\www\os\catalog\admin\customers.php on line 736

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\wamp\www\os\catalog\admin\customers.php on line 736

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\wamp\www\os\catalog\admin\customers.php on line 738

 

Warning: reset() [function.reset]: Passed variable is not an array or object in C:\wamp\www\os\catalog\admin\includes\classes\object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in C:\wamp\www\os\catalog\admin\includes\classes\object_info.php on line 18

 

help needed its urgent

 

Thanks in advance

Share this post


Link to post
Share on other sites

Not able to find the add product button after changing the required files.

 

Where can I find the required button /lin k to add a product

 

 

Thanks

Saurabh

 

 

This contribution make ability to customer add products to your shop.

Products must be approve by administrator.

 

Download here

Share this post


Link to post
Share on other sites

I am new to posting questions. I hope I have done this right!

 

I have two issues with the customer add product contrib. The one BIG issue is when I try to add a new product or manage a product and hit update/insert it takes me to the preview screen but then when I try to do further it says that the page isnt redirecting properly. It adds the product but I want it to redirect my customers to either the account.php or account_add.php

 

The second problem is in the admin. All products say that they are submitted by the admin. No matter who I sign in as it always says that they are submitted by the administrator.

 

Some one please help. THANK YOU in advance!

Edited by hawkinstws

Share this post


Link to post
Share on other sites

Never mind on the last post that i added. I have manage to figure out those problems.

 

I do have another question! Has anyone installed more pics contrib to this contrib. I have it installed currently but I can not get it to work for the customer add product.

 

PLEASE HELP!

Share this post


Link to post
Share on other sites

Hi, when i try to ADD PRODUCT

 

addproduct.jpg

 

shows this page.

 

errorkf.jpg

 

and when i try to MODIFY PRODUCT

 

modificarg.jpg

 

show this error

 

error2i.jpg

 

AND when i try to endable permision in ADMIN

 

adminj.jpg

 

shows this error

 

admin2r.jpg

 

I dont know whats happended

 

How can i CHANGE permissions to THUMB folder? im ussing windows xp, is a localhost with oscommerce-2.2rc2a EasyPhp 2.0.0

 

Sorry 4 my english...

 

Thanks,

 

Juan

Share this post


Link to post
Share on other sites

Anyone searching for it. I have been working on the problem that on account_manage.php the preview and cancel button were not working but redirecting to the index page. It seems that the oscid is not requested on the start of the file which, after testing, seems nessecary for the links to work correctly.

 

Therefore in account_manage.php:

 

find:

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

 

Directly after add:

 

$osCsid = (isset($_REQUEST['osCsid']) ? $_REQUEST['osCsid'] : '');

 

Took me a while to figure out, so better post it here and save someone else hours of searching. :)

Share this post


Link to post
Share on other sites

Hi.

I've tried this conribution a few times now, but with no success. And i think im ready to pay for it if anyone could fix it for me.

I have a heavily modified osCommerce RC2 (such as Product Expire Date, Product Start Date, Product Specification, random image filenamne and so on).

 

If anyone feel like making this contribution work with my modified files, they are welcome to PM me with a price. Make sure to include references in the PM, cuz i wont buy anything from someonte that dont have a few happy customers already.

 

Feel free to PM me.

 

 

This is what i want

• Customer can add products (But must be approved by an admin)

• Customer can edit thier own products (But must be approved by an admin)

• Products to be approved needed its own subcategory in the catalog section of the admin area

• When another customer buy that product, the owner of the product and the admin gets an order confirmation

• Customer can only mark them self as "manufacturer" (not a big deal maybe)

• Addons such ad Product Expire Date, Product Start Date, Product Specification, random image filenamne and so on must be compatible with this addon

• Support for multilanguage (English + Swedish. However, i can translate to Swedish my self)

Edited by Zane86

Share this post


Link to post
Share on other sites

Never mind on the last post that i added. I have manage to figure out those problems.

 

I do have another question! Has anyone installed more pics contrib to this contrib. I have it installed currently but I can not get it to work for the customer add product.

 

PLEASE HELP!

 

HOW DID YOU FIX THE REDIRECTING ERROR? When i hit back or update on the preview page, i am taken to the Shopping Cart page!!!. Please help.

Share this post


Link to post
Share on other sites

When i click on "back" or "update" on the Preview page of CAP, i keep getting redirected to the Shopping Cart page! Does anyone know why this is happening? Does it have to do with the session id or SSL? I have tried everything for days now with no success.

Thanks in advance.

Share this post


Link to post
Share on other sites

Stupid strikes again! Yours truly took the liberty to change the action event from product_update to update_product...which probably interfered with a higher level action called from application top and thus kept redirecting me to the shopping cart.... stupido

Share this post


Link to post
Share on other sites

Anyone solved the problem with the html-formatting when you add a product. It looks like this for mer when a customer hits preview (an it looks like this when it's inserted too).

 

*************************

_p_Product description goes here_/p_

_p__b_With a BOLD textline, it looks like this_/p__/b_

*************************

 

Hope anyone have solved it yet..

 

Cheers

Edited by Zane86

Share this post


Link to post
Share on other sites

Anyone solved the problem with the html-formatting when you add a product. It looks like this for mer when a customer hits preview (an it looks like this when it's inserted too).

 

*************************

_p_Product description goes here_/p_

_p__b_With a BOLD textline, it looks like this_/p__/b_

*************************

 

Hope anyone have solved it yet..

 

Cheers

 

Just solved it.

 

Open includes/funcions/database.php

 

Find:

 function tep_db_prepare_input($string) {
   if (is_string($string)) {
     return trim(tep_sanitize_string(stripslashes($string)));
   } elseif (is_array($string)) {
     reset($string);
     while (list($key, $value) = each($string)) {
       $string[$key] = tep_db_prepare_input($value);
     }
     return $string;
   } else {
     return $string;
   }
 }

 

Replace with...

  function tep_db_prepare_input($string) {
   if (is_string($string)) {
     return trim(stripslashes($string));
   } elseif (is_array($string)) {
     reset($string);
     while (list($key, $value) = each($string)) {
       $string[$key] = tep_db_prepare_input($value);
     }
     return $string;
   } else {
     return $string;
   }
 }

Share this post


Link to post
Share on other sites

Hi there.

Please. Do anyone know if i can limit the customer to only choose specific categorys that i choose? (same with manufacturers would be great).

 

Im almost ready to pay for it.

Share this post


Link to post
Share on other sites

Hi,

 

Nice contribution Idea, I like it and i wish i have good information to help!

 

I have question about if customer upload new products and he want to sell him

products via my store, how i can let him know about the sales directly, if him

product sold?

 

Regards

Share this post


Link to post
Share on other sites

Hi,

 

Nice contribution Idea, I like it and i wish i have good information to help!

 

I have question about if customer upload new products and he want to sell him

products via my store, how i can let him know about the sales directly, if him

product sold?

 

Regards

 

Hi there.

I think it were supposed to work like that in a future release, however, this contrib aint in developent anymore. So we have to live on each others forumpost :(.

 

Its quite difficult to fix this contrib, but i post a few fixes that you have to do to make it work as is should here;

 

On account_manage.php, the preview and cancel button were not working but redirecting to the index page. 
It seems that the oscid is not requested on the start of the file which, after testing, seems nessecary for the links to work correctly.

Therefore in account_manage.php:

find:

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

Directly after add:


$osCsid = (isset($_REQUEST['osCsid']) ? $_REQUEST['osCsid'] : '');

 

When I try to add product using the admin, I can see the product info from the public but not in the Categories / Products field, which means I couldnt edit the contents.
go to phpmyadmin and change your customers_id for administrator to 0.

 

Category Fix in account_add.php

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

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

Replace this with

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

$chosencategory = $_POST['category_id'];

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


Share this post


Link to post
Share on other sites

HELP please

 

I have followed the install to the letter

 

1) See no changes in the admin side of my store

 

2) When logged in as Customer no add product in My Account Information

 

 

using oscommerce-2.2rc2a and CAP 1.4.3

Share this post


Link to post
Share on other sites

HELP please

 

I have followed the install to the letter

 

1) See no changes in the admin side of my store

 

2) When logged in as Customer no add product in My Account Information

 

 

using oscommerce-2.2rc2a and CAP 1.4.3

 

 

Sorted Add and Edit product not showing, but this has created a new problem "Administraion must approve your account for this to work" but cant find anywhere in Admin to approve users.

Share this post


Link to post
Share on other sites

Sorted Add and Edit product not showing, but this has created a new problem "Administraion must approve your account for this to work" but cant find anywhere in Admin to approve users.

Hi there. In the admin system. Go and Edit a customen. When editing a custumer, there will be à Field for "approve customer". Set this to yes.

 

Dont forget to fix à few things. You Will find a post from me in in this thread with à few fixes. CAP wont work without them

 

good luck

Share this post


Link to post
Share on other sites

When I follow the Instructions on line 157

[size="2"]## Find:

   $products_count = 0;
   if (isset($HTTP_GET_VARS['search'])) {
     $products_query = tep_db_query("select p.products_id, 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, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' order by pd.products_name");
   } else {
     $products_query = tep_db_query("select p.products_id, 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_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name");
   }

## To replace by:

   $products_count = 0;
   if (isset($HTTP_GET_VARS['search'])) {
     $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, p2c.categories_id 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 pd.products_name like '%" . tep_db_input($search) . "%' order by pd.products_name");
   } else {
     $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 p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name");
   }[/size]

 

The products stop showing up on the Admin side's categories & products listing (categories.php)

 

Is it safe to skip this step?

Linux Server

OScommerce RC2

SEO URLS 22d_9

Auto Backup Install V3.0

Customer Add Product 1.4.3

CKE Editor 3.2.1

Backup All Store Files V1.1

Dynamic sitemap v4 21

SEO_Assistant V 2.0


"I have no special talent. I am only passionately curious"

- Albert Einstein

Share this post


Link to post
Share on other sites

Go to phpmyadmin and change your customers_id for administrator to 0.

 

>_< -"DOH"


"I have no special talent. I am only passionately curious"

- Albert Einstein

Share this post


Link to post
Share on other sites

Hi there. In the admin system. Go and Edit a customen. When editing a custumer, there will be à Field for "approve customer". Set this to yes.

 

Dont forget to fix à few things. You Will find a post from me in in this thread with à few fixes. CAP wont work without them

 

good luck

 

Thanks found that out by trial and error.....

 

This is a Fantastic addon !!!

My congratulations to Empo and everyone here who has been of help !!!

Share this post


Link to post
Share on other sites

Has anyone fixed the preview problem? When I add a product with CAP, the body width expands greatly and it doesn't look good. Same thing happens in the Admin panel when adding products.

 

Any help will be appreciated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

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

Create an account

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

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×