1

I am a newbie with Magento and am having trouble setting up a store and using Attributes. I've created an Attribute of "Compatible Models" to select which "models" each product in my store can work with / fit on. I have 92 different "models" in this Attribute for a product to possibly fit and while most only fit 10-15 models, there are some universal products that essentially can fit every "model." I've tried to select all 92 "models" in this Attribute and Save the product but each time it only selects some - but not all. In my case, it's 51 of the 92. I've found some solutions that make me think this is a database issue due to the total # of characters when you combine all of the 92 "models" being too large for a query but cannot be sure.

I came across this solution which seemed to semi-work but not really solve my issue. Instead it just created another issue:

https://stackoverflow.com/questions/12520702/maximum-of-selected-options-in-multiple-select-attribute-in-magento/

I just tried changing the attribute from "varchar" to "text" and it seemed to work however now these mapped attributes are not showing up in the Layered Navigation nor with my Attribute Splash Page extension which creates unique pages based on a selected Attribute option. While this solution seems to allow the individual product to display all of selected Attributes in the "Additional" tab of the individual product - it does not seem to allow for the filtering, sorting, etc by using the Attribute after changing from "varchar" to "text."

Any update on how I could accomplish this? I managed to get my Product to select up to 92 "models" using my Compatible Model Attribute before switching over the entity from "varchar" to "text" -- Is this due to some sort of MySQL database limit? I honestly need to use the Attributes for Filtering more than I need them to display in the "Additional" tab of the individual product.

Tips?

  • Table-based attributes are stored as comma-separated option IDs. Given that you have 92 optons, 9 options would take 2 characters (N, and NN), and 82 options would take 3 characters (NN,). This would require 264 characters in total, which is past the 255 limit in the catalog_product_entity_varchar table. Although, this means that it shouldn't stop at 51 options, it should stop at 88. Weird. Unfortunately, I don't really have a solution right now. Let me think - if anything comes to mind, I'll be sure to answer. – Agop May 13 '15 at 21:49
  • I thought that it had to do with my individual Attributes being fairly long in length in terms of their names - 10 characters on average - but didn't realize this has to do with their actual IDs and not Names. According to your answer, does that imply that the limited for total Attributes being selected for each product could be no more than 88? Seems like a flaw in the set-up if that's the case... – SPECTRECreativeCo May 14 '15 at 13:15
0

Why not switch the type from a text or varchar to an int and then add the attribute options as your models. Then you should be able to choose a multiple select option and choose more than one model at a time for a product.

|improve this answer|||||
  • Thanks for the tip! Would I change this in the MySQL database options like mentioned in the link I shared above? only instead of changing "varchar" to "text" it would change to "int"? Also, would this eliminate the 255 character limit as described by @Agop above? – SPECTRECreativeCo May 14 '15 at 13:16
  • Yeah I think so – David Manners May 14 '15 at 13:17
  • Awesome - I made this change and it definitely seems to work now. Side note: my Attribute Splash Page extension still doesn't work with either the original change from "varchar" to "text" nor with this new suggestion of "varchar" to "int". However, your solution David seems to at least allow my selected Attributes to be a filterable choice in the Layered Navigation which is better than what was happening before! Thanks again. I've contacted the developer of the extension to see where the incompatibility arises. – SPECTRECreativeCo May 14 '15 at 13:42
  • Wait, this is working for you? How is an int storing multiple attribute values? Any thoughts @DavidManners? – Agop May 14 '15 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.