2

I want to create a rule based on the number of sales per product. Is there a data selector to get the number of sales per product? If anyone can point me in the right direction, I will be very grateful!

1
  • Exactly what kind of rule you want to create? What do you want to accomplish with it? Dec 14 '11 at 22:12
1

I don't think you'll find that particular condition out of the box. Conditions for rules are pretty easy to write though, check Commerce Conditions for some easy to follow examples.

0

Exactly what kind of rule you want to create? What do you want to accomplish with it? You could do a database query that returns you "the number of sales per product" and then perform an action based on that number, and run this on a cron job. But since we don't know how sales or products are represented in your site, not what exactly your rule will try to accomplish, we cannot point you in the right direction.

0

You could use Commerce Product Popularity, which uses a Radioactivity field that increases with each purchase. If you switch off decay and configure the rule with an energy of 1, then the field will contain the total units sold for that product since the field was last cleared.

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.