I have a zero-dollar product that, once added to the cart, should never be removed until checkout is completed. Currently, that product has the "Remove" button, "Quantity" field, and Price that all products are displayed with in the cart. How can I remove those three items just for this one product/SKU?


1 Answer 1


You could achive this with hook_form_alter() and hide the field with $form['field_name']['#access'] = FALSE;

  • Thanks! Do you have any ideas/guidance on how I would target the form elements only for the specific product, and leave all the other products' form elements alone?
    – hockey2112
    Commented May 7, 2014 at 19:49
  • I hope, you could get product id in the form, just make the changes only for the product id with in the if condition,
    – Leopathu
    Commented Jun 6, 2016 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.