Product Category Sort By Issues

Bug #601925 reported by Adam James
This bug report is a duplicate of:  Bug #495381: Issue when categories are ordered. Edit Remove
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Magento OpenERP Connector
Confirmed
Undecided
Unassigned

Bug Description

The handling of the product.category 'available_sort_by' and 'default_sort_by' is extremely fragile at present.

Magento modules can add custom fields to these attributes, and the 'available_sort_by' attribute is multi-valued. These issues result in various errors when trying to import product categories:

('ValidateError', 'The value "vote_rating" for the field "default_sort_by" is not in the selection')

If a category has more than one value for 'available_sort_by' the code tries to write a list into the selection field, causing a similar error to the one above. I have worked around this temporarily by changing the import mapping code to:

result=(type(ifield)==list) and [('default_sort_by',ifield[0])] or [('default_sort_by',ifield)]

I have had to manually amend the selection field definition in product.py to fix the first error.

My suggestion would be to have 'available_sort_by' as a many2many field and 'default_sort_by' as a one2many field. Is it possible to pull a list of available sort by options from Magento via the API?

Revision history for this message
Kyle Waid (midwest) wrote :

This is definitely a bug, It does not like any entry in that column in the database. Confirming.

Changed in magentoerpconnect:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.