Results 1 to 10 of 11

Hybrid View

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

    Default Re: Pre-select a subcategory

    The very unusual functionality of showing the latest-added subcategory of one particular top category when that is clicked can really only be done by the type of custom coding you posted above.

    Others should note that the OP started from a custom mod version of tpl_categories.php, and a stock version of the file will look very different.

  2. #2
    Join Date
    Mar 2011
    Posts
    27
    Plugin Contributions
    0

    Default Re: Pre-select a subcategory

    Quote Originally Posted by gjh42 View Post
    The very unusual functionality of showing the latest-added subcategory of one particular top category when that is clicked can really only be done by the type of custom coding you posted above.

    Others should note that the OP started from a custom mod version of tpl_categories.php, and a stock version of the file will look very different.
    Thanks for the clarification and comments.

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

    Default Re: Pre-select a subcategory

    Hi again,

    The code above works most of the time, but when I clear cookie the link becomes like this
    index.php?main_page=index&cPath=5&zenid=a9a6d04fcbf670a151bce972f8e9bb99_19

    Instead of something like this
    index.php?main_page=index&cPath=5_15

    What is the zenid parameter for? it seems that some other part of the code generates that link and put it underneath the PROMOTION category. Any pointer is appreciated.

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

    Default Re: Pre-select a subcategory

    Zenid is the session id which keeps track of the individual customer's settings, cart contents, etc. It has to appear on the first page visit, but if cookies are enabled, it is thereafter passed by cookie and not in the URL.

  5. #5
    Join Date
    Mar 2011
    Posts
    27
    Plugin Contributions
    0

    Default Re: Pre-select a subcategory

    Quote Originally Posted by gjh42 View Post
    Zenid is the session id which keeps track of the individual customer's settings, cart contents, etc. It has to appear on the first page visit, but if cookies are enabled, it is thereafter passed by cookie and not in the URL.
    gjh42,

    Thanks, I noticed that I concatenated the subcat to the main cat after Zen added the cookie, that's why it produces unexpected results. I already correct the problem by moving the cookie to the end of the string.

 

 

Similar Threads

  1. v150 Pre Select Attributes With Parameter in URL
    By ShopVille in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 3 Feb 2015, 10:31 PM
  2. v150 Pre-Select A Payment Option at check-out
    By ShopVille in forum Addon Payment Modules
    Replies: 9
    Last Post: 12 Sep 2014, 03:35 PM
  3. Pre-select a shipping method?
    By Gem in forum Built-in Shipping and Payment Modules
    Replies: 11
    Last Post: 3 Mar 2008, 06:35 PM
  4. Pre-Select A Payment Option at check-out?
    By JaxMac in forum Built-in Shipping and Payment Modules
    Replies: 23
    Last Post: 1 Oct 2007, 02:04 PM
  5. Pre-select default payment method
    By breadfan in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 1 Aug 2007, 05:12 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