Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Denotes a question related to the Magento products.
1
vote
2
answers
4k
views
"Invalid value for 'attribute'" (of type Yes/No) when creating product programmatically
When creating a product programmatically using the method described here, what format does the value need to be in for a Yes/No attribute type? … field:
0 and 1
1 and 2
'0' and '1'
'1' and '2'
So far all I am getting is the error "Invalid value for 'myAttributeName'"
I have scoured Google but somehow can't find an example of someone creating a product …
10
votes
Accepted
"Invalid value for 'attribute'" (of type Yes/No) when creating product programmatically
Well it turns out that the values need to be formatted as:
'Yes' or 'No' (including quotation marks / denoting a string)
Note:this is probably also dependant on the language being used for your store …