Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

danjo

Archived
  • Posts

    9
  • Joined

  • Last visited

Profile Information

  • Real Name
    Jo Shea

danjo's Achievements

  1. This will work for 2 levels of categories. Probably not the most efficient, but easier for users to understand the categories. You are replacing the code in account_manage.php and account_add.php // $categories_array = array(array('id' => '', 'text' => TEXT_NONE)); // $categories_query = tep_db_query("select a.categories_id,parent_id, b.categories_name from " . TABLE_CATEGORIES . " as a," . TABLE_CATEGORIES_DESCRIPTION . " as b where a.categories_id = b.categories_id and b.language_id = " . (int)$language_id . " order by categories_name"); // while ($categories = tep_db_fetch_array($categories_query)) { // //echo $categories['parent_id']; // $parent_id = $categories['parent_id']; // if ($parent_id==0) // { // $categories_array[] = array('id' => $categories['categories_id'], // 'text' => $categories['categories_name']); // } else { // $txt=NULL; // while ($parent_id!=0) { // //echo $parent_id; // $category_query = tep_db_query("select a.categories_id,parent_id, b.categories_name from " . TABLE_CATEGORIES . " as a," . TABLE_CATEGORIES_DESCRIPTION . " as b where a.categories_id = b.categories_id and a.categories_id = " . $parent_id . " and b.language_id = " . (int)$language_id . " order by categories_name"); // $category = tep_db_fetch_array($category_query); // $txt .=$category['categories_name']."->"; // $parent_id = $category['parent_id']; // //die($txt.$parent_id.$category['categories_id']); // } // $categories_array[] = array('id' => $categories['categories_id'], // 'text' => $txt.$categories['categories_name']); // } // } $categories_array = array(array('id' => '', 'text' => TEXT_NONE)); $categories_query = tep_db_query("select a.categories_id,parent_id, b.categories_name from " . TABLE_CATEGORIES . " as a," . TABLE_CATEGORIES_DESCRIPTION . " as b where a.categories_id = b.categories_id and b.language_id = " . (int)$language_id . " order by categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { //echo $categories['parent_id']; $parent_id = $categories['parent_id']; if ($parent_id==0) { $categories_array[] = array('id' => $categories['categories_id'], 'text' => $categories['categories_name']); // NOW GET THE SUBCATS FOR THIS PARENT $this_parent_id=$categories['categories_id']; $this_parent_name=$categories['categories_name']; $subcat_query = tep_db_query("select a.categories_id,parent_id, b.categories_name from " . TABLE_CATEGORIES . " as a," . TABLE_CATEGORIES_DESCRIPTION . " as b where parent_id=" . $this_parent_id . " and a.categories_id = b.categories_id and b.language_id = " . (int)$language_id . " order by categories_name"); while ($subcat = tep_db_fetch_array($subcat_query)) { $categories_array[] = array('id' => $subcat['categories_id'], 'text' => $this_parent_name ."->". $subcat['categories_name']); } } }
  2. This is the same problem I mentioned. Log into the raw DB using PHPMyAdmin or whatever program you have access to and double check that in the customer table, the customer_id value for "Administrator " is '0'. Then you will be able to see all of the products again.
  3. Has anyone solved the issue of the Administrator customer_id which keeps changing? This column is set as a 'NOT NULL' due to its being an auto-increment, so anytime any maintenance is done with the DB, the '0' values changes to whatever the next auto-increment value is. Can someone please explain what the idea is behind having this 'Administrator' for this contribution rather than using an existing store admin, for example with customer_id = 1 ? Is there a specific reason why it needs to be '0' ... could I edit this contribution to use admin #1 instead? In fact, when I log into the store to approve products, I log in with the usual store admin. I do not log in with Administrator (0), so what is its purpose?
  4. http://www.oscommerce.com/community/contributions,2890
  5. I experienced and solved this same problem. I found that the actual word 'Object' gets saved in the database (instead of the filename) and the picture file failed to be saved anywhere. It failed to save so it didn't return the filename to go into the DB. My thumb folder was okay, but my images folder was not. The solution is to make sure that BOTH the /thumb/ and the /images/ folders are writeable. chmod 707 or 770 or 777 depending on your system.
  6. 11. ## Open file: admin/customers.php at line :468(end) ## Add code : <? require('customers_app.inc.php');?> Can someone past the code snippets above/below where this gets inserted? It's not making sense on that lin number in my file and I don't see any related link in the store admin console. What exactly does the Administrator added per the instructions do? Am I supposed to login to admin with that login (but there was no password?!?) or do I continue to use my pre-existing store admin login ?
  7. Hello, Our script has started throwing a 406 error right from the first page of easypopulate.php ... Server's been upgraded; is more security conscience now ... mod_security: Access denied with code 406. Pattern match "insert( |\n)+into" at POST_PAYLOAD Is there anything we can change in the script to fix the condition causing this error ?
×
×
  • Create New...