Comments (10)
Perhaps related to my problems at #62 and #63 ...
from magmi-git.
Did you get a solution to it ?
from magmi-git.
Dweeves, please address this issue.
from magmi-git.
@dweeves Please advice. I'm stuck due to this issue.
from magmi-git.
Hi, from what i can tell i'm experiencing the same issue (or a very similar one!) to Saurabhliv.
I can also confirm that this is a different issue to that fixed by Ckressibucher in his patch.
A brief description of the issue is: Importing certain dropdown (ie: select - and thus likely also multiselect) fields does not work as expected. Magmi creates unnecessary extra databases rows. Then when querying that dropdown's field the newly created option_id is returned rather than the value specified in the CSV.
In my case I noticed this behaviour with an attribute that was added by the Mageworx Custom Price extension and theorize that the issue may be specific to attributes that use a source model.
I've now spent a good few hours digging into the issue and here's what i've found...
Within my CSV is a column called: 'custom_price_allow' with the names 'Use Config / Yes / No'. These map to the integer values '2 / 1 / 0'.
In my 'custom_price_allow' column for each product I enter an integer (ie: 1 to represent Yes).
After importing my CSV file I can see that Magmi has added new rows to the tables:
eav_attribute_option & mag_eav_attribute_option_value
However, as the names & values are already fetched via a source_model I am not certain that creating these rows is necessary.
The main meat of the problem though is that when fetching the value of 'custom_price_allow' Magento returns the value of option_id that Magmi just created in the 'mag_eav_attribute_option_value' table rather than the value given in the CSV file.
I have tried adding a built-in dropdown field (tax_class_id) as a column in my CSV and this is not subject to the same behaviour and is imported normally - and no superfluous database rows created.
This leads me to believe it may be an issue with third party module generated attributes. It's possible that these modules are somehow incorrectly configured however it seems perhaps more likely that this is a bug and that Magmi does not handle these attributes correctly.
Finally if I go into the database and change the type of the 'custom_price_allow' field from 'Select' to 'Text' and then import, everything works correctly and fetching the value of the 'custom_price_allow' works as expected.
Any more info i can provide just ask and will be happy to provide.
Also many thanks for creating Magmi - even for organisations like ours with only a few products it's still super useful :)
from magmi-git.
@bit32 Thanks for your investigation. I took it a little bit forward.
Indeed, Magmi is handling tax_class_id attribute differently than other attributes with custom source_model.
The code is in https://github.com/dweeves/magmi-git/blob/master/magmi/plugins/inc/magmi_defaultattributehandler.php#L313
As you can see, Magento build in source models are handled in this method, but custom source models are triggering the "default" part of the swich thus, creating new attribute value in the db.
from magmi-git.
Hi everyone !
Any news about this problem ? How did you guys handle it ? I need at least a workaround to keep going on my project. I even threw a message in a bottle there if you prefer...
@dweeves any thought about it ?
from magmi-git.
Hi,
Just wondering if anyone has a solution or workaround.
I am using a custom Brands extension, and the attribute is populated from a source_model
I've tried everything i can think of with Magmi and just cannot get the relationship to work. Pretty certain its the same problems as the others in this thread.
How did you resolve it, anyone?
This is the definition of the field in the extension...
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$setup->addAttribute('catalog_product', 'vesbrand', array(
'label' => 'Product Brand',
'type' => 'int',
'input' => 'select',
'source' => 'ves_brand/system_config_source_ListBrand',
'visible' => true,
'required' => false,
'position' => 10,
));
from magmi-git.
I added support for udropship_vendor attribute to magmi_defaultattributehandler.php.
See: mobilizer@e9a14fa
I haven't found a more generic way. (Generic mapper itemprocessor plugin is not enough, since Magmi always tries to add option values, for unknown values. And it does not find the values from the source_model.)
Feedback welcome!
from magmi-git.
I added support for udropship_vendor attribute to magmi_defaultattributehandler.php.
See:
mobilizer/magmi-git@e9a14fa
Thanks ! It worked great !
from magmi-git.
Related Issues (20)
- Error with attribute set association
- Attributes Options needs resaving
- can't check Magmi Magento Reindexer v1.0.3a
- Optimize Magmi HOT 2
- Weee Tax
- Is Magmi compatible with PHP 7.2?
- Magmi stalls on the first line, only sometimes errors HOT 3
- Datapump Ingest returning empty value for [ok]
- PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/cl_prod/vendor/dweeves/magmi/magmi/inc/magmi_mixin.php on line 28
- password stripped of capitals/uppcase
- Magmi Login fails after SUPEE-11219 update? HOT 3
- PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/clients/client2/web2/web/magmi/plugins/extra/itemprocessors/valuetrim/valuetrimmer.php on line 37
- If the image title is the same, it doesn't replace the old image when imported. HOT 5
- Magmi keeps asking for login (M 1.9.4.4) HOT 1
- Products Salable Quantity Remains '0' While Importing New Products.
- Magmi - Imageattribute processor is not working with WEBP images
- Magmi don't work in magento 2.3.7 and php 2.4 HOT 2
- Installation issues Nginx HOT 1
- unable to download image from external URL
- Not updated inventory in the inventory_source_item table while importing Magmi HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magmi-git.