Page 11 of 16 FirstFirst ... 910111213 ... LastLast
Results 101 to 110 of 154
  1. #101
    Join Date
    Jan 2006
    Posts
    420
    Plugin Contributions
    0

    Default Re: Product Type Documentation

    Before I embark on what looks like a bit of a headache to get right .. is there an easy fix to my issue ? I want to be able to have stock showing on one category , but not another , so My initial thought was to change the product type to use the different configuration options. While still using the Product-General type layout. After reading a little bit it seems like a headache I could really do without , so if there is a simpler solution , or someone has already cloned Product-General and can just pass me the file set , I would be very grateful .

    Thanks.
    Various Zen cart sites !

  2. #102
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    Default Re: Adding New Product_types - Issue with sidebox

    I'm working on adding an additional product type in a redesign of one of my customer's sites. First of all, I'm doing this specifically to add new filters, no new fields, at least at this time are planned for the product_info.

    I've been totally successful in every area except the sidebox, and my issue is baffling to me. The list of names of my fields are not displaying, instead two little dots, that by the way do take me to the correctly link.

    Again, in the admin all is perfect, so I know my tables are designed correctly; however I double checked (actually triple checked) to be sure all variables match my code. The extras box displays just perfect to include the names of the fields, but not in the catalog sidebox.

    I'm actually adding two filters, but for the moment working on just one on the catalog side (the other one is next).

    Here are my two new tables in question:

    Code:
    Table structure for table `zen_departments`
     `departments_id` int(11) NOT NULL auto_increment,
      `departments_name` varchar(32) NOT NULL,
      `date_added` datetime default NULL,
      `last_modified` datetime default NULL,
      PRIMARY KEY  (`departments_id`),
      KEY `idx_departments_name_zen` (`departments_name`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
    
    Dumping data for table `zen_departments`
    --
    
    INSERT INTO `zen_departments` (`departments_id`, `departments_name`, `date_added`, `last_modified`) VALUES
    (1, 'Men', '2008-11-11 14:27:50', NULL),
    (2, 'Women', '2008-11-11 14:27:50', NULL),
    (3, 'Girls', '2008-11-13 23:53:43', '2008-11-23 11:26:43'),
    (4, 'Boys', '2008-11-13 23:53:48', '2008-11-23 11:28:17'),
    (5, 'Infants', '2008-11-13 23:54:19', '2008-11-22 18:49:31');
    Code:
    Table structure for table `zen_product_shoes_extra`
    `products_id` int(11) NOT NULL default '0',
      `departments_id` int(11) NOT NULL default '0',
      `style_id` int(11) NOT NULL default '0',
      PRIMARY KEY  (`products_id`),
      KEY `idx_departments_id_zen` (`departments_id`),
      KEY `idx_style_id_zen` (`style_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    (dump not relative for our purpose here)

    My modules/sideboxes/departments.php code:

    PHP Code:
    <?php
    /**
     * departments sidebox - displays list of available departments to filter on
     *
     * @package templateSystem
     * @copyright Copyright 2003-2005 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: departments.php 2834 2006-01-11 22:16:37Z birdbrain $
     */

    error_reporting(E_ALL);  

      
    $departments_query "select departments_id, departments_name

                              from " 
    TABLE_DEPARTMENTS "

                              order by departments_name"
    ;



      
    $departments $db->Execute($departments_query);



      if (
    $departments->RecordCount()>0) {

        
    $number_of_rows $departments->RecordCount()+1;



    // Display a list

        
    $departments_array = array();

        if (!isset(
    $_GET['departments_id']) || $_GET['departments_id'] == '' ) {

          
    $departments_array[] = array('id' => '''text' => PULL_DOWN_ALL);

        } else {

          
    $departments_array[] = array('id' => '''text' => PULL_DOWN_DEPARTMENTS);
        }



        while (!
    $departments->EOF) {

          
    $departments_name = ((strlen($departments->fields['departments_name']) > MAX_DISPLAY_DEPARTMENTS_NAME_LEN) ? substr($departments->fields['departments_name'], 0MAX_DISPLAY_DEPARTMENTS_NAME_LEN) . '..' $departments->fields['departments_name']);

          
    $departments_array[] = array('id' => $departments->fields['departments_id'],

                                           
    'text' => $departments_name);

          
    $departments->MoveNext();
        }
          require(
    $template->get_template_dir('tpl_departments_select.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_departments_select.php');

        
    $title '<label>' BOX_HEADING_DEPARTMENTS '</label>';
        
    $title_link false;
        require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
      }
    ?>
    Next this is my departments_filter.php code
    PHP Code:
    <?php
    /**
     * departments_filter.php  for index filters
     *
     * index filter for the shoe product type
     * show the products of a specified departments ie: mens/womens etc.
     *
     * @package productTypes
     * @copyright Copyright 2003-2007 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @todo Need to add/fine-tune ability to override or insert entry-points on a per-product-type basis
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: departments_filter.php 6912 2008-11-22 02:23:45Z rwoody $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die(
    'Illegal Access');
    }
      if (!isset(
    $select_column_list)) $select_column_list "";

      
    // show the products of a specified departments
      
    if (isset($_GET['departments_id']))
      {
        if (isset(
    $_GET['filter_id']) && zen_not_null($_GET['filter_id']))
        {
          
    // We are asked to show only a specific category
          
    $listing_sql "select " $select_column_list " p.products_id, p.products_type, p.master_categories_id, p.products_price, p.products_tax_class_id, pd.products_description, if(s.status = 1, s.specials_new_products_price, NULL) AS specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
            from " 
    TABLE_PRODUCTS " p, " .
            
    TABLE_PRODUCTS_DESCRIPTION " pd, " .
            
    TABLE_PRODUCT_SHOES_EXTRA " pse left join " TABLE_SPECIALS " s on pse.products_id = s.products_id, " .
            
    TABLE_PRODUCTS_TO_CATEGORIES " p2c, " .
            
    TABLE_DEPARTMENTS " d
            where  d.departments_id = '" 
    . (int)$_GET['departments_id'] . "'
              and p.products_id = pse.products_id
              and p.products_status = 1
              and pse.departments_id = '" 
    . (int)$_GET['departments_id'] . "'
              and pse.products_id = p2c.products_id
              and pd.products_id = p2c.products_id
              and pd.language_id = '" 
    . (int)$_SESSION['languages_id'] . "'
              and p2c.categories_id = '" 
    . (int)$_GET['filter_id'] . "'";
        } else {
          
    // We show them all
          
    $listing_sql "select " $select_column_list " pse.products_id, p.products_type, p.master_categories_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
            from " 
    TABLE_PRODUCTS " p, " .
            
    TABLE_PRODUCTS_DESCRIPTION " pd, " .
            
    TABLE_PRODUCT_SHOES_EXTRA " pse left join " TABLE_SPECIALS " s on pse.products_id = s.products_id, " .
            
    TABLE_DEPARTMENTS " d
            where  d.departments_id = '" 
    . (int)$_GET['departments_id'] . "'
              and p.products_id = pse.products_id
              and p.products_status = 1
              and  pd.products_id = pse.products_id
              and pd.language_id = '" 
    . (int)$_SESSION['languages_id'] . "'
              and pse.departments_id = '" 
    . (int)$_GET['departments_id'] . "'";
        }
      } else {
        
    // show the products in a given category
        
    if (isset($_GET['filter_id']) && zen_not_null($_GET['filter_id']))
        {
          
    // We are asked to show only specific category
          
    $listing_sql "select " $select_column_list " p.products_id, p.products_type, p.master_categories_id, d.departments_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
            from " 
    TABLE_PRODUCTS " p left join " TABLE_SPECIALS " s on p.products_id = s.products_id, " .
            
    TABLE_PRODUCTS_DESCRIPTION " pd, " .
            
    TABLE_DEPARTMENTS " d, " .
            
    TABLE_PRODUCTS_SHOES_EXTRA " pse, " .
            
    TABLE_PRODUCTS_TO_CATEGORIES " p2c
            where p.products_status = 1
              and pse.departments_id = d.departments_id
              and d.departments_id = '" 
    . (int)$_GET['filter_id'] . "'
              and p.products_id = p2c.products_id
              and pd.products_id = p2c.products_id
              and pd.language_id = '" 
    . (int)$_SESSION['languages_id'] . "'
              and p2c.categories_id = '" 
    . (int)$current_category_id "'";
        } else {
          
    // We show them all
          
    if ($current_categories_id) {
            
    $listing_sql "select " $select_column_list " p.products_id, p.products_type, p.master_categories_id, d.departments_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
              from " 
    TABLE_PRODUCTS_DESCRIPTION " pd, " .
              
    TABLE_PRODUCTS " p left join " TABLE_DEPARTMENTS " d, " TABLE_PRODUCT_SHOES_EXTRA " pse on pse.departments_id = d.departments_id, " .
              
    TABLE_PRODUCTS_TO_CATEGORIES " p2c left join " TABLE_SPECIALS " s on p2c.products_id = s.products_id
              where p.products_status = 1
                and p.products_id = p2c.products_id
                and pd.products_id = p2c.products_id
                and pd.language_id = '" 
    . (int)$_SESSION['languages_id'] . "'
                and p2c.categories_id = '" 
    . (int)$current_category_id "'";
          } else {
            
    $listing_sql "select " $select_column_list " p.products_id, p.products_type, p.master_categories_id, d.departments_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
              from " 
    TABLE_PRODUCTS_DESCRIPTION " pd, " .
              
    TABLE_PRODUCTS " p left join " TABLE_DEPARTMENTS " d, " TABLE_PRODUCT_SHOES_EXTRA " pse on pse.departments_id = d.departments_id, " .
              
    TABLE_PRODUCTS_TO_CATEGORIES " p2c left join " TABLE_SPECIALS " s on p2c.products_id = s.products_id
              where p.products_status = 1
                and p.products_id = p2c.products_id
                and pd.products_id = p2c.products_id
                and pd.language_id = '" 
    . (int)$_SESSION['languages_id'] . "'";
          }
        }
      }
      
    // set the default sort order setting from the Admin when not defined by customer
      
    if (!isset($_GET['sort']) and PRODUCT_LISTING_DEFAULT_SORT_ORDER != '') {
        
    $_GET['sort'] = PRODUCT_LISTING_DEFAULT_SORT_ORDER;
      }

      if (isset(
    $column_list)) {
        if ( (!isset(
    $_GET['sort'])) || (!ereg('[1-8][ad]'$_GET['sort'])) || (substr($_GET['sort'], 01) > sizeof($column_list)) )
        {
          for (
    $i=0$n=sizeof($column_list); $i<$n$i++)
          {
            if (
    $column_list[$i] == 'PRODUCT_LIST_NAME')
            {
              
    $_GET['sort'] = $i+'a';
              
    $listing_sql .= " order by p.products_sort_order, pd.products_name";
              break;
            }
          }
          
    // if set to nothing use products_sort_order and PRODUCTS_LIST_NAME is off
          
    if (PRODUCT_LISTING_DEFAULT_SORT_ORDER == '') {
            
    $_GET['sort'] = '20a';
          }
        } else {
          
    $sort_col substr($_GET['sort'], 1);
          
    $sort_order substr($_GET['sort'], 1);
          
    $listing_sql .= ' order by ';
          switch (
    $column_list[$sort_col-1])
          {
            case 
    'PRODUCT_LIST_MODEL':
            
    $listing_sql .= "p.products_model " . ($sort_order == 'd' 'desc' '') . ", pd.products_name";
            break;
            case 
    'PRODUCT_LIST_NAME':
            
    $listing_sql .= "pd.products_name " . ($sort_order == 'd' 'desc' '');
            break;
            case 
    'PRODUCT_LIST_MANUFACTURER':
            
    $listing_sql .= "m.manufacturers" . ($sort_order == 'd' 'desc' '') . ", pd.products_name";
            break;
            case 
    'PRODUCT_LIST_QUANTITY':
            
    $listing_sql .= "p.products_quantity " . ($sort_order == 'd' 'desc' '') . ", pd.products_name";
            break;
            case 
    'PRODUCT_LIST_IMAGE':
            
    $listing_sql .= "pd.products_name";
            break;
            case 
    'PRODUCT_LIST_WEIGHT':
            
    $listing_sql .= "p.products_weight " . ($sort_order == 'd' 'desc' '') . ", pd.products_name";
            break;
            case 
    'PRODUCT_LIST_PRICE':
            
    //          $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
            
    $listing_sql .= "p.products_price_sorter " . ($sort_order == 'd' 'desc' '') . ", pd.products_name";
            break;
          }
        }
      }
      
    // optional Product List Filter
      
    if (PRODUCT_LIST_FILTER 0)
      {
        if (isset(
    $_GET['departments_id']))
        {
          
    $filterlist_sql "select distinct c.categories_id as id, cd.categories_name as name
            from " 
    TABLE_PRODUCTS " p, " .
            
    TABLE_PRODUCTS_TO_CATEGORIES " p2c, " .
            
    TABLE_CATEGORIES " c, " .
            
    TABLE_CATEGORIES_DESCRIPTION " cd, " .
            
    TABLE_PRODUCT_SHOES_EXTRA " pse
            where p.products_status = 1
              and pme.products_id = p2c.products_id
              and p2c.categories_id = c.categories_id
              and p2c.categories_id = cd.categories_id
              and cd.language_id = '" 
    . (int)$_SESSION['languages_id'] . "'
              and pse.departments_id = '" 
    . (int)$_GET['departments_id'] . "'
            order by cd.categories_name"
    ;
        } else {
          
    $filterlist_sql"select distinct d.departments_id as id, d.departments_name as name
            from " 
    TABLE_PRODUCTS " p, " .
            
    TABLE_PRODUCTS_TO_CATEGORIES " p2c, " .
            
    TABLE_PRODUCT_SHOES_EXTRA " pse, " .
            
    TABLE_DEPARTMENTS " d
            where p.products_status = 1
              and pse.departments_id = d.departments_id
              and p.products_id = p2c.products_id
              and p2c.categories_id = '" 
    . (int)$current_category_id "'
            order by d.departments_name"
    ;
        }
        
    $getoption_set =  false;
        
    $filterlist $db->Execute($filterlist_sql);
        
    $do_filter_list false;
        if (
    $filterlist->RecordCount() > 1)
        {
          
    $do_filter_list true;
          if (isset(
    $_GET['departments_id']))
          {
            
    //die('here');
            
    $getoption_set =  true;
            
    $get_option_variable 'departments_id';
            
    $options = array(array('id' => '''text' => TEXT_ALL_CATEGORIES));
          } else {
            
    $options = array(array('id' => '''text' => TEXT_ALL_DEPARTMENTS));
          }
          while (!
    $filterlist->EOF) {
            
    $options[] = array('id' => $filterlist->fields['id'], 'text' => $filterlist->fields['name']);
            
    $filterlist->MoveNext();
          }
        }
      }

      
    // Get the right image for the top-right
      
    $image DIR_WS_TEMPLATE_IMAGES 'table_background_list.gif';
      if (
    $current_category_id) {

        
    $sql "select categories_image from " TABLE_CATEGORIES "
                    where  categories_id = '" 
    . (int)$current_category_id "'";

        
    $image_name $db->Execute($sql);
        
    $image $image_name->fields['categories_image'];
      }
    ?>
    Here's my tpl_departments_select.php
    PHP Code:
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @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: tpl_departments_select.php 4773 2006-10-17 06:10:58Z drbyte $
     */

      
    $content "";

      
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent centeredContent">';

      
    $content .= zen_draw_form('departments_form'zen_href_link(FILENAME_DEFAULT'''NONSSL'false), 'get');

      
    $content .= zen_draw_hidden_field('main_page'FILENAME_DEFAULT) . zen_hide_session_id() . zen_draw_hidden_field('typefilter''departments');

      
    $content .= zen_draw_pull_down_menu('departments_id'$departments_array, (isset($_GET['departments_id']) ? $_GET['departments_id'] : ''), 'onchange="this.form.submit();" size="' MAX_PRODUCTS_DEPARTMENTS_LIST '" style="width: 90%; margin: auto;"');

      
    $content .= '</form>';

      
    $content .= '</div>';
    ?>
    I'm thinking I must have a typo and I'm just not seeing it. There are no errors showing on the pag. I added the enable_error_logging.php, loaded, but no errors are being displayed in the cache file either.

    This is running on a PHP version 5.2.5 / MySQL version 5.0.67
    Apache server.

    I've been going over and over this code for two days and I cannot find my error. If someone has a moment and can take a look at my code with a fresh set of eyes, I would really appreciate it. I do believe when you stare at something too long, you can't see the forest for the trees as they say.

    Ruth
    Last edited by rwoody; 23 Nov 2008 at 10:25 PM.

  3. #103
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    Have a Drink Re: Adding New Product_types - Issue with sidebox - solved

    I knew this had to be something obvious I overlooked. I totally forgot to add the configures for the drop down into the config table of the database

    However Now that the boxes work I'm getting an error that based on what I've read is more a PHP5 issue with Zen's current version (queryFactoryResult error), so I'll post my questions to those forum areas.

    Thanks for listening!!

    Ruth

  4. #104
    Join Date
    Feb 2009
    Posts
    1
    Plugin Contributions
    0

    Default Re: Adding New Product_types

    I have just installed the ZenCart 1.3.8a and tried to add a digital product to my new shop. Each time I try to add a new product after choosing the 'Product-digital' type, I get this error "The requested URL /admin/product_digital.php was not found on this server"

    I installed ZenCart 1.3.8a through Fantastico from the cPanel of my host but could not locate the product_digital.php file
    I tried downloading ZenCart 1.3.8a from the ZenCart.com and unzipped it. I still can not find the product_digital.php file.

    What could be the problem?

  5. #105
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: Adding New Product_types

    Have you installed an addon? The core code doesn't have a Product-Digital.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  6. #106
    Join Date
    Jun 2009
    Location
    Arizona
    Posts
    6
    Plugin Contributions
    0

    Idea or Suggestion Re: Adding New Product_types

    Hi,

    I am using Zen Cart v1.3.8a/v1.3.8 and have my site hosted by hostmylingeriesite.com

    My site came preloaded with products from 4 different vendors, and now I want to add other product from different companies. I have gotten started but need to create drop down boxes.

    I am going to start selling silk sheets and the company that is my supplier makes them in 33 colors as well as custom makes them in about 15 different bed sizes.

    Is there a place I can get step by step instructions for accomplishing this? I browsed through a lot of other posts but did not see one specific to this.

    My website is http://www.intimategoddesslingerie.com

    Thank-you
    2Divas

  7. #107
    Join Date
    Dec 2009
    Posts
    5
    Plugin Contributions
    0

    Default Re: Adding New Product_types

    I've read the all thread and it was really helpful

    I'm creating new product type and what changes I should make with the database? Is the adding new product type into the 'product_types' table enough? Or I need to do something with the others zen cart tables?

  8. #108
    Join Date
    Jul 2009
    Posts
    16
    Plugin Contributions
    0

    help question Re: Adding New Product_types

    I finally found the product type documentation under previous versions. Are there any updates to this information before I start?

    Basically, I need a products type for Food that has a nutritional information section, so if someone else has already made this mod, please share it with me! I'm sure I'm going to mess this up, but I need separate "description" fields for ingredients and for nutritional info. Obviously, I only need these on the food. Dog leashes don't contain many ingredients, and to the best of my knowledge they have little nutritional value.

    Thanks again for the support. You guys are wonderful when I'm doing this

    Crystal
    www.starks-ark.com

  9. #109
    Join Date
    Apr 2010
    Posts
    20
    Plugin Contributions
    0

    Default Re: Adding New Product_types

    :bump:

    Is this information still valid?

    Thanks

  10. #110
    Join Date
    Apr 2010
    Posts
    20
    Plugin Contributions
    0

    Default Re: Adding New Product_types


 

 
Page 11 of 16 FirstFirst ... 910111213 ... LastLast

Similar Threads

  1. Is there a way of adding a product but stopping it from adding to new products?
    By philpalmerdevon in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 19 Jan 2009, 02:07 PM
  2. When adding new parts, adding part number to preview screen
    By GTHENRY in forum Basic Configuration
    Replies: 1
    Last Post: 18 Jun 2008, 07:53 PM
  3. product_types.php details
    By MarkRS in forum Setting Up Categories, Products, Attributes
    Replies: 12
    Last Post: 30 Sep 2006, 06:40 PM

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