Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2011
    Posts
    93
    Plugin Contributions
    0

    Default PRODUCTS_QTY_BOX_STATUS in admin/includes/modules/*/collect_info.php

    Zen Cart - v1.3.9h

    Hi guys,
    In the various collect_info.php, I'm trying to figure out where "PRODUCTS_QTY_BOX_STATUS" is defined. I understand the "DEFAULT_*" are defined in the product_type_layout table, but what about "PRODUCTS_QTY_BOX_STATUS"? Where is it defined?

    Thanks.

    Example code from admin/includes/modules/document_general/collect_info.php:

    PHP Code:
        $parameters = array('products_name' => '',
                           
    'products_description' => '',
                           
    'products_url' => '',
                           
    'products_id' => '',
                           
    'products_quantity' => '',
                           
    'products_model' => '',
                           
    'products_image' => '',
                           
    'products_price' => '',
                           
    'products_virtual' => DEFAULT_DOCUMENT_GENERAL_PRODUCTS_VIRTUAL,
                           
    'products_weight' => '',
                           
    'products_date_added' => '',
                           
    'products_last_modified' => '',
                           
    'products_date_available' => '',
                           
    'products_status' => '',
                           
    'products_tax_class_id' => DEFAULT_DOCUMENT_GENERAL_TAX_CLASS_ID,
                           
    'manufacturers_id' => '',
                           
    'products_quantity_order_min' => '',
                           
    'products_quantity_order_units' => '',
                           
    'products_priced_by_attribute' => '',
                           
    'product_is_free' => '',
                           
    'product_is_call' => '',
                           
    'products_quantity_mixed' => '',
                           
    'product_is_always_free_shipping' => DEFAULT_DOCUMENT_GENERAL_PRODUCTS_IS_ALWAYS_FREE_SHIPPING,
                           
    'products_qty_box_status' => PRODUCTS_QTY_BOX_STATUS,
                           
    'products_quantity_order_max' => '0',
                           
    'products_sort_order' => '0',
                           
    'products_discount_type' => '0',
                           
    'products_discount_type_from' => '0',
                           
    'products_price_sorter' => '0',
                           
    'master_categories_id' => ''
                           
    ); 

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: PRODUCTS_QTY_BOX_STATUS in admin/includes/modules/*/collect_info.php

    Quote Originally Posted by kamion View Post
    what about "PRODUCTS_QTY_BOX_STATUS"? Where is it defined?
    Several places. Each product type has its own definition. The best way to locate them is with the 'Devolopers Toolkit'. Located under the 'tools' menu.

    Cheers
    Rod

  3. #3
    Join Date
    Mar 2011
    Posts
    93
    Plugin Contributions
    0

    Default Re: PRODUCTS_QTY_BOX_STATUS in admin/includes/modules/*/collect_info.php

    Ah, thanks! :) That's very useful.

    One more define that the 'Developers Toolkit' can't seem to find: PRODUCTS_VIRTUAL_DEFAULT.

    PHP Code:
    // Virtual Products
        
    if (!isset($pInfo->products_virtual)) $pInfo->products_virtual PRODUCTS_VIRTUAL_DEFAULT;
        switch (
    $pInfo->products_virtual) {
          case 
    '0'$is_virtual false$not_virtual true; break;
          case 
    '1'$is_virtual true$not_virtual false; break;
          default: 
    $is_virtual false$not_virtual true

  4. #4
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: PRODUCTS_QTY_BOX_STATUS in admin/includes/modules/*/collect_info.php

    Quote Originally Posted by kamion View Post
    Ah, thanks! :) That's very useful.
    I've always thought so too

    Quote Originally Posted by kamion View Post
    One more define that the 'Developers Toolkit' can't seem to find: PRODUCTS_VIRTUAL_DEFAULT.
    This is one for the Dev team to answer... You are correct in that the devolopers toolkit can't find this one, this is because it turns out that this *used* to be set in the database, and assumedly configured via the admin config settings.

    However, after reviewing the changes made by the SQL upgrade scripts, it appears that this setting/option/definition is being deleted from the database, even though it is still referenced by the files.

    Cheers
    Rod

  5. #5
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: PRODUCTS_QTY_BOX_STATUS in admin/includes/modules/*/collect_info.php

    Quote Originally Posted by kamion;1012309
    One more define that the 'Developers Toolkit' can't seem to find: PRODUCTS_VIRTUAL_DEFAULT.

    [php
    // Virtual Products
    if (!isset($pInfo->products_virtual)) $pInfo->products_virtual = PRODUCTS_VIRTUAL_DEFAULT;
    switch ($pInfo->products_virtual) {
    case '0': $is_virtual = false; $not_virtual = true; break;
    case '1': $is_virtual = true; $not_virtual = false; break;
    default: $is_virtual = false; $not_virtual = true;[/php]
    I've just taken a closer look at this, and apparently the "PRODUCTS_VIRTUAL_DEFAULT" has been redefined to "DEFAULT_PRODUCT_PRODUCTS_VIRTUAL" (and also relocated into a different table), so to fix the problem that you are having simply update the file with this new constant name.

    A check on my system indcates that the file 'collect_info.php' is the only one affected .... I must admit though that I am aware that I am using a rather old copy of this particular file, and a quick check shows that the latest zencart update (1.3.9h) has the correct information, so I suspect that you are also using an older copy of this file.

    Cheers
    Rod.

  6. #6
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: PRODUCTS_QTY_BOX_STATUS in admin/includes/modules/*/collect_info.php

    Quote Originally Posted by RodG View Post
    a quick check shows that the latest zencart update (1.3.9h) has the correct information,
    I retract this statement... The file(s) have been correctly updated in one place, but not the other (the "if (!isset($pInfo->products_virtual))" line).

    I guess my next step is to check to see if this has already been reported as a bug or not.

    Cheers
    Rod

  7. #7
    Join Date
    Mar 2011
    Posts
    93
    Plugin Contributions
    0

    Default Re: PRODUCTS_QTY_BOX_STATUS in admin/includes/modules/*/collect_info.php

    Thanks for checking it out, RodG. :)

    What happens in this case when PRODUCTS_VIRTUAL_DEFAULT is undefined? It still seem to work.

  8. #8
    Join Date
    Mar 2011
    Posts
    93
    Plugin Contributions
    0

    Default Re: PRODUCTS_QTY_BOX_STATUS in admin/includes/modules/*/collect_info.php

    <deleted - double post>
    Last edited by kamion; 29 Mar 2011 at 02:05 PM. Reason: double posting

  9. #9
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: PRODUCTS_QTY_BOX_STATUS in admin/includes/modules/*/collect_info.php

    Quote Originally Posted by kamion View Post
    Thanks for checking it out, RodG. :)

    What happens in this case when PRODUCTS_VIRTUAL_DEFAULT is undefined? It still seem to work.
    Very little (nothing) will happen actually... As implied, this is for the storage of a *default* value, so it just means that should you set this default value to your choosing it will never have an effect... the code will always see it as a zero (or NULL) which is quite possibly the standard default setting anyway.

    The data for the actual product is/will still be set when you enter or edit the individual product(s), so it really is no big deal.. you can even ignore it..

    So minor is this one that it appears you are the first and only one to have stumbled across it. I have reported it as a bug though, as minor as it is.

    Cheers
    Rod

  10. #10
    Join Date
    Mar 2011
    Posts
    93
    Plugin Contributions
    0

    Default Re: PRODUCTS_QTY_BOX_STATUS in admin/includes/modules/*/collect_info.php

    Cheers.

    Mods, please close this thread. Thanks.

 

 

Similar Threads

  1. v150 PHP Fatal error: Out of memory in includes/modules/attributes.php
    By donnyb in forum General Questions
    Replies: 0
    Last Post: 6 Apr 2012, 12:15 AM
  2. Replies: 4
    Last Post: 12 Apr 2010, 11:09 PM
  3. collect_info.php (copy of product_music\collect_info.php) dynamic dropdownlist
    By SPsen in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 1 Feb 2010, 10:05 PM
  4. Problems with includes/config.php and admin/includes.php
    By Scott83 in forum Basic Configuration
    Replies: 2
    Last Post: 23 Oct 2009, 07:09 PM

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