Support for Grid View
harrisben - April 28, 2009 - 05:42
| Project: | Ubercart Ajax Attribute Calculations |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
Description
I've finally figured out that the module is working at the node level, but that in grid view it isn't. How can I help to get this working in grid view as well, because it's an awesome module that overcomes one of my pet peeves with Ubercart, namely that mixing products that have attributes with those that don't requires you to either display the price twice for products with attributes, or to only display it at the attribute level. Either way confuses customers.

#1
I've never tested this module in grid view. I suppose as long as the products are separated out into named divs the module could form_alter the needed javascript in. I'd probably commit a patch that did this without interfering with current functionality.
#2
There is a div surrounding the price for each item in the grid as follows (an example):
<div class="category-grid-products"><table><tbody><tr><td>
<span class="catalog-grid-title">
<a href="/content/black">Black</a>
</span>
<span class="catalog-grid-image">
<a href="/content/black">
</a>
</span>
<span class="catalog-grid-sell-price">
<div class="uc-price">$8.25</div>
</span>
<div class="add-to-cart"> // contains product attribute options, excluded for the sake of brevity
</div>
</td></tr></tbody></table>
</div>
#3
harrisben,
I have moved this feature request to the new 6.x-2.x branch, as the 6.x-1.x branch will now only be accepting bug fixes. Currently, uc_aac partly works in grid view in that it can update attributes in the add-to-cart form. It can't however identify other product elements because, ubercart does not wrap products with a "node-$nid" identifier. Since by default, ubercart does not support this, I am setting the status of this issue to postponed. I have created #629048: Product (node) elements are undistinguishable in grid view by default against the ubercart project in hopes that they will add support for this, as I see it to be an important issue. When ubercart adds support for this issue, I will take another look at it.
With all that said, you can still get uc_aac to work with the grid view via theming. First make sure you have a node identifier in the form of "node-$nid" that wraps each product. Second, inside the node identifier, elements should have classes that match the product page such as "uc-price-sell", "uc-price-display", etc. With these in place, you should have no problem with uc_aac working on the grid view.
Cheers,
Antoine