Hi all,
my shipping module is finished and working correctly, but I found a bug today.
I have a tab for some misc settings on the product edit screen. If you edit a product and make a random change (not related to my module), my module's `Module_Product_Update` runs, and accidentally blanks out the entries in the DB for that item.
I was thinking about checking to see if my module's tab is the active tab, but I suppose a user could make some changes to my shipping settings, then tab over to something else and make some changes, and then click update from there (expecting that all their changes from every tab will be saved).
I could also check to see if the data for my module is blank, and then do nothing. But what if the user really does want to blank out the existing data..
Anyway, I'm sure there's a best practice for handling this that I'm missing? I checked the LSK but nothing there was helpful for this situation
my shipping module is finished and working correctly, but I found a bug today.
I have a tab for some misc settings on the product edit screen. If you edit a product and make a random change (not related to my module), my module's `Module_Product_Update` runs, and accidentally blanks out the entries in the DB for that item.
I was thinking about checking to see if my module's tab is the active tab, but I suppose a user could make some changes to my shipping settings, then tab over to something else and make some changes, and then click update from there (expecting that all their changes from every tab will be saved).
I could also check to see if the data for my module is blank, and then do nothing. But what if the user really does want to blank out the existing data..
Anyway, I'm sure there's a best practice for handling this that I'm missing? I checked the LSK but nothing there was helpful for this situation
Comment