Close Accordian Tabs by Default - by Al - on WordPress WooCommerce support

This topic has 17 replies, 3 voices, and was last updated 6 years, 2 months ago ago by Rose Tyler

  • Avatar: Al
    Al
    Participant
    January 22, 2018 at 18:31

    Hi, I previously opened the thread: https://www.8theme.com/topic/close-accordian-tabs-by-default/

    The modifications to the tabs.php file of version 1.0.0.

    However, that is an outdated template file, as the newest is 2.4.0. However, when I tried to change the 2.4.0 file by removing the line <?php if($i == 1) echo ‘style=”display:block;”‘; ?> and replacing it into xstore-child / single-product / tabs / tabs.php, the tabs turn to: https://i.imgur.com/F8tnpdH.png

    The tabs with the old file looked like this: https://i.imgur.com/osB7GTy.png

    How can I fix this? Is there any other changes I should have made to the tabs.php file other tahn remove the line stated above?

    16 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 23, 2018 at 08:41

    Hello,

    I’ve checked your site and see http://prntscr.com/i4adng There using the old or new file?
    Please explain the desired result of displaying.

    Regards

    Avatar: Al
    Al
    Participant
    January 23, 2018 at 17:12

    Yes – that is the old file (tabs.php version 1.0.0). However, I would like to update it to version 2.4.0, and tried to do so simply by removing the line:

    <?php if($i == 1) echo ‘style=”display:block;”‘; ?>

    in xstore-child / single-product / tabs / tabs.php but that created this result: https://imgur.com/F8tnpdH which is different than the old file.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 24, 2018 at 09:37

    Hello,

    Please provide wp-admin and FTP access in Private Content, because of credentials from the previous post are incorrect.

    Regards

    Avatar: Al
    Al
    Participant
    January 24, 2018 at 17:24

    Hi Rose,
    New details are enclosed in private content.
    Thanks!

    Please, contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    January 24, 2018 at 18:23

    Hello,

    Check now.

    Regards

    Avatar: Al
    Al
    Participant
    January 24, 2018 at 21:12

    Hi Olga,

    The tabs file is still version 1.0.0. https://i.imgur.com/tiVCbjX.png

    I would like to update it to version 2.4.0.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 25, 2018 at 08:14

    Hello,

    Please check now https://prnt.sc/i59z82

    Regards

    Avatar: Al
    Al
    Participant
    January 25, 2018 at 21:27

    Thanks for updating the file. What changes did you make?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 26, 2018 at 08:15

    Hello,

    You’re welcome!
    We made changes in etheme.js + etheme.min.js, tabs.php and custom css (Theme Options > Stylimg > Custom css).

    Regards

    Avatar: Al
    Al
    Participant
    January 26, 2018 at 22:02

    Hi there –
    please specify exactly what code was removed or added in each file so that I can replicate the changes if needed.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 29, 2018 at 08:35

    Hello,

    these removed http://prntscr.com/i70wu9
    this added http://prntscr.com/i70wm7
    Then you need also to find these lines http://prntscr.com/hscf4q (xstore/js/etheme.js) and comment, like on screenshot https://prnt.sc/hscfex Then copy content of this file and minify it https://jscompress.com/, replace content of etheme.min.js file
    and added custom css in your custom css area in options http://prntscr.com/i70yah

    .single-product .tabs .opened-parent:not(.et-opened) .tab-title.first-tab-opened:after {
        content: '\f107';
        margin-top: -11px;
    }

    Regards

    Avatar: Al
    Al
    Participant
    February 15, 2018 at 19:57

    Hi again,

    Due to the new update, I have commented out the two lines:
    //$this.find(‘.tab-title’).first().addClass(‘opened’).parent().addClass(‘et-opened’);
    //$this.find(‘.accordion-title’).first().addClass(‘opened’);
    of the xstore/js/etheme.js

    However, when I went to jscompress.com, I got this error:
    In strict mode code, functions can only be declared at top level or immediately within another function. (line: 2885, col: 16)

    Please help with this as soon as you can. Thanks.

    Please, contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 16, 2018 at 11:15

    Hello,

    Please check now.

    Regards

    Avatar: Al
    Al
    Participant
    February 17, 2018 at 20:34

    What exactly did you do? Please describe in detail so I can do the same in the future if I encounter such an error.

    Avatar: Al
    Al
    Participant
    February 18, 2018 at 18:41

    Also, I have the infinite scroll plugin activated and it was working previously, but now it is showing up like this: https://i.imgur.com/oWsj03V.jpg

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 19, 2018 at 08:26

    Hello,

    1. We did the same changes as you but used another js minifier.
    2. Please read our documentation https://xstore.helpscoutdocs.com/article/65-woocommerce-infinite-scroll-and-ajax-pagination-settings

    Regards

  • Viewing 17 results - 1 through 17 (of 17 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.