Jump to content

Cron to disable/enable products of a manufacturer


neymarinho
 Share

Recommended Posts

Hello everyone,

I would like to have a cron that would enable and disable certain products at certain time. 

I would like to disable all the products from a certain manufacturer and enable them at another time. 

How can I do this??

Thank you very much,

 

Share this post


Link to post
Share on other sites

I manage to develop this:

 

$retval = Db::getInstance()->execute('

  UPDATE 'ps_product'
SET  'available_for_order'= 0 
WHERE 'id_manufacturer' = 3
 
');
 
echo 'Done with return: '.print_r($retval,1).PHP_EOL;
 
Not working, any idea why?

Share this post


Link to post
Share on other sites

   Still not working with the code:

$retval = Db::getInstance()->execute('
  UPDATE 'ps_product'
SET  'available_for_order'= 0 
WHERE 'id_manufacturer' = 3
 
');
 
echo 'Done with return: '.print_r($retval,1).PHP_EOL;
?>
 
Any idea???

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More