Posted by edegro on April 22, 2009 at 10:34pm
| Project: | Ubercart |
| Version: | 6.x-2.0-rc1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Fixes for a couple items I've found that cause ubercart to fail validation.
One note: The change from div to span for uc_price is for block views. When you display price as a field it outputs as a div inside of a span. Changing uc_price to span solves this and doesn't seem to have any adverse effect on the catalog.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| ubercart-validationtweaks.patch | 2.21 KB | Ignored: Check issue status. | None | None |
Comments
#1
#2
Yep, the cart block fix needs to happen... was a relic from when I changed that to a background-image instead of an img tag. As for the price theming, gonna have Lyle chime in on what making that a div will do.
#3
Could you explain where exactly the divs are rendered inside of a span? Is it the Views price field? I'd like to keep the theme as a div because it makes the product page look better.
#4
fwiw, just looked at the payments tab, and having the price in a div looks yucky. I think I'm leaning toward the span, because really we don't know that every time a price is themed it should be a block level element. In fact, I think it would be much less so than an inline element, which would probably have allowed us to keep most of the prices as themed. : P
I can really only think of that one place on the product view page where it's in its own div, but then we may as well just put it in that one place in a wrapper (maybe it already is?).
#5
It's when I create a block using Views2 with price as a field. More specifically I was getting:
<div class="views-field-sell-price"><span class="field-content">
<div class="uc-price">$14.50</div>
</span>
</div>
#6
OK, I'm just working on the uc_price change at the moment. Remind me to go back to the other changes when I'm done if I don't do it on my own.
Since changing theme_uc_price() to use a span allows us to use the "themed" revision in more places, I've gone ahead and done that in this patch. I tended not to change the revision when uc_price() was used as a replacement value in t() because sites should have the freedom to put any kind of elements there that might not be appropriate in a sentence.
I've also reused theme_uc_product_price() in uc_product_view() to add the wrapping div around the price.
#7
OK, tested well, so all changes have been committed.
Thanks.
#8
Automatically closed -- issue fixed for 2 weeks with no activity.