Dynamically Create Products In Real Time?

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

I'm new to nopCommerce so please be gentle :)

I have been tasked with creating essentially a shopping cart system for the company that I work for. The problem is that the "products" have got such a complex combination of options that it would be completely impractical to try to use the shopping cart configuration options to have the user create them.

The company currently uses a web form that allows the user to choose all of the options in a single page. This includes multiple "products within the same page with the options (hence the complexity). But I thought, what if I took all of the options that were chosen by the user and created them in a "description" field as a large, formatted text entry. Then, based on their choices, I know the cost of the item, and I can assign a product ID to that particular transaction. I am hoping that I can then pass all of that information into nopCommerce's cart, so I can then take advantage of the user sign in, discount/coupon codes, payments etc.

So I guess what I am asking is:

1) From an external site, can I send a call to the nopCommerce store that will create the product, then add that product to the shopping cart and redirect to the shopping cart to complete the transaction?

2) Can I make that created product not visible to the public catalog.

If anyone has done this or can think or something that would be helpful I'd really appreciate it!

Thanks,
Jon
9 years ago
I think I have a way to do #2 by changing the expiration date once the checkout has been completed. Still looking for help on #1 though :)
9 years ago
#1 can be done with a web service plugin.  There's an example in the core, but would need modifications to create product, add to cart, etc.
9 years ago
Sorry to be dim, but could you please let me know which web service plugin I would try to look at to modify?

Thanks :)
9 years ago
BTW I was able to get the add to cart functionality working using a plugin, so I'm good with that. I just need to be able to add the product, then I can redirect using that sku
9 years ago
Nop.Plugin.Misc.WebServices
9 years ago
Thanks!
9 years ago
Could you please shed some light on exactly how you did it? Just came to this post through googling, and found it very helpful.

Thanks so much in advance!
9 years ago
I'm not sure that it is the best way but I ended up having to add the product in a slq stored procedure then calling the add to cart function.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.