Hello

I'm trying to create a rule that automatically disables products in the store

I have a view that lists all products (not product displays as I was getting duplicate results with this)

On the product entity, I have a date field where the user enters a date and time which is when the product should become disabled.,

I've set up a rule with a condition to compare current site time to the date field and an action which is evaluate component to disable the product, but the problem is which event to use to trigger the rule.

Ideally I'd like it to run on cron, but choosing 'Cron maintenance tasks are performed' as the event doesn't allow me to get the conditions and actions of the commerce products.

I've tried adding the commerce product is updated and commerce product is created events, but I don't want to have to go into add a newproduct or edit the product just to disable it as it kind of defeats the object.

Any help is greatfully appreciated as I've spent days on this
Thanks very much

Comments

carlbowles100 created an issue. See original summary.

TR’s picture

Project: Rules » Commerce Core
Version: 7.x-2.10 » 7.x-1.x-dev
Component: Rules Core » Rules integration

This could be better answered by the Commerce community.

rszrama’s picture

Status: Active » Fixed

This doesn't seem Commerce specific to me, as the issue's with the cron event, not any Commerce element. I'm closing this out as we direct people to https://drupal.stackexchange.com for cross-module support in our space. There's just too much that's non-specific to Commerce to try to offer support in a queue that hides answers after two weeks. Feel free to do the same and have people use the drupal-commerce and rules tags.

rszrama’s picture

Status: Fixed » Closed (won't fix)