Product Prerequisites (FAQ)

Q. Can a product have multiple prerequisites?

A. Yes.

Q. Does the prerequisite work for Proforma invoices?

A. The purchased "prerequisite" product must NOT be in a Proforma invoice; the assumption is that if the product purchase is in a Proforma, we can't be sure it has been truly purchased.

Here is the SQL that fires to see if a customer has "purchased" the item:

SELECT ivd_prc_prd_key FROM ac_invoice_detail (nolock)LEFTJOIN ac_invoice  (nolock)ON ivd_inv_key=inv_key LEFTJOIN ac_invoice_detail_term  (nolock)ON trm_ivd_key=ivd_key WHERE inv_proforma=0 AND ivd_void_flag=0 AND ivd_prc_prd_key='935D3897-0E33-4EC9-8DC7-7F071C41F512' AND (ivd_cst_key='2931f7a5-6295-4b2d-82b2-49e641cb6a4f' OR ivd_cst_ship_key='2931f7a5-6295-4b2d-82b2-49e641cb6a4f') AND(trm_ivd_key ISNULLOR(trm_end_date ISNOTNULLAND trm_end_date>=getdate() OR trm_end_date ISNULLAND isnull(trm_num_issues_remain_cp,0)>0))

Q. I want to be able to prevent a person from registering for Event B unless they also registered for Event B. An I use Product Prerequisites for this?

A. No. Only certain Product Types can be a prerequisite. At this time, event registration cannot be a prerequisite.

Q. Can this be customized?

A. Yes. It appears that the GUI was designed to guide a user to actually purchase the prerequisite product. For this reason, when the feature was developed originally, only the more "ordinary" products could be a prerequisite, as it is simpler to sell those to a customer.

Regardless of the reason, if the "Add - Product Prerequisite" page is changed (specifically, the column definition of the oe_product_prerequisite.prq_prd_key_prerequisite Drop-down list needs to have a less restrictive filter) to allow for any product to be a prerequisite, then netFORUM will still enforce this restriction.

This test was confirmed by manually adding a row to oe_product_prerequisite in the back-end, with an event registration product key as the value in prq_prd_key_prerequisite and setting prq_allow_in_same_order_flag to zero. After doing this, and trying to register for the event fee whose product key is in prq_prd_key, netFORUM did not allow this:

Even if the "allow in same order flag" is set to "1" (to allow the prerequisite to be in the same order), it was still not possible to purchase the product even if you tried to purchase it in that order.

In essence, the underlying netFORUM object (technically Avectra.netForum.Components.AC.InvoiceDetail will enforce any kind of product to be a prerequisite, but the front-end GUI limits this. If you customize netFORUM by making a custom form, with a less restrictive Drop-down list for prq_prd_key_prerequisite, you can provide for this ability.