Product A: (has three options)
- blue (Expire in May) (It has node to describe more about this option)
- green (Expire in May) (It has node to describe more about this option)
- red (Expire in June) (It has node to describe more about this option)

Currently I use Scheduler module to auto remove the node once its expire, but unable to remove product attributes's option. As a result, I use rule to send me email once node had been remove.

Question: Can I use rule to remove product attribute's option or is there any other solution?

Many Thanks.


Try to use Commerce Product Attributes module. I haven't use this module. But I hope you will get that you want.

This module provides some enhancements to the Drupal Commerce attribute handling.

The improvement contains:

  • Attribute field for line item
  • Edit option for attributes


Try this Refer Link also if you will not getting any solution from above module.


You can do this by adding below code to Ubercart Attribute module.

contributions/ubercart/uc_attribute/uc_attribute.module, line 831


function uc_attribute_option_delete($oid) {
  // Delete the class attribute options.
  uc_attribute_subject_option_delete($oid, 'class');

  // Delete the product attribute options (and the adjustments!).
  uc_attribute_subject_option_delete($oid, 'product');

  // Delete base attributes and their options.
    ->condition('oid', $oid)

  • Thank for advice. I think Commerce Product is only works for default cart module. Not with ubercart. With your hint, I do a bit research and found this link: drupal.org/project/uc_product_as_attribute_option However, it only manage display stock......Now I trying to use option 2 method, but not really sure how. I only need to delete product's option and need to meet the condition.
    – peifa
    May 26 '15 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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