Page 1 of 1

Move specification tab before description tab in product

Posted: Tue Feb 14, 2017 5:46 am
by celticgi
Hi - anyone know how to move the Specification Tab before the Description Tab in the product view in the default template 2.3.0.2. Lots of spec my products and this would be better.

So it would show Specification/Description/Review

instead of Description/Specification/Review.

Appreciate any help.

Thanks.

Re: Move specification tab before description tab in product

Posted: Wed Feb 15, 2017 5:05 am
by cyclops12
catalog/view/theme/YOUR_THEME/template/product/product.tpl and find

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>
And change it to

Code: Select all

<ul class="nav nav-tabs">
		  <?php if ($attribute_groups) { ?>
            <li><a href="#tab-specification" data-toggle="tab"><?php echo $tab_attribute; ?></a></li>
            <?php } ?>
            <li class="active"><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>

Re: Move specification tab before description tab in product

Posted: Wed Feb 15, 2017 7:18 am
by celticgi
Thanks cyclops. You are the man. This worked. The Specification tab is now first. The only thing is that it still "lands" on the description when you load the product page. I would like it to set on the specification tab instead. How would I do that?

Thanks again for your help. Im nearly there with the upgrade. If you are ever in Dublin let me know, Ill owe ya a few pints!

Re: Move specification tab before description tab in product

Posted: Thu Feb 16, 2017 1:19 am
by cyclops12
You just need to change the "active li"
So it would now be

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>
And if i pop over to dublin in the near future i'll take you up on your offer of a few pints of the black stuff :)

Re: Move specification tab before description tab in product

Posted: Tue Dec 12, 2017 1:13 am
by Peter55
Hi i try the same thing and clear cache but still the same thing. When i click on tab od "specifications" first showing me description text but when i click again to second and back to specifications button then show correct info. What seems to be a problem ? Using latest version. Thank you

Re: Move specification tab before description tab in product

Posted: Wed Dec 13, 2017 3:28 am
by cyclops12
Peter55 wrote:
Tue Dec 12, 2017 1:13 am
Hi i try the same thing and clear cache but still the same thing. When i click on tab od "specifications" first showing me description text but when i click again to second and back to specifications button then show correct info. What seems to be a problem ? Using latest version. Thank you
What exact version are you using ?

Re: Move specification tab before description tab in product

Posted: Fri Jan 12, 2018 10:47 am
by imaginaryplanet
i was wondering the same thing. i got the specs tab as the default tab that shows on page load. but then the page loads the specs tab is blank. but if i click on description then on specs tab. content will show. im using v. 3.0.2.0.

thank you

Re: Move specification tab before description tab in product

Posted: Mon Jan 15, 2018 2:37 am
by cyclops12
You will need to change which tab content is active, but i have just had a look and its best to incorporate it into the IF statement otherwise if you set the Specification Tab to Active then it will not show the Description content if no specs are assigned to the product.
You could try this vqmod

Re: Move specification tab before description tab in product

Posted: Fri Feb 02, 2018 6:56 am
by imaginaryplanet
i tried this xml. and the specs tab shows as default. but its still blank unless i click desc. them specs again.

anything ideas

Re: Move specification tab before description tab in product

Posted: Sat Feb 03, 2018 6:04 pm
by cyclops12
If you could attach your vqmod/vqcache/vq2-catalog_view_theme_YOUR_THEME_template_product_product.twig file i could check