Combine Product Description And Features Tab

Hi guys,



Is there any way to combine/display the Description and Features tab under one tab, and other tabs remain unchanged?

Hi @ghostrider,



Please follow steps bellow:


  1. Disable Features Tab & you can also rename Description tab is this is the case ex: Description & Features

Design > Product tabs



2. add to

#fileapp/addons/my_changes/controllers/frontend/products.post.php

#content```php

/*
(c) 2014 HungryWeb.net | Support at yum@hungryweb.net
*/
use Tygh\Registry;
if (!defined('BOOTSTRAP')) { die('Access denied'); }
if($mode=='view'){
$product = Registry::get('view')->getTemplateVars('product');
Registry::get('view')->assign('product_features', $product['product_features']);
$product['full_description'] .= Registry::get('view')->fetch('views/products/components/product_features.tpl');
Registry::get('view')->assign('product', $product);
}
```

My changes add-on is required for this to work and also is category structure or file is missing you need to create it

I hope that helps,

---
Valentin
[color=#808080][size=2]part of hungryweb.net[/size][/color]

Hi Vali, thank you for the help! It works!



Could you please teach me how to display Features above Description?

[quote name='ghostrider' timestamp='1402472491' post='185509']

Hi Vali, thank you for the help! It works!



Could you please teach me how to display Features above Description?

[/quote]



You are welcome.



#replace


$product['full_description'] .= Registry::get('view')->fetch('views/products/components/product_features.tpl');


#with


$product['full_description'] = Registry::get('view')->fetch('views/products/components/product_features.tpl').$product['full_description'];




I hope that helps,





Valentin

[color=#808080][size=2]part of hungryweb.net[/size][/color]

Thank you very much!

You are welcome

great! :) this is what i was looking for.

Btw, where could I add one or two
between description and features so there would be some spacing??

[quote name=‘UrKo’ timestamp=‘1408767488’ post=‘190384’]

great! :) this is what i was looking for.

Btw, where could I add one or two
between description and features so there would be some spacing??

[/quote]

You just need to



#replace

<br />
$product['full_description'] .= Registry::get('view')->fetch('views/products/components/product_features.tpl');<br />

```<br />
<br />
#with<br />
```php
<br />
$product['full_description'] .= '<br/><br/>'.Registry::get('view')->fetch('views/products/components/product_features.tpl');<br />

```<br />
<br />
I hope that helps,<br />
<br />
---<br />
Valentin<br />
[color=#808080][size=2]part of hungryweb.net[/size][/color]

thanks… :)

Does this still work in version 4.3.3?

I tried this but the Description does not show up in the tab content, only the features list.

It should. Make sure your description is not empty

Alternative variant is to create new tab and put HTML block with Smarty support to it with the following code:

{if $product.full_description}
    
{$product.full_description nofilter}
{else if $product.short_description}
{$product.short_description nofilter}
{/if}
{include file="views/products/components/product_features.tpl" product_features=$product.product_features details_page=true}

Default Description and Features tab can be disabled in this case and no code changes are required

eComLabs very smart! :)

I have unchecked "Display product details in tabs:" in settings, now description and features are in row below each other. Delivery in similar tabs in ?dispatch=tabs.manage made as popup (Show this tab in a popup window)

eComLabs - that worked perfectly..thanks!

eComLabs - that worked perfectly..thanks!

You are welcome!

Alternative variant is to create new tab and put HTML block with Smarty support to it with the following code:

{if $product.full_description}
    
{$product.full_description nofilter}
{else if $product.short_description}
{$product.short_description nofilter}
{/if}
{include file="views/products/components/product_features.tpl" product_features=$product.product_features details_page=true}

Default Description and Features tab can be disabled in this case and no code changes are required

Hello,

sorry to reopen this old topic.

Is there also a way to include the "Sellers of this product" content in this customized tab? I would like to have the freedom to include this. However, I haven't found a solution yet how to call the "Sellers of this product" block in an HTML block with Smarty.

Hello,

sorry to reopen this old topic.

Is there also a way to include the "Sellers of this product" content in this customized tab? I would like to have the freedom to include this. However, I haven't found a solution yet how to call the "Sellers of this product" block in an HTML block with Smarty.

Do you mean tab from the Common products addon?

I created a new tab under Design > Product tabs and added an HTML Block with Smarty support. There I put the code above. Now a new tab is displayed on the product page, which first shows the description and then the features. I am looking for help for the code in the HTML Block that shows me the content of the original tab "Sellers of this product". My goal is to display the sellers, description and features in one tab and the attachments in another tab. Since the function of the tabs should be preserved and there should be two tabs, the option to display all content without tabs is unfortunately out of the question.

I have no Multi-Vendor with the Common products module installed. All you need is to include tab template. The code will be like this

{include file="addons/COMMON_PRODUCTS_ADDON/blocks/product_tabs/TAB_TEMPLATE.tpl}
Thank you for the direction.
Unfortunately, I only find the following path and file: {include file="addons/master_products/blocks/products/vendor_products.tpl"} and this unfortunately does not lead to the desired display of the sellers.
I suspect that the correct content would still need to be set in the include, as now everything just remains empty. The file looks like this:
cat vendor_products.tpl
{if $items|default:[]}
{$show_add_to_wishlist=$_show_add_to_wishlist|default:true}
{$first_vendor_product = reset($items)}
data-ca-seller-list-request-product-id="{$smarty.request.product_id}"
id="sellers_list_{$first_vendor_product.master_product_id}">
{foreach $items as $vendor_product}
{$company_id = $vendor_product.company_id}
{$product_id = $vendor_product.product_id}
{$obj_prefix = "`$company_id`-"}
{if !empty($vendor_product.min_qty)}
{$amount=$vendor_product.min_qty}
{elseif !empty($vendor_product.qty_step)}
{$amount=$vendor_product.qty_step}
{else}
{$amount="1"}
{/if}
method="post"
name="vendor_products_form_{$company_id}"
enctype="multipart/form-data"
class="cm-disable-empty-files cm-ajax cm-ajax-full-render cm-ajax-status-middle"
data-ca-master-products-element="product_form"
data-ca-master-products-master-product-id="{$vendor_product.master_product_id}"
data-ca-master-products-product-id="{$vendor_product.product_id}"
>
{foreach from=$product.selected_options key=option_id item=option_value}
{/foreach}
{$show_logo = $vendor_product.company.logos}
{include file="common/company_data.tpl"
company=$vendor_product.company
show_name=true
show_links=true
show_logo=$show_logo
show_city=true
show_country=true
show_rating=true
show_posts_count=false
show_location=true
}
{hook name="companies:vendor_products"}
{$logo="logo_`$company_id`"}
{$smarty.capture.$logo nofilter}
{$name="name_`$company_id`"}
{$smarty.capture.$name nofilter}
{$rating="rating_`$company_id`"}
{$smarty.capture.$rating nofilter}
{$location="location_`$company_id`"}
{if $smarty.capture.$location|trim}
{/if}
{include file="common/product_data.tpl"
product=$vendor_product
obj_prefix="vendor_product"
show_add_to_cart=true
show_amount_label=false
show_product_amount=true
show_add_to_wishlist=true
show_buy_now=false
show_product_options=true
hide_compare_list_button=true
}
{/foreach}
{/if}