View Full Version : Possible MM5 bug
Kent Multer
06-14-06, 07:46 AM
Hi --
I'm testing a new module that uses vis_product, and all those functions are working fine. I just tried deleting a product by clicking its Remove checkbox in the Products list, and found that the Module_Product_Delete function was not called. I suppose I could fix this by adding the vis_productbe feature to the module, but this seems like a bug.
My module doesn't have any other use for the vis_productbe feature. If I have to add it to the module just to cover this one case, then it might as well not be a separate feature, since it would make no sense for any module to have vis_product unless it also has vis_productbe ... or am I missing something?
Thanks --
Not a bug; that is the way miva merchant works. You use vis_productbe if you want the module to have action at that particular batch edit/delete screen. If your module is only to be seen as tabs at the top of the product edit screen, you don't need vis_productbe. But if there is a reason you would want to have your module act when people edit in the batch edit mode or delete in the batch edit mode, then you use vis_productbe. Not all modules need functionality at the vis_productbe.
If you do use it, make sure you include all the batch edit functions. I had a customer just a couple days ago that got an error when deleting a product from the batch screen. She had over a dozen of my modules so she assumed it was one of my modules. She also mentioned she had two other 3rd party modules. I already knew it was not one of my modules but had to take the time to check. None of mine had the problem. That left the others. The problem module was identified and I assume she got an update from that developer. I hope that update was sent to all users of that module since debugging takes time for each developer who gets one of those "help, my store......." type emails.
Kent Multer
06-14-06, 03:01 PM
In version 4.x, if you delete products using the batch-edit screen, Merchant calls Module_Product_Delete for each one. You don't have to do any explicit programming to make sure that this function gets called. When a customer deletes a product, whether they do it with the Delete button or the batch-edit checkbox, Module_Product_Delete gets called. This is intuitively correct. Obviously customers expect the same behavior in either case.
In v5, this new behavior makes it pointless for the vis_productbe feature to be separate from vis_product, because if your module includes vis_product, you MUST also support vis_productbe. Otherwise, customers won't get the proper behavior when they delete products from the batch-edit screen.
So either way, it seems to me that this is a bug. Someone else can choose which way to fix it: either by merging vis_productbe into vis_product, or by fixing the batch-edit-update action to call Module_Product_Delete. I suppose similar mis-behavior will be found for the other batch-edit features (customer, category, affiliate). Anyone noticed anything?
Thanks --
The whole purpose of breaking the MM5 into so many features was to eliminate redundant, not necessary calls, to functions that are not needed in specific modules. Customer don't delete products in batch edit. STORE OWNERS delete products in batch edit. That said, NOT ALL modules that support vis_product need to support vis_productbe. Your original assumption is not exactly correct all of the time. It is NOT a bug. It is an efficiency feature.
As for 4.x, there were functions for batchedit/delete and functions for direct product edit/delete. That is no different from 5.x. The "features" determine which you are supposed to include. If not needed, rather than including 8 or 10, you can cut it down to 4 or 5.
FWIW: you put this thread in the wrong forum. It is MM5 specific.
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.