If we add this line:

      '#attributes' => array('class' => 'node-add-to-wishlist'),

to this function:

function uc_wishlist_form_alter(&$form, &$form_state, $form_id) {
  if (strpos($form_id, 'uc_product_add_to_cart_form_') === 0) {
    // Add the wish list button to the add to cart form.
    $form['wishlist'] = array(
      '#type' => 'submit',
      '#attributes' => array('class' => 'node-add-to-wishlist'),
      '#value' => t('Add to wish list'),
      '#submit' => array('uc_wishlist_add_to_wishlist_submit'),
    );
  }

we can style off the class when there are multiple products on a page, instead of the ID, which should be unique in the scope of any document in valid HTML.

Comments

naveenvalecha’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.