Hello, on my site I am developing I will be selling user roles using ubercart. As an example, the "My account" node a summary appears like:

Orders
--------------------------------------------
    Click here to view your order history.

Expiring roles
--------------------------------------------
premium             This role will expire on 03/27/2010 - 21:40

History
--------------------------------------------
Member for
    1 week 1 day 

Where is says "Expiring roles" I would like it to say "Active Subscriptions", and where it says "This role will..." I would like to change it to "This subscription will ..." In what file can I change this?

Also since there is already an "Orders" Tab, it seems like this order section is sort of useless as no orders actually seem to appear here. All information goes straight to the order tab. Can I prevent this from appearing here?

Comments

vm’s picture

you do not hack files. If they are wrapped in t()'s which they should be you can use the stringoverrides.module to alter text.

http://drupal.org/project/stringoverrides

a1eph’s picture

Thanks. This worked for the first item I wanted changed, but not the second.

vm’s picture

because that string is using a token to display date and time. Search the module file for a piece of it (ie: excluding the date and time). note the t() syntax and try to mimic.

a1eph’s picture

Solved by replacing:

This role will expire on !date
with
This subscription will expire on !date

$messages['uc_roles_user_expiration_message'] = t("This role will expire on !date"); <---- this was the line in the .module file.

Appreciated

vm’s picture

^5

yesct’s picture

Stringoverrides didn't work for me for either one.

I tried in the string overrides ui setting (admin/settings/stringoverrides/en):
Expiring roles
to
Subscriptions

and

This role will expire on !date
to
This subscription will expire on !date

Anyone else, what exactly did you do to get it to work?
I cleared the cache.

yesct’s picture

hmm. There might be a setting for one of these strings!
http://www.ubercart.org/docs/user/3366/selling_site_access_role_promotions

"The Roles module is set up under Administer › Store administration › Configuration > Product settings > Product features. You should see a link that says Role assignment settings, after clicking the link it should open up a form to specify settings for the Roles module. It's here where you'll set the following settings: "

Ah, at:

admin/store/settings/products/edit/features

several field sets, expand them and
yep. works.

I was making it too hard. I attached some screen shots. Hey, I cant do attachments...