2

I've created a custom module on my Magento 1.4.0 website, which create a csv feed file with all products and you can add dynamically what product attributes to display in the file. Something like in the image below.

serialized

The field is created like this:

<product_attributes translate="label comment">
    <label>Product Attributes</label>
    <frontend_model>company_fullfeed/adminhtml_system_config_form_field_attributes</frontend_model>
    <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
    <sort_order>50</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>0</show_in_website>
    <show_in_store>1</show_in_store>
    <comment>Select product attributes that will be added to feed.</comment>
</product_attributes>

and all the attributes are saving in core_config_data as a serialized string.

The module works perfect, the file is created with products. The problem appears when I add more than 59 attributes, after that the file it is not generated. The problem seems to be from the unserialize method:

$mapValues = Mage::helper('core/unserializeArray')->unserialize($conf);

where $conf is the serialized array.

Does anyone know if there is a problem with Magento unserializing larger arrays?

0

After more detailed code debugging I just found out that the problem in my case is not about the unserialize method, that still works fine. The problem is that my module creates a very very big query with a lot of JOINs in it and I got this MySql error:

Too many tables; MySQL can only use 61 tables in a join

So, my solution was to divide the query in more queries and now everything works perfect.

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.