I’m trying to modify my ‘Add to cart’ form, changing the ‘Add to cart’ button text and the ‘Quantity’ label:
if(strpos($form_id, 'commerce_order_item_add_to_cart_form_commerce') !== false) { $form['actions']['submit']['#value'] = t('Book Now'); $form['edit-quantity']['und'][0]['value']['#title'] = t('Number of days'); } }
The first part is working, changing the ‘Add to cart’ button text, but the second part is failing changing the ‘Quantity’ label.
Any idea how to fix it?