Jump to content

CODE: Warning: implode() [function.implode]: Bad argument


delickate

Recommended Posts

//rmh M-S_pricing end

////rmh M-S_multi-stores begin

// Sets the status of the store

  function tep_set_store_status($stores_id, $status) {

    if ($status == '1') {

      return tep_db_query("update " . TABLE_STORES . " set stores_status = '1', last_modified = now() where stores_id = '" . (int)$stores_id . "'");

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

      return tep_db_query("update " . TABLE_STORES . " set stores_status = '0', last_modified = now() where stores_id = '" . (int)$stores_id . "'");

    } else {

      return -1;

    }

  }

 

 

  function tep_get_stores() {

  global $admin_allowed_stores;

 

    $stores_query = tep_db_query("select stores_id, stores_name, stores_config_table from " . TABLE_STORES . ($admin_allowed_stores[0] == '*' ? " " : " where stores_id in(" . implode(',' , $admin_allowed_stores) . ") ") . "order by stores_name");

    while ($stores = tep_db_fetch_array($stores_query)) {

      $stores_array[] = array('id' => $stores['stores_id'],

                              'text' => $stores['stores_name']);

    }

 

    return $stores_array;

  }

 

  function tep_add_category_to_store($category_id, $store_id) {

    tep_db_query("delete from " . TABLE_CATEGORIES_TO_STORES . " where categories_id = '" . (int)$category_id . "' AND stores_id = '" . (int)$store_id . "'");

    tep_db_query("insert into " . TABLE_CATEGORIES_TO_STORES . " (categories_id, stores_id) values ('" . (int)$category_id . "', '" . (int)$store_id . "')");

  }

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.