Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2007
    Location
    Amarillo, Tx
    Posts
    1,674
    Plugin Contributions
    0

    Default Question in the Categories in admin area...

    I have a question....

    In the admin area when you have your product listings in the categories when you add your products to the store is there a way you can put in the manufaturer listed. like for an example:

    ID..... Categories/Products........ and your "Manufacturer goes here.... Model#........ and so forth. Is that possible to do?

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Question in the Categories in admin area...

    You need to do a couple changes for this ...

    Edit the file:
    /admin//includes/modules/category_product_listing.php

    and change the line:
    <td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_MANUFACTURERS; ?></td>
    to add:
    Code:
                    <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CATEGORIES_PRODUCTS; ?></td>
                    <td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_MANUFACTURERS_NAME; ?></td>
    
    Then change the line:
    Code:
                    <td class="dataTableContent"><?php echo $products->fields['products_model']; ?></td>
    to add:
    Code:
                    <td class="dataTableContent"><?php echo zen_get_products_manufacturers_name($products->fields['products_id']); ?></td>
                    <td class="dataTableContent"><?php echo $products->fields['products_model']; ?></td>
    Then you need to add a new function ...

    Create a new file:
    /admin/includes/functions/extra_functions/extra_functions.php

    NOTE: you can call the file anything you want ...
    Code:
    <?php
    // my extra functions
    
    /*
     * Return a product's manufacturer's name, from ID
     * TABLES: products, manufacturers
     */
      function zen_get_products_manufacturers_name($product_id) {
        global $db;
    
        $product_query = "select m.manufacturers_name
                          from " . TABLE_PRODUCTS . " p, " .
                                TABLE_MANUFACTURERS . " m
                          where p.products_id = '" . (int)$product_id . "'
                          and p.manufacturers_id = m.manufacturers_id";
    
        $product =$db->Execute($product_query);
    
        return ($product->RecordCount() > 0) ? $product->fields['manufacturers_name'] : "";
      }
    
    
    ?>
    Then create the file:
    /admin/includes/languages/english/extra_definitions/extra_definitions.php

    Code:
    <?php
      define('TABLE_HEADING_MANUFACTURERS_NAME', 'Manufactuer');
    ?>
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Question on Who's Online in the admin area.
    By wmorris in forum General Questions
    Replies: 3
    Last Post: 17 Apr 2016, 07:33 PM
  2. v154 I cannot see/add/edit any categories or products through the admin area
    By CostaCupcake in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 8 Jan 2016, 08:55 PM
  3. v151 Processing question in my Admin area
    By attroll in forum General Questions
    Replies: 3
    Last Post: 5 Mar 2014, 10:14 PM
  4. Categories/products blank in admin area
    By keeping in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 12 Jul 2010, 07:43 PM
  5. Unable to view categories in Admin area
    By burko in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 10 Sep 2008, 04:12 AM

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