When using Age Restriction for UC and setting the age to anything OTHER than '21' the text in the UI, when checking out, does not reflect the age variable set... i.e. if you set it to age 13, it will still show age 21 as the requirement.

I noticed the uc_restrictions_age.module needs the following lines changed:

LINE 70:
'#title' => t('Only persons 21 years of age or older may complete this order'),
changed to
'#title' => t('Only persons '. variable_get('uc_restrictions_age_required', '') .' years of age or older may complete this order'),

LINE 72:
'#options' => array(1 => t('I am 21 years of age or older')),
changed to
'#options' => array(1 => t('I am '. variable_get('uc_restrictions_age_required', '') .' years of age or older')),

LINE 84:
$form['age']=array('#title' => t('Are you 21 years of age or older?'),
changed to
$form['age']=array('#title' => t('Are you '. variable_get('uc_restrictions_age_required', '') .' years of age or older?'),

---

The strings for the UI need to be variables tied to the value entered in the admin form, right? THis may not be the exact or best fix, but it seemed to work for my site without bugs.

I am not familiar with adding to the CVS or the whole process of submitting to the open source. I hope you will take this suggestion and update the UC Restrictions module, because it is a very helpful UC mod. Hopefully this will help. I attached the original and correct files.

Thanks for your hard work!

Comments

bob.hinrichs’s picture

Status: Needs work » Fixed

chucknut7, Thanks a lot for finding, reporting and offering a solution! This new version incorporates your suggestions. Let me know if you find anything else.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.