Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,671
    Plugin Contributions
    123

    Default Adding accordion effects to other sideboxes

    The expand/contract behavior of the categories sidebox would be useful for other sideboxes with nested information as well. But this code is based on the hierarchical nature of cPath variables (1, 1_5, 1_5_12, etc.) so I don't think it can be reused. I'm considering other approaches like jQuery accordion. Any recommendations or things to watch out for?
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Adding accordion effects to other sideboxes

    If you're using Bootstrap, their "collapse" feature handles accordion displays quite easily just by providing the correct HTML markup:
    https://getbootstrap.com/docs/4.5/co...ordion-example
    Indeed it's akin to jQuery's similar feature.

    I guess the challenge comes when you want the URI to influence what part is opened by default, such as a nested cPath which opens several layers of the categories sidebox.
    You could still set some appropriate HTML markup to control the Bootstrap accordion effect though.

    The categories sidebox, at least until 1.5.7, fires tons of queries and can sometimes be slow on large sites with a gazillion categories/subcategories. My point: if you're considering cloning it, don't clone that part. :)
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,671
    Plugin Contributions
    123

    Default Re: Adding accordion effects to other sideboxes

    LOL. Note to self: do not make new code "slowness-compatible."
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Adding accordion effects to other sideboxes

    Aside: Strictly speaking the expand/contract effect of the (current) categories sidebox is slightly more of a "tree navigation" effect than "accordion" (insomuch as I often think of accordion not denoting parent/child hierarchy with plus/minus and indentation or sub-element arrows, etc).
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Adding accordion effects to other sideboxes

    Something to look at is tpl_modules_mobile_categories_tabs.php from Responsive Sheffield Blue 1.. I'm still using it. you can see it by resizing my site page. it is accordion style, and would be nice in a side box. It does use a jquery script, but converting to css would be easy with no need for scripting.
    Dave
    Always forward thinking... Lost my mind!

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,671
    Plugin Contributions
    123

    Default Re: Adding accordion effects to other sideboxes

    Thanks Dave. Good idea!
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. Applying CSS Flyout Menu look to other sideboxes
    By sasilk in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Mar 2011, 10:21 AM
  2. categories box on top of other sideboxes
    By bogyi in forum General Questions
    Replies: 2
    Last Post: 1 Nov 2010, 11:56 PM
  3. Sideboxes are too far from each other
    By expensivedesign in forum Basic Configuration
    Replies: 4
    Last Post: 9 Feb 2009, 10:30 AM
  4. Sidebox Shopping Cart overlaps other sideboxes...
    By MSGOK in forum Basic Configuration
    Replies: 5
    Last Post: 24 Jun 2006, 06:39 AM

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