Close

Product attributes as a TAB

e3io
9 years ago
#10101 Quote
Avatar
  • 3
I would like to place the product attributes in a tab.
What code can be placed inside the _ProductDescriptionTab.cshtml file to do this?
I'm not interested that the description is on a tab, I would replace it with the product attributes.
Any guidance would be welcome.

Thanks...!
Deni
9 years ago
#10102 Quote
Avatar
  • Moderator
  • 389
e3io wrote:
I would like to place the product attributes in a tab.
What code can be placed inside the _ProductDescriptionTab.cshtml file to do this?
I'm not interested that the description is on a tab, I would replace it with the product attributes.
Any guidance would be welcome.

Thanks...!


Hi, 

The Quick Tabs plugin can show the specification attributes in tab.

The product attributes are not made in tabs, because they have more specific purpose. For example any of them can be made required and when the customer click the "Add To Cart" button he will see for example "Please select HDD". But the customer does not know that the attributes are below in the tabs and this can be confusing and make the customer leave this page. That is why we have decided to not make "Product Attributes" tab.

Anyway, you can suggest this functionality in our user voice portal.

I hope this helped !
Best Regards,
Mladen Staykov
Nop-Templates.com
e3io
9 years ago
#10103 Quote
Avatar
  • 3
I understand and agree with you, but I modified the .CSS classes and some .cshtml, now all tabs are displayed on the same page and now the tabs are anchors that send the user to the level of the page he chooses.

I just thought that as it is shows the product specifications, I could replace it and shows the product attributes, modifying the code in some .cshtml file .

If you know how to do this please let me know.
Thank you.
Deni
9 years ago
#10105 Quote
Avatar
  • Moderator
  • 389
e3io wrote:
I understand and agree with you, but I modified the .CSS classes and some .cshtml, now all tabs are displayed on the same page and now the tabs are anchors that send the user to the level of the page he chooses.

I just thought that as it is shows the product specifications, I could replace it and shows the product attributes, modifying the code in some .cshtml file .

If you know how to do this please let me know.
Thank you.


Hi, 

No, it would not be possible to modify the cshtml and get the product attributes shown. The only thing I can think of is this one using some JS:

1. Create a custom tab.
2. For description - open the Tools > Source code of the editor
3. Place this code inside and save:

<div id="quick-tabs-product-attributes-wrapper"></div>
<script type="text/javascript">
// <![CDATA[
  (function(){
    $(document).ready(function(){
      $('.product-essential .attributes').appendTo('#quick-tabs-product-attributes-wrapper').show();
    });
  })();
// ]]>
</script>


4. Map the tab to the desired products manually or by using conditions.

5. For even better results you can do this:
- the attributes are inside this element: <div class="attributes">
- because it is moved with JavaScript you will see the DIV until the JS loads and move it
- to avoid this create a new product template which has the DIV hidden like this: <div class="attributes" style="display: none;">
- now everything will look perfect

NOTE: this modification was not tested for all possible cases and might lead to unexpected behaviour.



I hope this will help you !
Best Regards,
Mladen Staykov
Nop-Templates.com
e3io
9 years ago
#10108 Quote
Avatar
  • 3
Thank you so much Mladen.
Your instructions really helped me.
Problem solved
Thanks again.