We have a need where there is one price table for regular prices, and one price table for wholesale prices. Same product.

In the rule, there is no way to select which price table should replace the normal price.

The price table data itself is not exposed to rules, so there is no way to do a condition based on that. An alternative way would be to change the action for the rule, so you have to choose which price table manually. That would require a module change, however.

Any ideas or help on how I can accomplish this?

Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jazzdrive3’s picture

Status: Active » Closed (fixed)
FileSize
2.1 KB
17.35 KB

Figured out how to do this:

Attached are the new module files, if anyone needs to see how I did this.

1. Add a new parameter to the action in commerce_price_table.rules.inc
2. Add a new parameter to the function commerce_price_table_get_amount_qty in the .module file.
3. Only add the field value to the array if the field name equals what was passed in via the new parameter.

This was easier than I thought it would be.