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:
- 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 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}