Theming

4 replies [Last post]
sakadava
Offline
Joined: 09/16/2009
Status: 
Answered

Hi Leighton,

 

I want to theme some aspects of membership sign-up and reporting.

 

I noticed an earlier post which deals with showing the membership on an arbitrary page which uses ms_membership_show_user_membership().

 

Scenario #1 - show current user memberships

 

I want to be able to display information about current memberships.  I can call ms_membership_show_user_membership() but this uses a pre-defined format and I would like to change it.

 

Question #1: I can of course code my own xxx_show_user_membership() based on ms_membership_show_user_membership(). However, is there an "official" way of achieving this?

 

Scenario #2 - show information about available memberships

 

I would like to present information about potential memberships using my own format. The sign-up button provided by admin/build/ms_membership does not provide any details or pricing information (pricing comes later in /ms/checkout).

 

I would like to present information about the membership at this stage.

 

Question #2: Is there an "official" way to access membership parameters so that I can display them as I see fit.

 

Scenario #3 - theme (or eliminate /ms/checkout)

 

/ms/checkout shows the checkout information using a pre-defined format that I would also like to change.

 

Question #3: How do I go about theming /ms/checkout?

 

Question #4: Is it possible to actually skip /ms/checkout entirely and go straight to PayPal? Because I intend to display the pricing information on the referring page, /ms/checkout seems redundant and I would like to eliminate the unnecessary step in the process.

 

Sorry for hitting you with so much Leighton - I have a big development on and now starting to tackle the subcriptions aspect of it.

 

Simon

 

 

Leighton Whiting
Offline
Joined: 06/02/2009
Simon, Good questions, I'll

Simon,
Good questions, I'll do my best to answer them:

1) Coding your own xxx_show_user_membership() would be the best way to have the most control over it. I am adding a feature request for 6.2 to make all of these user-facing go through a hook_theme function so they can be more easily over-ridden from the theme layer.

2) To access all of the membership plan parameters, you can try the following code:

  1. $plans = ms_membership_get_plans();
  2.  
  3. foreach ($plans as $plan) {
  4. // Uncomment the line below to print out all the variables so you can see what is there
  5. // drupal_set_message('[geshifilter-pre]'. print_r($plan, TRUE) .'[/geshifilter-pre]');
  6. print $plan->name .' : '. ms_core_get_recurring_string($plan, $plan->recurring);
  7. }

3) CSS is the best way to theme it right now, everything has classes and ids that can easily be accessed.

4) I actually had this as the default behavior when the module was in Alpha if there was only one active Payment Gateway, but I took it out because of a need for a place for users to enter a Coupon code, and because it was good practice to show a Checkout page before taking the user to payment. I can add the feature back in as an optional setting in Membership Suite 6.2.

Sincerely,
Leighton Whiting

sakadava
Offline
Joined: 09/16/2009
Hi Leighton, Thanks for

Hi Leighton,

Thanks for getting back to me:

> 1) Coding your own xxx_show_user_membership()
No problem with this.

> 2) ms_membership_get_plans() to get plan details
No problem with this.

> 3) CSS to theme "checkout" page
Is there anyway I can do more with this pending the 6.2 release? If I must have the page, I would like to add supporting text and possibly present the data in a non-tabular format. Basically more than I can do using CSS.

> 4) Configurable "checkout" page in 6.2 release
Could you let me know when you anticipate the 6.2 release being available? Roughly?

Thanks once again,
Simon

Leighton Whiting
Offline
Joined: 06/02/2009
Simon, 6.2 will actually be

Simon,
6.2 will actually be released tonight because of some important bug fixes that were made this morning, so these changes will be pushed back to 6.3, which will be released on Monday of next week.

Sincerely,
Leighton Whiting

sakadava
Offline
Joined: 09/16/2009
Hi Leighton, That's a

Hi Leighton,

That's a cracking release schedule you've got!

If you can schedule those changes for 6.3 in a week or so's time, I think I can handle that :-)

Thanks once again,
Simon

Twitter Feed