How to assign the single product to the multiple vendors

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
hello everyone,

I am new to nopcommerce  i want to assign a single product to the multiple vendors for that i have done the following works:-

1. firstly i have created 5 vendors.
2. on product adding page convert the dropdownlist(single selection) to the multiple selection (but when i select the multiple values it shows that vendorid must be a number, for solving this issue i have convert the data type of vendorId from int to string in Product.cs class.
3. After converting the value to string from int i am facing the problems:

Probles are now is unable to run the project and gettiing the errors like:-

Metadata file 'D:\NopTest\nop_3.60_Source\Libraries\Nop.Services\bin\Debug\Nop.Services.dll' could not be found  D:\NopTest\nop_3.60_Source\Presentation\Nop.Web\Administration\CSC

Metadata file 'D:\NopTest\nop_3.60_Source\Presentation\Nop.Web.Framework\bin\Debug\Nop.Web.Framework.dll' could not be found  D:\NopTest\nop_3.60_Source\Presentation\Nop.Web\Administration\CSC

if i forcly run the project and try to access the product page:

Errors:-
Could not load file or assembly 'ImageResizer, Version=3.4.3.103, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'ImageResizer, Version=3.4.3.103, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Thanks
sandeep kumar
8 years ago
sandeep.tech2globe wrote:
hello everyone,

I am new to nopcommerce  i want to assign a single product to the multiple vendors for that i have done the following works:-

1. firstly i have created 5 vendors.
2. on product adding page convert the dropdownlist(single selection) to the multiple selection (but when i select the multiple values it shows that vendorid must be a number, for solving this issue i have convert the data type of vendorId from int to string in Product.cs class.
3. After converting the value to string from int i am facing the problems:

Probles are now is unable to run the project and gettiing the errors like:-

Metadata file 'D:\NopTest\nop_3.60_Source\Libraries\Nop.Services\bin\Debug\Nop.Services.dll' could not be found  D:\NopTest\nop_3.60_Source\Presentation\Nop.Web\Administration\CSC

Metadata file 'D:\NopTest\nop_3.60_Source\Presentation\Nop.Web.Framework\bin\Debug\Nop.Web.Framework.dll' could not be found  D:\NopTest\nop_3.60_Source\Presentation\Nop.Web\Administration\CSC

if i forcly run the project and try to access the product page:

Errors:-
Could not load file or assembly 'ImageResizer, Version=3.4.3.103, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'ImageResizer, Version=3.4.3.103, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Thanks
sandeep kumar

Do you chane product.cs of Nop.Core.Domain? If you change at that place replace with previous data type. I think it will solve your error
8 years ago
mr.annik yes i have done that what you are saying but my issue is not that my project is not running, my issue is that i want to assign a single product to the more that one vendor in nopcommerce.

is it possible in nopcommerce by any kind of modification or changes if yes then please suggest me few idea...


thanks
sandeep
8 years ago
sandeep.tech2globe wrote:
mr.annik yes i have done that what you are saying but my issue is not that my project is not running, my issue is that i want to assign a single product to the more that one vendor in nopcommerce.

is it possible in nopcommerce by any kind of modification or changes if yes then please suggest me few idea...


thanks
sandeep

Yes everything is possible in nopcommerce. First you have to think in which way you want to get goal. Is it by creating plugin or by customizing core code? I think you want do it by customizing core code. Nopcommerce is code first based database. Currently the relation between  product and vendor is one to many. Now you have to make relation between many to many. And after every change Nop.core.domain you have to create new database. you cant use old database with new modified nop.core.domain.
8 years ago
yes you are right but currently the relation between in nopcommerce is one to one (we cant assign a product to more then one vendors) there is only one vendorid can be assign to the single product .

i want to assign the more then one vendorid or vendor to the perticular single product..can you guide me how is it possible ...????



thank you
sandeep kumar
8 years ago
sandeep.tech2globe wrote:
yes you are right but currently the relation between in nopcommerce is one to one (we cant assign a product to more then one vendors) there is only one vendorid can be assign to the single product .

i want to assign the more then one vendorid or vendor to the perticular single product..can you guide me how is it possible ...????



thank you
sandeep kumar

Currently relation between product and product tag is many to many. You can check how nopcommerce implement that. By seeing that implementation you can implement it.
8 years ago
Logically, I cant see how a product can have more than one vendor. by design product should and must have one vendor.
If u have 2 vendors for a product, who will ship it, who will get paid, who will set the price and so...



in any case if u still wish to do it, u should create a mapping table for vendor and products
8 years ago
hezyz wrote:
Logically, I cant see how a product can have more than one vendor. by design product should and must have one vendor.
If u have 2 vendors for a product, who will ship it, who will get paid, who will set the price and so...



in any case if u still wish to do it, u should create a mapping table for vendor and products

He has to change whole business of nopcommerce in order to complete thing.
8 years ago
hezyz wrote:
Logically, I cant see how a product can have more than one vendor. by design product should and must have one vendor.
If u have 2 vendors for a product, who will ship it, who will get paid, who will set the price and so...



in any case if u still wish to do it, u should create a mapping table for vendor and products


I agree with you hezyz on this. In a real world situation, it is not the best approach (not very feasible) for same product variant to have more than one vendor as it can cause disruption in the business flow: who will be paid , who will ship etc.


@sandeep - I do not know what your exact requirements are. But the best way to make customization for this kind of requirement is that create your logic in such a way that there is 1 top level product, each vendor can create their variant of product within that top level of product. So, your product page remains same but it shows the list of vendors that are offering it.

In this case, each vendor will have same product with different variant (as per their own inventory) and their own pricing. You can customize the solution in such a way that, these kind of products will have "Add to cart" button along with each vendor OR "Add to cart" button will ask custom "which vendor they would like to select".

This logic is based on same business flow as Amazon in which product page is same but different vendors offering the same products are displayed with their pricing and customer choose which vendor to go with. This process / flow will prevent you from having any issues regarding same order for same product variant between more than 1 vendor.

Hope it helps!
8 years ago
Thanks to all of you and @L K you are right i want the same custumization as you say used in amazon but i am totally new in nopcommerce soo need the guides to custumize the nopcommerce for the same product page with the differnt varinet by the different vendors can you pls guid or suggest me the best way for this...


thanks
sandeep
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.