New Tab in Product Details

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon Aug 19, 2013 2:44 pm
Reply with quote
Report this post
Hi, I saw a post on setting up a new tab in the product details page for the likes of a product specification and I was wondering if there were any more detailed instructions on how to accomplish this. I also understand that double posting is probably frowned upon but there has been no answer on that post and it a few months old so I figure a new post will help me get some assistance.

Link to other post:
https://www.gavick.com/forums/storebox- ... 27374.html

At the moment I can add a new tab which I called “product-spec” but I can’t figure out how to get the content into it.

Here is what I have done:
In details.php I added a new “li” element as mentioned in the other post.
Html/com_virtuemart/productdetails/details.php on line 381

I added this line just after the product description code.
Code: Select all
<li data-toggle="product-spec"><?php echo JText::_('Product Specification') ?></li>


And in my product description inside VirtueMart I add some new content below the description.

Code: Select all
<div class="product-spec gk-product-tab">
Specification content goes here
</div>


I know I am missing something because it’s not working, I just don’t know what. Any help would be greatly appreciated.

Thanks in advance


Red
User avatar
Fresh Boarder

GK User
Mon Aug 19, 2013 4:55 pm
Reply with quote
Report this post
Hi, I just wanted to add a quick follow up post. I have figured out why that solution would not work for me.

When adding content for the new tab in the editor in the back end, all of that content gets wrapped in a div like so:

Code: Select all
<div class="product-description gk-product-tab">
Normal product description goes here
</div>


Which is fine. But when I added content for a new tab it gets wrapped in the same div.
(Html output)
Code: Select all
<div class="product-description gk-product-tab">
Normal product description goes here

<div class="product-spec gk-product-tab">
Specification content goes here
</div>
</div>


And therefore the content does not go into a new tab.

The solution was to do this:
(In the editor in the backend)
Code: Select all
Normal product description goes here

</div><!-- close div to start new tab -->
<div class="product-spec gk-product-tab">
Specification content goes here
</div>
<div><!-- start new div to match closing one -->


It worked perfectly. It was simply a matter of div being wrapped oddly.


Red
User avatar
Fresh Boarder


cron