Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2012
    Posts
    254
    Plugin Contributions
    0

    Default upgrading from 1.5.4 to 1.5.7 missing require(DIR_WS_MODULES . 'prod_cat_header_code

    I am trying to upgrade from 1.5.4 to 1.5.7 and then hopefully get to 1.5.8. I'm doing 1.5.7 first because I have been working on this one since before 1.5.8 came out and the store is heavily modified.

    I have a couple modules that refer to prod_cat_header_code.php Currently working on Reward points. My customers have been using rewards points for 10+ years and don't really want to just delete all their points. This module is not included in 1.5.7 nor can I find the functions in 1.5.7 elsewhere. I have upgraded several times so I don't know if this was a core file that has been removed and the function renamed elsewhere and I should point to that or if this was included in an add on and needs to be added back into the files. Searching the forums I see many people have run into the problem that this file is no longer there but no one has really commented on how they dealt with it. At least not in the 10 threads I read.

    Should I add this file in to my zen-cart upgrade or should I point to a function elsewhere in the core files? I will include a copy of the file below.
    Thank you for your help.
    PHP Code:
    <?php
    /**
     * @package admin
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: prod_cat_header_code.php 3009 2006-02-11 15:41:10Z wilt $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die(
    'Illegal Access');
    }
      require(
    DIR_WS_CLASSES 'currencies.php');
      
    $currencies = new currencies();


      if (isset(
    $_GET['product_type'])) {
        
    $product_type zen_db_prepare_input($_GET['product_type']);
      } else {
        
    $product_type='1';
      }

      
    $type_admin_handler $zc_products->get_admin_handler($product_type);

      function 
    zen_reset_page() {
        global 
    $db$current_category_id;
        
    $look_up $db->Execute("select p.products_id, pd.products_name, p.products_model, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute, p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping, p.products_quantity_order_max from " TABLE_PRODUCTS " p, " TABLE_PRODUCTS_DESCRIPTION " pd, " TABLE_PRODUCTS_TO_CATEGORIES " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' and p.products_id = p2c.products_id and p2c.categories_id = '" $current_category_id "' order by pd.products_name");
        while (!
    $look_up->EOF) {
          
    $look_count ++;
          if (
    $look_up->fields['products_id']== $_GET['pID']) {
            exit;
          } else {
            
    $look_up->MoveNext();
          }
        }
        return 
    round( ($look_count+.05)/MAX_DISPLAY_RESULTS_CATEGORIES);
      }
    // make array for product types

      
    $sql "select * from " TABLE_PRODUCT_TYPES;
      
    $product_types $db->Execute($sql);
      while (!
    $product_types->EOF) {
        
    $product_types_array[] = array('id' => $product_types->fields['type_id'],
                                         
    'text' => $product_types->fields['type_name']);
      
        
    $product_types->MoveNext();
      }
    ?>

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,521
    Plugin Contributions
    88

    Default Re: upgrading from 1.5.4 to 1.5.7 missing require(DIR_WS_MODULES . 'prod_cat_header_c

    That core file was removed in zc156.

    While it was included by the admin's category_product_listing.php and all the product-specific (at that time) listing builders, e.g. /admin/product.php), the function it includes was used nowhere in the core files. The drop-down input array that it builds was used only on the category_product_listing to add the product-type selection when you're inserting new products.

    As such, that module should not be included in your upgrade.

 

 

Similar Threads

  1. upgrading from 1.3.9f to h, admin pages missing data
    By delia in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 3 Dec 2010, 12:13 AM
  2. Replies: 4
    Last Post: 12 Apr 2010, 11:09 PM
  3. Coding Help with require(DIR_WS_MODULES
    By haredo in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 27 Apr 2009, 10:48 AM
  4. Replies: 3
    Last Post: 19 Jun 2008, 12:44 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR