Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Jan 2009
    Posts
    59
    Plugin Contributions
    1

    Default Show Date Added?

    I am confused about the correct way to turn off the statemnet "This product was added to our catalog on....."

    I turned it off for all the listing types in

    Admin -> Configuration -> New Listing, Featured Listing and All Listing.

    The initial values in all cases were 2601. This is a code which indicates the alignment, sort order and number breaks. 0 means off. So i set all 3 to zero.

    However, this did not turn the statement off. Searching the forum I found a post instructing me to use Admin -> Catalog -> Product Types then hit the Edit Layout button and change the value of "Show Date Added" from 1 to 0.

    From what I can gather this means the statement has to be turned off in 2 places. Are there any differences between these settings, that is, the one in Admin -> Configuration-> <listing type> and the one in Admin -> Catalog -> Product Types?

    Thanks

    Kev

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

    Default Re: Show Date Added

    Your URL?
    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.

  3. #3
    Join Date
    Jan 2009
    Posts
    59
    Plugin Contributions
    1

    Default Re: Show Date Added

    My URL is

    www.f u n a d u l t c o s t u m e s .co.uk

    Do you need the URL? I have managed to remove the statemenet - i am just wondering why it needs to be turned off in 2 places - if indeed it does?

    Kev

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Show Date Added

    Settings in Configuration -> New Listing, Featured Listing and All Listing will affect only those pages. The Product Types setting affects the product info page.

  5. #5
    Join Date
    Jan 2009
    Posts
    59
    Plugin Contributions
    1

    Default Re: Show Date Added

    Thanks gjh,

    perhaps this is a stupid question, but what is the difference between the poduct info page and all listing page?

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Show Date Added

    "Product info" is the name for the individual product details page.
    I recall that it confused me when I first started working with Zen Cart.

  7. #7
    Join Date
    Jan 2009
    Posts
    59
    Plugin Contributions
    1

    Default Re: Show Date Added

    Thanks Glenn,

    good news and bad news. I have found the "All Listings", "New Listings" and "Product Info" pages now, so I appreciate they are different.

    However, with Admin -> Catalog -> Product Types -> Edit Layout -> SHow Date Added set to 0 (off) and Admin -> Configuration -> New Listings -> Display Date Added set to 2601 (left aligned, order 60, 1 break), the "New Listing" page does not display the date added.

    "New Listing" only shows date added when it is set to 2601 and Catalog -> Product Types -> Layout is 1. Is this correct? A bug maybe?

    Kev

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Show Date Added

    Hmm, I don't know. One of the first things I ever did with my shop was turn that completely off, so I haven't investigated its behavior.

  9. #9
    Join Date
    Jan 2009
    Posts
    59
    Plugin Contributions
    1

    Default Re: Show Date Added

    Well the logic for it is in here:

    includes\functions\function_lookups.php
    function zen_get_show_product_switch

    First off it gets the product_type (id) from TABLE_PRODUCTS using the appropriate product_id. Lets say it returns id 1, typically "Product - General"

    Next it gets the type_handler (???) from TABLE_PRODUCT_TYPES for the product type id found above. Lets say it finds the handler "product".

    So, so far, even though we are loading the "New Listings"page it still hasn't looked at the settings in Configuration => New Listing -> ....

    Next a string is generated which is (take this on trust, for this example): SHOW_PRODUCT_INFO_DATE_ADDED

    ok - will stop my explanation now....was it helping anyway - I will post the PHP.

    K

  10. #10
    Join Date
    Jan 2009
    Posts
    59
    Plugin Contributions
    1

    Default Re: Show Date Added

    Here is the function


    function zen_get_show_product_switch($lookup, $field, $suffix= 'SHOW_', $prefix= '_INFO', $field_prefix= '_', $field_suffix='') {
    global $db;

    $sql = "select products_type from " . TABLE_PRODUCTS . " where products_id='" . $lookup . "'";
    $type_lookup = $db->Execute($sql);

    $sql = "select type_handler from " . TABLE_PRODUCT_TYPES . " where type_id = '" . $type_lookup->fields['products_type'] . "'";
    $show_key = $db->Execute($sql);


    $zv_key = strtoupper($suffix . $show_key->fields['type_handler'] . $prefix . $field_prefix . $field . $field_suffix);

    // MY EXPLANATION ABOVE STOPS HERE

    $sql = "select configuration_key, configuration_value from " . TABLE_PRODUCT_TYPE_LAYOUT . " where configuration_key='" . $zv_key . "'";
    $zv_key_value = $db->Execute($sql);
    if ($zv_key_value->RecordCount() > 0) {
    return $zv_key_value->fields['configuration_value'];
    } else {
    $sql = "select configuration_key, configuration_value from " . TABLE_CONFIGURATION . " where configuration_key='" . $zv_key . "'";
    $zv_key_value = $db->Execute($sql);
    if ($zv_key_value->RecordCount() > 0) {
    return $zv_key_value->fields['configuration_value'];
    } else {
    return false;
    }
    }
    }


    So what it does after my explanation is to query the product type layout to see if it should display the date added. It will return a 1 or 0. I think it must return something. So that determines if the date is shown or not.

    ** IF ** no value is returned **BUT I SUSPECT ONE WILL** then the Configuration -> New Listing settings are interrogated. So I don't think this setting will ever be used!

    in other words, Date Added is either on or off globally.

    Can a true Zen guru confirm this?

    Kev

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Show product Added by date
    By dmagic in forum General Questions
    Replies: 1
    Last Post: 26 Dec 2010, 04:29 PM
  2. Easy Populate and the Date added updated to todays date issue.
    By cyphercys in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 9 Mar 2010, 04:26 AM
  3. Do not want to show product quantity or the date it was added ??
    By tanyaleann in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 25 Sep 2008, 12:23 AM
  4. Quick Question: Date Expected vs Date Added
    By ymbd in forum Setting Up Categories, Products, Attributes
    Replies: 14
    Last Post: 16 Aug 2008, 05:00 PM
  5. Date added will not show (or turn on to display)
    By jeffmic in forum General Questions
    Replies: 10
    Last Post: 12 Oct 2007, 08: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