Page 1 of 3 123 LastLast
Results 1 to 10 of 29
  1. #1
    Join Date
    Jan 2021
    Posts
    32
    Plugin Contributions
    0

    Default Add Nested Accordion on Product page?

    Hi,
    I want to add nested accordion on the products page. The accordion should have options to add text, images,links and embed videos
    There are umpteen number of sources available online that provide the code for this. But somehow I am not able to make it work on my products page using ckeditor.
    I want something like the following on the products page ( which I can add in each product page using ckeditor) -
    http://www.htmldrive.net/items/demo/...n-with-jQuery- (Nested Accordion)
    I want help how and where to insert the code and other steps to make this accordion functional.
    Last edited by RK123; 22 Jan 2021 at 11:54 PM.

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

    Default Re: Nested Accordion on Product page?

    Have you pulled in the extra javascript required to do this?
    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.

  3. #3
    Join Date
    Jan 2021
    Posts
    32
    Plugin Contributions
    0

    Default Re: Nested Accordion on Product page?

    Quote Originally Posted by swguy View Post
    Have you pulled in the extra javascript required to do this?
    Yes, the code has been provided in the following link -

    http://www.htmldrive.net/items/show/...n-with-jquery-

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

    Default Re: Nested Accordion on Product page?

    If you post a link to a page that's not working, I (or someone else) might be able to figure out what's wrong.
    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.

  5. #5
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: Nested Accordion on Product page?

    I am not sure I understand the
    But somehow I am not able to make it work on my products page using ckeditor.
    I did a test on a local setup, and forgetting about the ckeditor I was able to display it.
    Here is what I did:

    open
    includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php
    place this code where you want it to display - WATCH for the width, you need that space, it is not responsive.

    HTML Code:
    <script language="javascript" type="text/javascript">
    $(document).ready(function() {
                               $("#accordionGiftLelo").msAccordion();
                               }
                               )
    </script>
    
    <div id="accordionGiftLelo">
      <div class="set">
        <div class="title"><img src="images/DEVIL_EYES_1.jpg" width="29" height="198" /></div>
        <div class="content"><a href="#"><img src="images/devilEyes.jpg" alt="Embroidered Devil Eyes" width="486" height="198" border="0" /></a></div>
      </div>
      <div class="set">
        <div class="title"><img src="images/SPRING_EMBROIDERY_1.jpg" width="29" height="198" /></div>
        <div class="content"><a href="#"><img src="images/spring-emroidery.jpg" alt="Spring Embroidery" width="486" height="198" border="0" /></a></div>
      </div>
    
      <div class="set">
        <div class="title"><img src="images/CHARMING_FAIRY_1.jpg" width="29" height="198" /></div>
        <div class="content"><a href="#"><img src="images/charmingFairy.jpg" alt="" width="486" height="198" border="0" /></a> </div>
      </div>
      <div class="set">
        <div class="title"><img src="images/GEOMETRICAL_1.jpg" width="29" height="198" /></div>
        <div class="content"><a href="#"><img src="images/geomatical_embrodery.jpg" alt="Geometrical Embroidery" width="486" height="198" border="0" /></a><br />
        </div>
    
      </div>
      <div class="set">
        <div class="title"><img src="images/ELEPHANT_LUCK_1.jpg" width="29" height="198" /></div>
        <div class="content"><a href="#"><img src="images/elephant-luck.jpg" alt="Elephant with Luck" width="486" height="198" border="0" /></a></div>
      </div>
      <div class="set">
        <div class="title"><img src="images/LADY_RED_1.jpg" width="29" height="198" /></div>
        <div class="content"><a href="#"><img src="images/lady-in-red.jpg" alt="Lady in Red" width="486" height="198" border="0" /></a></div>
      </div>
    
      <div class="set">
        <div class="title"><img src="images/FIREWORKS_ART_1.jpg" width="29" height="198" /></div>
        <div class="content"><a href="#"><img src="images/fireworks-embroidery.jpg" alt="Fireworks Embroidery Art" width="486" height="198" border="0" /></a></div>
      </div>
    </div>
    Place the jquery-1.3.2.min.js and jquery.msAccordion.js in includes/templates/YOUR_TEMPLATE/jscript directory
    rename jquery.msAccordion.js to jscript_jquery.msAccordion.js
    place images in includes/templates/YOUR_TEMPLATE/images
    change the path of images in the code above to (adding the red from following sample)
    <img src="includes/templates/YOUR_TEMPLATE/images/fireworks-embroidery.jpg"

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Nested Accordion on Product page?

    Place the jquery-1.3.2.min.js and jquery.msAccordion.js in includes/templates/YOUR_TEMPLATE/jscript directory
    Noting that the suggested version of jQuery is woefully old and hackable; current version is 3.5.1 (https://jquery.com/),

  7. #7
    Join Date
    Jan 2021
    Posts
    32
    Plugin Contributions
    0

    Default Re: Nested Accordion on Product page?

    Quote Originally Posted by keneso View Post
    I am not sure I understand the


    I did a test on a local setup, and forgetting about the ckeditor I was able to display it.
    Here is what I did:
    Thanks.
    I would like to have different accordion for different product pages.
    Is your suggestion still applicable for that also?

    I have multiple products and I wish to insert different accordions in different product pages. And I thought it would be easier to use the ckeditor in the products page on the admin side.Is there a way to do it?
    Last edited by RK123; 4 Feb 2021 at 03:34 AM.

  8. #8
    Join Date
    Jan 2021
    Posts
    32
    Plugin Contributions
    0

    Default Re: Nested Accordion on Product page?

    Quote Originally Posted by lat9 View Post
    Noting that the suggested version of jQuery is woefully old and hackable; current version is 3.5.1 (https://jquery.com/),
    Ok, I will use the current version

  9. #9
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: Nested Accordion on Product page?

    Quote Originally Posted by RK123 View Post
    Thanks.
    I would like to have different accordion for different product pages.
    Is your suggestion still applicable for that also?

    I have multiple products and I wish to insert different accordions in different product pages. And I thought it would be easier to use the ckeditor in the products page on the admin side.Is there a way to do it?
    I would say it is possible, and perhaps there would be different possible approaches.
    I would get inspiration from the following thread:
    https://www.zen-cart.com/showthread....egory-products

    I would probably create different accordions, place them in a specific directory, and call them based on the product id as suggested in the linked thread.

    Sorry, but my knowledge stops here. Maybe some of the great coders here will be of more help.

  10. #10
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: Nested Accordion on Product page?

    Quote Originally Posted by lat9 View Post
    Noting that the suggested version of jQuery is woefully old and hackable; current version is 3.5.1 (https://jquery.com/),
    Yep, thank you for pointing it out, I just used the one in the package.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v156 Adding accordion effects to other sideboxes
    By swguy in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 8 Jan 2021, 09:16 PM
  2. nested categoryies and/or product options
    By debowy in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 15 Dec 2011, 07:07 AM
  3. Tell a Friend on Product Page with Accordion Effect
    By ultimate_zc in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 24 Jan 2010, 12:50 AM
  4. Accordion Script - can I add this to my product pages?
    By CharInLasVegas in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 16 Feb 2009, 03:58 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