Hi Haven't had a chance to play around with the module but looking at the code it looks like something lots of people are intrastate in and similar to what I have been planning.

Changes I can think of:

  • Better integration using stock rules - no need for a hook_form_alter
  • Move the waitlist out of the product and into an entity of its own (or a new schema table)
  • Remove the reliance on features

Is this something you would be interested on working together on?

Comments

amitaibu’s picture

Hi Guy!

Better integration using stock rules - no need for a hook_form_alter

Maybe a better approach would probably be hook_field_attach_form_alter(), and a the flag link instead of the "Add to cart"

Move the waitlist out of the product and into an entity of its own (or a new schema table)

The wait list, is actually using flag.

Remove the reliance on features

Correct

guy_schneerson’s picture

Hi @Amitaibu
The stock module provides rules conditions and actions to handle out of stock or other add to cart form states.

Conditions:
Out of the box rules use the simple stock (local storage) to perform the checks but users can alter the business logic by configuring the rules.

Actions:
It also provides an advanced cart configuration rule action that can be used to call alternative form actions.

So if the waitlist provided a function

function waitlist_add_to_list($form, &$form_state) { 
...
}

this can be called directly from the stock_rules

I would be happy to refactor the code and build the needed rules for this.

johnnydarkko’s picture

Issue summary: View changes

I know it's been a while, but has there been any progress with this?