ProductPromoWorker PROMO_GWP hard-codes a required inventory check
------------------------------------------------------------------ Key: OFBIZ-3634 URL: https://issues.apache.org/jira/browse/OFBIZ-3634 Project: OFBiz Issue Type: Bug Components: order Reporter: Adam Heath Attachments: PROMO_GWP_inventory_check.patch PROMO_GWP processing always requires the gifted item to have available inventory. There is no way to have that configurable, no way to have the free item get backordered. The attached patch removes the inventory check on *real* products, and instead created a new condition, PPIP_PRODUCT_INV, so that *any* promo can pass/fail based on an inventory check. I did not commit this patch, because the full fix would need to handle virtual products as well. I don't understand how PROMO_GWP works with virtual products when doing inventory, so I need help with that. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-3634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adam Heath updated OFBIZ-3634: ------------------------------ Attachment: PROMO_GWP_inventory_check.patch > ProductPromoWorker PROMO_GWP hard-codes a required inventory check > ------------------------------------------------------------------ > > Key: OFBIZ-3634 > URL: https://issues.apache.org/jira/browse/OFBIZ-3634 > Project: OFBiz > Issue Type: Bug > Components: order > Reporter: Adam Heath > Attachments: PROMO_GWP_inventory_check.patch > > > PROMO_GWP processing always requires the gifted item to have available inventory. There is no way to have that configurable, no way to have the free item get backordered. > The attached patch removes the inventory check on *real* products, and instead created a new condition, PPIP_PRODUCT_INV, so that *any* promo can pass/fail based on an inventory check. > I did not commit this patch, because the full fix would need to handle virtual products as well. I don't understand how PROMO_GWP works with virtual products when doing inventory, so I need help with that. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Adam Heath (JIRA) wrote:
> [ https://issues.apache.org/jira/browse/OFBIZ-3634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] > > Adam Heath updated OFBIZ-3634: > ------------------------------ > > Attachment: PROMO_GWP_inventory_check.patch > >> ProductPromoWorker PROMO_GWP hard-codes a required inventory check >> ------------------------------------------------------------------ >> >> Key: OFBIZ-3634 >> URL: https://issues.apache.org/jira/browse/OFBIZ-3634 >> Project: OFBiz >> Issue Type: Bug >> Components: order >> Reporter: Adam Heath >> Attachments: PROMO_GWP_inventory_check.patch >> >> >> PROMO_GWP processing always requires the gifted item to have available inventory. There is no way to have that configurable, no way to have the free item get backordered. >> The attached patch removes the inventory check on *real* products, and instead created a new condition, PPIP_PRODUCT_INV, so that *any* promo can pass/fail based on an inventory check. >> I did not commit this patch, because the full fix would need to handle virtual products as well. I don't understand how PROMO_GWP works with virtual products when doing inventory, so I need help with that. Scott, you originally commented when I asked about the PROMO_GWP inventory check. Could you look at this for me? I'd really appreciate it. Plus, anyone else who might like this fix finished. |
On 2/04/2010, at 10:59 AM, Adam Heath wrote:
> Adam Heath (JIRA) wrote: >> [ https://issues.apache.org/jira/browse/OFBIZ-3634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] >> >> Adam Heath updated OFBIZ-3634: >> ------------------------------ >> >> Attachment: PROMO_GWP_inventory_check.patch >> >>> ProductPromoWorker PROMO_GWP hard-codes a required inventory check >>> ------------------------------------------------------------------ >>> >>> Key: OFBIZ-3634 >>> URL: https://issues.apache.org/jira/browse/OFBIZ-3634 >>> Project: OFBiz >>> Issue Type: Bug >>> Components: order >>> Reporter: Adam Heath >>> Attachments: PROMO_GWP_inventory_check.patch >>> >>> >>> PROMO_GWP processing always requires the gifted item to have available inventory. There is no way to have that configurable, no way to have the free item get backordered. >>> The attached patch removes the inventory check on *real* products, and instead created a new condition, PPIP_PRODUCT_INV, so that *any* promo can pass/fail based on an inventory check. >>> I did not commit this patch, because the full fix would need to handle virtual products as well. I don't understand how PROMO_GWP works with virtual products when doing inventory, so I need help with that. > > Scott, you originally commented when I asked about the PROMO_GWP > inventory check. Could you look at this for me? I'd really > appreciate it. smime.p7s (3K) Download Attachment |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853269#action_12853269 ] Scott Gray commented on OFBIZ-3634: ----------------------------------- Here's my understanding of what the new condition does: Get all productIds attached to the condition and for each one get the sum of the quantity in the cart plus the condition's condValue and check that at least that amount is available in inventory, if there is not enough inventory for all of the condition products then the condition will not be satisfied. For virtual products your condition probably isn't handling them correctly, if a virtual product is included in the condition then any variants in the cart will contribute to the quantityNeeded but the problem is that isStoreInventoryAvailable always returns "N" for virtual products. Even if the above is fixed, it gets more complicated when you get to the gift with purchase action because it won't know what variant products to make available. The current process is that the variants are gathered up and inventory checked (excluded if it fails), the first variant is grabbed from the set and added to the cart but the other options are made available to the shopper so they can select a different variant if desired. The problem here is that if a virtual was put into your condition then the action won't know about it and won't know whether it should be doing an inventory check on the variant or allowing it to be back ordered. The only solution I can think of at the moment is to: - Have the condition check each variant for quantityNeeded instead of checking the virtual, do not return false unless ALL of the variants fail the test (i.e. only one variant need pass the condition) - On the GWP action, during optionProductIds iteration do the following: -- if the option is a variant product then it will need to lookup the PPIP_PRODUCT_INV (if there is one) and handle the following scenarios: --- If the variant was in the condition then leave it in the set and continue --- If the variant's virtual was in the condition then run the condition inventory check against the variant and remove it if it fails Additionally it looks like there is a bug in GWP action where if getPromoRuleActionProductIds returns any virtual products then currently they are excluded because the inventory check always fails and I'm not sure what will happen when the inventory check is removed. Ideally they would be handled in the same way as when a virtual is explicitly set on the ProductPromoAction.productId field. > ProductPromoWorker PROMO_GWP hard-codes a required inventory check > ------------------------------------------------------------------ > > Key: OFBIZ-3634 > URL: https://issues.apache.org/jira/browse/OFBIZ-3634 > Project: OFBiz > Issue Type: Bug > Components: order > Reporter: Adam Heath > Attachments: PROMO_GWP_inventory_check.patch > > > PROMO_GWP processing always requires the gifted item to have available inventory. There is no way to have that configurable, no way to have the free item get backordered. > The attached patch removes the inventory check on *real* products, and instead created a new condition, PPIP_PRODUCT_INV, so that *any* promo can pass/fail based on an inventory check. > I did not commit this patch, because the full fix would need to handle virtual products as well. I don't understand how PROMO_GWP works with virtual products when doing inventory, so I need help with that. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |