You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Dweeves - We have some extra text attributes for InStore stock qtys. We were running 0.7.18 and found that when Stock Qty reached 0, it was not updating the field because I guess it read it as a null value and didn't update.
We migrated from 0.7.18 to 0.7.19_git as it seemed to resolve our issue with 0's in text fields. The problem of course is that in PHP 0 == false == null.
in 0.7.19_git, you're now handling it differently for text fields so that if the field is empty, it REMOVES the attribute, which has caused us a bit of grief, because we have Product Managers that fill in the gaps where our automation can't work due to insufficient information from the ERP system.
What's happened now is that Magmi removed that information where we sometimes filled with Magmi and sometimes left it alone for the Product Managers to fill for us. Now when we left it empty, Magmi removed these attribute options from the MultiSelect.
Line 739 of productimportengine.php has if($ovalue=="MAGMI_UNHANDLED") then sets $ovalue as false; but it seems MAGMI_UNHANDLED is not actually implemented anywhere and additionally, once we implemented it in magmi/plugins/inc/magmi_defaultattributehandler.php, then approx Line 768 if ($ovalue==null) evaluates false as null and still deletes it. So needs to be evaluated with ($ovalue===null).
I'm not clear if I've really got my head around this yet but I have a working solution at the moment where I can choose to ignore / not update, using MAGMI_UNHANDLED instead of a blank field. I will try and put it all together in a pull request.
The text was updated successfully, but these errors were encountered:
@dweeves - I'm sorry to waste your time. I've been using Magmi for ~3 years and have no idea how I'd never come across this feature. How could I ever doubt you'd have this covered? Thanks for the response though, I really appreciate it
Hi Dweeves - We have some extra text attributes for InStore stock qtys. We were running 0.7.18 and found that when Stock Qty reached 0, it was not updating the field because I guess it read it as a null value and didn't update.
We migrated from 0.7.18 to 0.7.19_git as it seemed to resolve our issue with 0's in text fields. The problem of course is that in PHP 0 == false == null.
in 0.7.19_git, you're now handling it differently for text fields so that if the field is empty, it REMOVES the attribute, which has caused us a bit of grief, because we have Product Managers that fill in the gaps where our automation can't work due to insufficient information from the ERP system.
What's happened now is that Magmi removed that information where we sometimes filled with Magmi and sometimes left it alone for the Product Managers to fill for us. Now when we left it empty, Magmi removed these attribute options from the MultiSelect.
Line 739 of productimportengine.php has if($ovalue=="MAGMI_UNHANDLED") then sets $ovalue as false; but it seems MAGMI_UNHANDLED is not actually implemented anywhere and additionally, once we implemented it in magmi/plugins/inc/magmi_defaultattributehandler.php, then approx Line 768 if ($ovalue==null) evaluates false as null and still deletes it. So needs to be evaluated with ($ovalue===null).
I'm not clear if I've really got my head around this yet but I have a working solution at the moment where I can choose to ignore / not update, using MAGMI_UNHANDLED instead of a blank field. I will try and put it all together in a pull request.
The text was updated successfully, but these errors were encountered: