code suggestions

hello

i was working these last days with the variations and meta data. all is working nicely but i still found some things that could be improved in a next version:

- meta data is not saved as an array in one single key (ie. _marketpress_data) but in single meta keys per data. that's not so nice because it fills up the database quite quickly. then you wouldn't need to read it with get_post_custom. instead get_post_meta could be used and the serialization is done for you automatically.
- in addition all meta data is saved unhidden (no "_" in front of name). like this all marketpress meta data appears in the custom fields panel. which makes it unnecessary cluttered. and it can cause dangerous modifications by the user. that's probably why it is deactivated. so, please rename those and all is well.
- the jquery click function to add a new variation is set to the whole <td tag instead of <a. this can cause accidental creation of variations.
- ability to delete variations between others. currently you can only delete the last variation.
- the variation delete <a tag contains only an "x" as text. this should be replaced by a "Delete" or "Remove".
- an empty <a tag is created in the admin-product-list column for the featured image if no image was set.

so, thanks for listening

  • Aaron

    Thanks for those.

    - meta data is not saved as an array in one single key (ie. _marketpress_data) but in single meta keys per data. that's not so nice because it fills up the database quite quickly. then you wouldn't need

    That's by design, just a data structure choice. Allows custom sorts in product queries as well as segmentation of data. It's just how WP works.

    in addition all meta data is saved unhidden (no "_" in front of name). like this all marketpress meta data appears in the custom fields panel. which makes it unnecessary cluttered. and it can cause dangerous modifications by the user. that's probably why it is deactivated. so, please rename those and all is well.

    It's too late to change that without wiping everyones products. Custom fields are disabled for products anyway.

    - the variation delete

    It has a title so mousing over shows the text.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.