Product name in attribute option (probably token...)

Posts: 21
Joined: 03/15/2008

Hey guys!

Still continuing to love Ubercart Eye-wink

What I'd like to do is display the name of the product on the attribute option select form, when on a product page. I try to illustrate:

Assume we are on a product's page, at the add to cart form.

-Addons:
-- Addon 1, +$10.00
-- Addon 2, +$20.00
-- No addons, [name of the product (I guess $node->title)] only

Basically that's what I'm trying to do, so when I setup the attribute options, the last option would display the title of the current page, so the name of the product. I guess token module would be the place to start or make $form['name'] accept php input in function uc_attribute_form($aid = NULL)

Any ideas on this one?

Thanks in advance!

Rob

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

The closest I think I can get you is to recommend hook_form_alter() and look for those forms to somehow alter the option titles to include the product name.

Posts: 21
Joined: 03/15/2008

Thanks Ryan,

I'll give it a try!

Btw, is there no way to get token module do something with this somehow?

Thanks!