Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Show Date Added

    At any rate, if turning off the date added in Product Types completely disables it, I expect that was the intended behavior, so it couldn't be called a bug. You may be able to work around it and make your own store behave differently.

    I'll have to look through the code you posted and see what I can make of it.

  2. #12
    Join Date
    Jan 2009
    Posts
    59
    Plugin Contributions
    1

    Default Re: Show Date Added

    Thanks Glen, I agree - it may not be a bug - it simply depends on what those settings are "supposed" to do. I think my explanation of what they "really" do is correct - but an expoert needs to double check my logic.

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

    Default Re: Show Date Added

    PHP Code:
      $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;
        }
      }

    If this first key_value is greater than 0, the configuration_value is returned from TABLE_PRODUCT_TYPE_LAYOUT and the rest is skipped over; if equal to 0, the next test is performed.

    If the second key_value is greater than 0, the configuration_value is returned from TABLE_CONFIGURATION; if equal to 0, "false" is returned.

  4. #14
    Join Date
    Jan 2009
    Posts
    59
    Plugin Contributions
    1

    Default Re: Show Date Added

    Hi Glenn,

    I suspect that is how it is meant to work, but the code doesn't compare against the returned value, it compares against the RecordCount, which will always be 1 as far as I am aware, hence the second SQL clause never gets executed.

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

    Default Re: Show Date Added

    If $zv_key is not in the table, there would be no records in $zv_key_value, correct?

    It would take more digging to find out what that would be in various cases, but it might be intended as a fallback - if not defined in product types, check configuration... but it does seem like the product types setting always overrules the listing settings.

  6. #16
    Join Date
    Jan 2009
    Posts
    59
    Plugin Contributions
    1

    Default Re: Show Date Added?

    >If $zv_key is not in the table, there would be no records in $zv_key_value, correct?

    Agreed, and you are right, more diggng required. I have traced it for "New P"oduct" page and $zv_key becomes SHOW_PRODUCT_INFO_DATE_ADDED which I *think* will always exist (as it will either be 1 or 0). i will look more deeply as the other setting (Admin -> Configuration -> New Listings) is supposed to specify a format and I haven't looked for where this would/does get rendered.

    Thanks Glenn - good to have someone to bounce ideas/theories and questions at.

    Kev

 

 
Page 2 of 2 FirstFirst 12

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