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.
Modifying product (node) elements such as the sell price, display price, etc. requires these elements to be wrapped in tag with the id="node-$nid". The grid view does not use this identifier and thus makes it impossible to modify elements of a specific node. I know all of this can be accomplished through theming, but I think by default we should at least be able to identify which elements belong to which node.
Cheers,
Antoine
Comments
Comment #1
jantoine CreditAttribution: jantoine commentedTo clarify and expand the problem, by default, product (node) elements such as the sell price, display price, etc. are not themed with an identifier that would allow one to verify which product the element belongs too on a page where multiple products are displayed. Adding an identifier to all elements associated with a product (node) such as class="node-$nid" would allow one to easily identify which product (node) the element belonged to.
Cheers,
Antoine
Comment #2
TR CreditAttribution: TR commentedYes, this is a good idea. Do you want to roll a patch for it?
Comment #3
TR CreditAttribution: TR commentedTagging
Comment #4
wodenx CreditAttribution: wodenx commentedBumping to 7.x bc @longwave points out, this is needed for #1380772: Ajax-ify attribute option price selection - it would also be helpful to have an #Id that uniquely identifies each product node on the page - even if it appearsmore than once. I will look into it when I have a chance.
Comment #5
TR CreditAttribution: TR commentedThis is already done by the node template - why do we need to do it again?
Comment #6
longwaveWe can't rely on node.tpl.php including this information depending on the theme in use. If we add Ajax support for attribute changes we will just end up with a bunch of support requests for people who use badly coded themes that don't include this information.
Comment #7
wodenx CreditAttribution: wodenx commentedDIfferent themes wrap nodes with different classes/id's - just had a user whose nodes were wrapped in id="article-" instead of "node-" -- I guess you could say that was his lookout, but if we want a robust way to update product prices (for example) on the module level, then we need to provide our own identifiers, I think...
Comment #8
wodenx CreditAttribution: wodenx commentedcross-post.
Comment #9
longwaveThis was fixed in #1380772: Ajax-ify attribute option price selection, each product node display has a unique uc-product-N class now.