I'm using Membership entity commerce (7.x-1.0-alpha2) for my website. On the join page, I'd like to reorder the membership types : I got "one month", "three months" and "one year", but they don't show up in the desired order... Plus I would like to customize this form (hide description and term length). I've been trying to change different things in the module's code with no luck. Any ideas ?

2 Answers 2


First off, don't edit the module's code directly. Make a custom module that will hold your changes.

Secondly, you can use HOOK_form_alter to make changes to the form.

  • Thank you for your reply, I agree with the good practice reminder, the problem is I really can't understand where this specific page is built in the code, I mean this is actually no form at all, just a simple table with 'add to cart' html links...
    – duck
    Oct 22, 2015 at 15:49

For others looking for the same thing : have a look at modules/membership_entity/modules/membership_entity_type around line 16 you'll find the query that retrieve membership types : $ids = db_query('SELECT id FROM {membership_entity_type}')->fetchCol(); I didn't know how to hook into this so I just added order by weight set the types weights through the UI and that worked good for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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