Jump to content

Move short descriptions into a new tab


Recommended Posts

Edit  file /themes/warehouse/js/product.js

Add below code after $(document).ready(function(){

 

$('#center_column ul > li:nth-child(3)').appendTo('<li><a href="#ingredientsTab" data-toggle="tab" id="tab_ingredients_link">Ingredients</a></li>');

$('#reviewsTab').appendTo('<section class="page-product-box tab-pane fade" id="ingredientsTab"><div id="ingredients_content"></div>. </section>');

$(#ingredients_content).html($('#short_description_content').html());

$(#short_description_content).html('');

 

Hope it helps :)

Link to comment
Share on other sites

 

Edit  file /themes/warehouse/js/product.js
Add below code after $(document).ready(function(){
 
$('#center_column ul > li:nth-child(3)').appendTo('<li><a href="#ingredientsTab" data-toggle="tab" id="tab_ingredients_link">Ingredients</a></li>');
$('#reviewsTab').appendTo('<section class="page-product-box tab-pane fade" id="ingredientsTab"><div id="ingredients_content"></div>. </section>');
$(#ingredients_content).html($('#short_description_content').html());
$(#short_description_content).html('');
 
Hope it helps :)

 

 

Thanks Knowband,

 

We have found 4 lines with "$(document).ready(function(){". And have added the code after each line (tested 4 times), but the was no change on the website.

 

Natebc

Link to comment
Share on other sites

Have you removed this code from your site as we are not able to see shared code on your product page. If you haven't removed code, please clear Prestashop cache from back office and try again.

 

PS: you can add this code after only one .ready statement. No need to add it at all four positions.

Link to comment
Share on other sites

Have you removed this code from your site as we are not able to see shared code on your product page. If you haven't removed code, please clear Prestashop cache from back office and try again.

 

PS: you can add this code after only one .ready statement. No need to add it at all four positions.

 

 

Yes We have clear cache in Advanced Parameters>Performance.

We tried once each line and clear the cache ever time we upload the file (4 times). but there was no change. 

Link to comment
Share on other sites

Hi,

 

When we are checking our code on your site, we are not able to find it in below file.

http://www.thatsallnatural.com/themes/warehouse/js/product.js

 

Since code is not coming in this file, it is not making the desired changes. Please ensure that you are making changes in the correct file. If it's a testing site, you can contact us with FTP details so that we can check.

Link to comment
Share on other sites

Hi,

 

So

 

Hi,

 

When we are checking our code on your site, we are not able to find it in below file.

http://www.thatsallnatural.com/themes/warehouse/js/product.js

 

Since code is not coming in this file, it is not making the desired changes. Please ensure that you are making changes in the correct file. If it's a testing site, you can contact us with FTP details so that we can check.

Hi 

Sorry we removed the code each time. I just upload the file again with the code. Please take a look.

Thanks

Link to comment
Share on other sites

It is still not there in below file.

 

http://www.thatsallnatural.com//themes/warehouse/js/product.js

 

When you upload the code, try to search it in above URL. It must reflect there.

 

Here is the file that we have uploaded

http://www.filedropper.com/product

 

Photo

https://s31.postimg.org/h9ok1wycb/A_new_tab1.jpg

Edited by natebc (see edit history)
Link to comment
Share on other sites

Not sure why but it is still not reflecting at out end. Please check screenshot.

 

If it is reflecting at your end, try inserting below code. Earlier we missed single quotes at multiple places. Apologies for that.

 

$('#center_column ul > li:nth-child(3)').appendTo('<li><a href="#ingredientsTab" data-toggle="tab" id="tab_ingredients_link">Ingredients</a></li>');
$('#reviewsTab').appendTo('<section class="page-product-box tab-pane fade" id="ingredientsTab"><div id="ingredients_content"></div>. </section>');
$('#ingredients_content').html($('#short_description_content').html());
$('#short_description_content').html('');

post-1143162-0-50701200-1467726718_thumb.png

Edited by Knowband Plugins (see edit history)
Link to comment
Share on other sites

 

Not sure why but it is still not reflecting at out end. Please check screenshot.

 

If it is reflecting at your end, try inserting below code. Earlier we missed single quotes at multiple places. Apologies for that.

 

$('#center_column ul > li:nth-child(3)').appendTo('<li><a href="#ingredientsTab" data-toggle="tab" id="tab_ingredients_link">Ingredients</a></li>');
$('#reviewsTab').appendTo('<section class="page-product-box tab-pane fade" id="ingredientsTab"><div id="ingredients_content"></div>. </section>');
$('#ingredients_content').html($('#short_description_content').html());
$('#short_description_content').html('');

 

 

We have upload the code below:

$('#center_column ul > li:nth-child(3)').appendTo('<li><a href="#ingredientsTab" data-toggle="tab" id="tab_ingredients_link">Ingredients</a></li>');

$('#reviewsTab').appendTo('<section class="page-product-box tab-pane fade" id="ingredientsTab"><div id="ingredients_content"></div>. </section>');

$('#ingredients_content').html($('#short_description_content').html());

$('#short_description_content').html('');

 

Please have a look thanks.

Edited by natebc (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...