2

I am thinking of setting a product that is only valid from a period of time eg:

product a from 15january2016 til 15january 2018, upon this setup it will be available from that period of time.

also when creating the product a, I can set the time of the product available more of like a timeslot like : 9:00am - 10:00am - 3booth 10:00am -11:00am - 3booth etc

user will be able to choose more than one.

example :

A buy 9am-10am - 3booth A also buy 10am-11am - 1booth

so A can buy 3stock from a timeslot and also buy another timeslot with only 1 stock. and how do we proceed with this option? can product attributes help?

this product is going to be available daily.

more of like selling practice session.

my question are : can this be achieve by attributes? for timeslot? and since there is only 3 classes, and this each class can only be taken by one person 1hour, is there any solution for validation of stock?

I am brainstorming of doing custom attributes but can not get away of thinking how to handle the stock of the class available or not?

some ideas would be great

thank you!

1

The following four fields would be easily possible for making "timeslot" products:

  1. Start - date field, single date (not a range)
    You want a single date field because views will be more straightforward when not dealing with ranges on one field. It's much easier to do two fields and have two filters than it is to have one field with a range filter (date supports both use cases).
  2. End - date field, single date (not a range)
  3. Timeslot - Product title would be easiest OR taxonomy reference
    The taxonomy route would allow you to make the timeslots fieldable and help you connect products of the same timeslot (if it is helpful to have all 9am - 10am products in a single list).
  4. Stock - You could use commerce_stock to create a single stock availability OR you could just disable the product on checkout.

So, the simplest route would only include a "start" and "end" date field with the product title being the "timeslot" and using the "status" of products as a simple "single availability" flag.

Hope that helps!

2
  • Hi joshmiller, thank you for giving out some clues, but current situation, the products(course) is available everyday and every timeslots for example like 9:00am - 10am it will have 3booth, and one user can book it all and that means each timeslot will have each own different stocks. and is allowed to be purchased like : A buy 9am-10am 3slot/booths, then A also buy 10am-11am but only 1slot/booth, so the stock will automatically deducted from the available date. and I dont think timeslot can be created via taxonomy, can we use maybe product attributes for it?
    – Boby
    Jan 18 '16 at 9:58
  • Not sure I follow ... feel free to post a visual or some more detailed information.
    – joshmiller
    Jan 18 '16 at 14:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.