Forums / Developer / Shop - on the fly creation of a product

Shop - on the fly creation of a product

Author Message

Quoc Huy Nguyen Dinh

Thursday 19 May 2011 8:40:03 am

Hi

Being not familiar with the shop extension, I was wondering if this is possible.

Let say the shop is selling services not real products. There would be no object of type 'Product' in the CMS. But there is a form where you ask several things and depending on what the user is choosing in the form, the script would generate multiple fields: name of service, options, info about the user, info about the user related to the service, price etc... and push that virtual product in the basket.

Cheers

Marko Žmak

Thursday 19 May 2011 11:41:53 am

Hm, what about having a product class with fileds of type selection, object relation(s)...?

I supose having redundant fields in the product class wouldn't hurt much...

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Quoc Huy Nguyen Dinh

Friday 20 May 2011 6:28:44 am

The idea is to sell courses then ask questions such as:

  • how many people attending
  • name, firstname, age of each attendants
  • and other stuffs

But that would also be good for selling custom stickers for example where the text on the sticker is user input.

So it would be a product with information collection.

That's why It thought of collecting the infos and make then product.

I have'nt had the change yet to dig in the shop's code but maybe putting a product in the basket and then creates the order is just a matter of filling in the fields based on the product fields' value. Or are entries in basket and entries in order tightly bound to the product object itself.

Marko Žmak

Friday 20 May 2011 6:47:45 am

"

The idea is to sell courses then ask questions such as:

  • how many people attending
  • name, firstname, age of each attendants
  • and other stuffs

But that would also be good for selling custom stickers for example where the text on the sticker is user input.

So it would be a product with information collection.

That's why It thought of collecting the infos and make then product.

I have'nt had the change yet to dig in the shop's code but maybe putting a product in the basket and then creates the order is just a matter of filling in the fields based on the product fields' value. Or are entries in basket and entries in order tightly bound to the product object itself.

"

Maybe this could help to get you in the right direction:

  • http://share.ez.no/forums/developer/product-creation-before-adding-to-basket

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Quoc Huy Nguyen Dinh

Tuesday 24 May 2011 12:21:53 pm

Thanks Marko,

I will have a look at it.

scrieler _

Wednesday 06 July 2011 1:38:28 am

Every Object with price attribute is a product.

I would create a product with the needed options and would try to use the comment as information collector. This part u have to extend to your needs.