Post by alynxs » Mon Aug 07, 2017 12:42 pm

Hello, i`m using OpenCart 2.1.0.1.

I have a question, how can i set the website to automatically move to specification tab if no description for a product is entered?

I don`t want my clients to enter a product page and see the description tab but with no words after it, i want to automatically enter the product page and appears the specifications tab BUT ONLY if description misses.

Newbie

Posts

Joined
Tue Jul 25, 2017 2:50 am

Post by NickAircoshop » Wed Oct 11, 2017 10:04 pm

This can be done by changing the code in product.tpl

Change this code:

Code: Select all

 <ul class="nav nav-tabs">
            <li class="active"><a href="#tab-description" data-toggle="tab"><?php echo $tab_description; ?></a></li>
            <?php if ($attribute_groups) { ?>
            <li><a href="#tab-specification" data-toggle="tab"><?php echo $tab_attribute; ?></a></li>
            <?php } ?>
            <?php if ($review_status) { ?>
            <li><a href="#tab-review" data-toggle="tab"><?php echo $tab_review; ?></a></li>
            <?php } ?>
          </ul>
you have to change it for this:

Code: Select all

          <ul class="nav nav-tabs">
            <?php if ($attribute_groups) { ?>
            <li class="active"><a href="#tab-specification" data-toggle="tab"><?php echo $tab_attribute; ?></a></li>
            <?php } ?>
             <li><a href="#tab-description" data-toggle="tab"><?php echo $tab_description; ?></a></li>
            <?php if ($review_status) { ?>
            <li><a href="#tab-review" data-toggle="tab"><?php echo $tab_review; ?></a></li>
            <?php } ?>
          </ul>

User avatar
New member

Posts

Joined
Fri Aug 11, 2017 3:43 pm
Who is online

Users browsing this forum: No registered users and 28 guests