Just a note for ones who need to theme/style cart content rows. To add class odd/even I've added some lines to basic_cart.cart.inc
Function which should be modified is function basic_cart_cart_form():

$delta='odd';
  foreach ($cart as $nid => $node) {
    $form['cartcontents'][$nid] = array(
      '#type' => 'textfield',
      '#size' => 1,
      '#delta' => $delta,
      '#default_value' => $node->basic_cart_quantity,
      '#theme' => 'basic_cart_render_cart_element',
    );
$delta=(($delta=='odd') ? 'even' : 'odd');
  }

After this modification "delta" variable is available which can be used in theme_basic_cart_render_cart_element()
You can get it with

$delta = $variables['form']['#delta'];

Perhaps this can be comitted to module to avoid code modification?

Comments

norman.lol’s picture

Status: Active » Closed (outdated)
Issue tags: -

Thank you everyone for taking the time to report and discuss this issue. 🙇🏻‍♂️

As the Drupal 7 versions of this module are no longer supported, I’ll be closing this issue. 🔚

Huge thanks and credit to everyone who contributed in any way. ✨

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.