Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When an option within an attribute contains a price adjustment, a comma is added to the formatting. For example:
Adobe Photoshop, +$50.00
How can I remove the comma? I would prefer that each item display without the comma:
Adobe Photoshop +$50.00
Comments
Comment #1
longwaveYou can override theme_uc_attribute_option() to change this.
Comment #2
Katrina B CreditAttribution: Katrina B commentedCould you provide specifics about how to override it? I am a site builder, not a programmer, so coding is not my strong suit. Thanks.
Comment #4
Katrina B CreditAttribution: Katrina B commentedI'm reopening this because my request for help was not answered. I am a site builder, not a coder/programmer, so I would greatly appreciate a solution suitable for someone who is not fluent in PHP. Thank you.
Comment #5
longwaveIf your theme is called MYTHEME then you would add this to your template.php file:
Save the file, clear your caches, and the comma should be gone.
Further theming support questions should be asked in the main forums on drupal.org or ubercart.org.
Comment #7
deaftone CreditAttribution: deaftone commented#5 didn't work for me on 6.x-2.11. Even tried to remove the comma in the module file changing this
to this
Comment #8
DanZ CreditAttribution: DanZ commentedIt looks like your theme function has been overridden. You need to modify the override version. Don't forget to clear your caches.
See https://drupal.org/theme-guide/6-7 for more information on theming.
This is not an appropriate forum for this sort of issue. See http://www.ubercart.org/forum/theming_and_design for Ubercart-specific theming questions.
Comment #9
deaftone CreditAttribution: deaftone commentedI don't think so. I've changed theme to Garland, flushed all caches, it's still there.
Comment #10
longwaveEditing that function, or overriding it in template.php, definitely works for me in a clean install of 6.x. Maybe you have another module installed that affects the product attribute system that is overriding this?
Comment #11
deaftone CreditAttribution: deaftone commentedWhen I inspect it with Theme Developer, the function is called from the overridden function. So it should be working. Anyway, maybe some other modules interfering as you say. I'll investigate.
Thanks.
Comment #12
deaftone CreditAttribution: deaftone commentedYes indeed, Ajax Attribute Calculations was overriding it. Removing the comma from line 134 did it for me.