11 replies [Last post]
sphism's picture
Offline
Bug Finder
Joined: 11/29/2007
Juice: 215
Was this information Helpful?

Hello,

I have quite a few attributes and options in the shop i'm developing and it would be handy to have a little description under each form-item (like in other drupal forms).

I thought i'd be able to do this from the Manage Attributes > Edit Attribute page, but the only field is Attribute name.

Would be nice to have a second field for Attribute Description, and have that description show up in small text under the form item.

Just a thought,

matt

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
I've just committed changes

I've just committed changes to Bazaar that include an overhaul of the attributes/options management pages and the ability to specify attribute descriptions. Descriptions are set for the attributes on a global scale and may not be altered on individual products. You can also now specify text field, select box, and radio buttons displays thanks to Lyle and manage those settings on a per product basis.

These features need to be tested. Smiling

I'll be updating the docs shortly, too. I want to revisit the per product UI to make sure it's easy to use.

lemandarin's picture
Offline
Joined: 03/30/2008
Juice: 8
Hi, when the change will be

Hi,

when the change will be available because it is very interessing for me!

Thank you,
Tom.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Hi, when the change will be

Hey Tom, these changes have been available for a while. Smiling

shuggy1001's picture
Offline
Joined: 11/13/2008
Juice: 7
adding HTML to attribute descriptions?

Hi Ryan,

Is there any way that HTML can be inserted into the attribute descriptions? I am trying to figure out a way so that i can have a link to a more detailed description page in the attribute description on the form.

Cheers.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: adding HTML to attribute descriptions?

It's a really simple change in the attribute module, and I saw no reason not to do it. Here are a patch that I've just committed so you can use it immediately.

AttachmentSize
markup_description.patch 1.05 KB
markup_description-d5.patch 1.09 KB
shuggy1001's picture
Offline
Joined: 11/13/2008
Juice: 7
Re: Re: adding HTML to attribute descriptions?

Thanks Lyle, that did the trick perfectly and saved me a lot of hassle... You're a saint!

melanie_me's picture
Offline
Joined: 03/29/2009
Juice: 108
Re: Re: adding HTML to attribute descriptions?

I need the attribute name and/or label to also render html (italics primarily).

When I changed

$name = _uc_attribute_get_name($attribute, FALSE);
    if (!is_null($name)) {
      $form_attributes[$attribute->aid]['#title'] = check_plain($name);
    }

to

$name = _uc_attribute_get_name($attribute, FALSE);
    if (!is_null($name)) {
      $form_attributes[$attribute->aid]['#title'] = check_markup($name);
    }

Ubercart is putting paragraph tags around the attribute name.

In addtion, Ubercart is displaying the attribute name and not the attribute label, even though I defined a label for each attribute.

Any ideas?

sleepingmonk@drupal.org's picture
Offline
Joined: 01/20/2008
Juice: 81
D6 UC-2-RC6 Attribute description not allowing html

Hi. I'm running Drupal 6 Ubercart 2 rc6.

I'm trying to add a link to an attribute description. Essentially what is described here for D5 UC1. I know I was able to do it in UC1 and though the code in the new uc_attributes module says "check_markup" on attribute descriptions, I'm still only getting plain text.

I've searched both ubercart.org and drupal.org but can't find any mention of this with the new version. It was the same in rc3. Am I missing something?

Confused.

"I've had this birthmark since I was born." --JB

sleepingmonk@drupal.org's picture
Offline
Joined: 01/20/2008
Juice: 81
DOH!!

I didn't realize check_markup used the site's default input filter. Mine's set to plain text for comments. So I either have to allow links in my comments, or change the check_markup to include a different format?

I guess that could be done with a form_alter....

Maybe this helps someone else. I always seem to search and search, then have an epiphany AFTER I ask for help.

"I've had this birthmark since I was born." --JB

kooroach's picture
Offline
Joined: 01/25/2011
Juice: 20
Tooltip dexcription

Hi,

Is there any way to have description for each option in the attributes ? and also, is it possible to use tooltip for showing those descriptions ?
any help would be highly appreciated Smiling

saranyamohan's picture
Offline
Joined: 05/19/2011
Juice: 17
attribute description

iam new to use ubercart. can u pls tell me what is bazaar ?