Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Enable - Disable Categories modifcation?


teksigns

Recommended Posts

i have the folling code in my

includes/functions/general.php

 

file

 

 

// BOF Enable - Disable Categories Contribution--------------------------------------

 function tep_set_categories_status($categories_id, $status) {

   if ($status == '1') {

     return tep_db_query("update " . TABLE_CATEGORIES . " set categories_status = '1' where categories_id = '" . $categories_id . "'");

      } elseif ($status == '0') {

     return tep_db_query("update " . TABLE_CATEGORIES . " set categories_status = '0' where categories_id = '" . $categories_id . "'");

   } else {

     return -1;

   }

 }

// EOF Enable - Disable Categories Contribution--------------------------------------

 

 

 

im adding another product status to my products

i have all of that part working already .

 

however i would like to change the above code

to update the product status of every product

in the directory thats set to disabled to product status 2.

 

how can i do this .

im sure its just a simple mysql statement but im having trouble figuring

this out .

 

i only want the product status set to 2 in the disabled directory

if the current product status is not equal to "0"

 

 

help !

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...