Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Combine Product Description And Features Tab Rate Topic   - - - - -

 
  • ghostrider
  • Junior Member
  • Members
  • Join Date: 05-Jan 11
  • 177 posts

Posted 11 June 2014 - 03:24 AM #1

Hi guys,

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

 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1278 posts

Posted 11 June 2014 - 04:04 AM #2

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
#file
app/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
part of hungryweb.net

 
  • ghostrider
  • Junior Member
  • Members
  • Join Date: 05-Jan 11
  • 177 posts

Posted 11 June 2014 - 07:41 AM #3

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

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

 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1278 posts

Posted 11 June 2014 - 11:26 AM #4

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

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


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
part of hungryweb.net

 
  • ghostrider
  • Junior Member
  • Members
  • Join Date: 05-Jan 11
  • 177 posts

Posted 13 June 2014 - 12:12 AM #5

Thank you very much!

 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1278 posts

Posted 13 June 2014 - 02:33 AM #6

You are welcome

 
  • UrKo
  • Junior Member
  • Members
  • Join Date: 08-Dec 06
  • 162 posts

Posted 23 August 2014 - 04:18 AM #7

great! :) this is what i was looking for.
Btw, where could I add one or two <br /> between description and features so there would be some spacing??
UrKo

 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1278 posts

Posted 23 August 2014 - 06:54 AM #8

great! :) this is what i was looking for.
Btw, where could I add one or two <br /> between description and features so there would be some spacing??

You just need to

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

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

I hope that helps,

---
Valentin
part of hungryweb.net

 
  • UrKo
  • Junior Member
  • Members
  • Join Date: 08-Dec 06
  • 162 posts

Posted 23 August 2014 - 07:12 AM #9

thanks.. :)
UrKo

 
  • leomis
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Jan 09
  • 6 posts

Posted 14 December 2015 - 07:22 PM #10

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.



 
  • galtinbaeva
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 06-Dec 13
  • 3628 posts

Posted 15 December 2015 - 06:02 AM #11

It should. Make sure your description is not empty


Simtech Development | sales@simtechdev.com | www.simtechdev.com
CERTIFIED CS-CART PARTNER | LICENSES | DEVELOPMENT | ADD-ONS | DESIGN | UPGRADE

Google Analytics Enhanced Ecommerce - get advanced ecommerce analytics


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 22192 posts

Posted 15 December 2015 - 07:44 AM #12

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

{if $product.full_description}
    <div {live_edit name="product:full_description:{$product.product_id}"}>{$product.full_description nofilter}</div>
{else if $product.short_description}
    <div {live_edit name="product:short_description:{$product.product_id}"}>{$product.short_description nofilter}</div>
{/if}
<br/>
{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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3541 posts

Posted 15 December 2015 - 08:09 AM #13

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)



 
  • leomis
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Jan 09
  • 6 posts

Posted 15 December 2015 - 05:09 PM #14

eComLabs - that worked perfectly..thanks!



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 22192 posts

Posted 16 December 2015 - 07:47 AM #15

eComLabs - that worked perfectly..thanks!

 

You are welcome!


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • juntro
  • Newbie
  • Members
  • Join Date: 30-Jul 21
  • 3 posts

Posted 30 July 2021 - 11:31 AM #16

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

{if $product.full_description}
    <div {live_edit name="product:full_description:{$product.product_id}"}>{$product.full_description nofilter}</div>
{else if $product.short_description}
    <div {live_edit name="product:short_description:{$product.product_id}"}>{$product.short_description nofilter}</div>
{/if}
<br/>
{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.  



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 22192 posts

Posted 30 July 2021 - 01:03 PM #17

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?


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • juntro
  • Newbie
  • Members
  • Join Date: 30-Jul 21
  • 3 posts

Posted 03 August 2021 - 07:47 AM #18

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.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 22192 posts

Posted 03 August 2021 - 01:28 PM #19

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}

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • juntro
  • Newbie
  • Members
  • Join Date: 30-Jul 21
  • 3 posts

Posted 04 August 2021 - 11:08 AM #20

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)}
    <div class="ty-sellers-list js-sellers-list"
         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}
 
        <div class="ty-sellers-list__item">
            <form action="{""|fn_url}"
                  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}"
            >
                <input type="hidden" name="result_ids" value="cart_status*,wish_list*,checkout*,account_info*,average_rating*"/>
                <input type="hidden" name="redirect_url" value="{$redirect_url|default:$config.current_url}" />
                <input type="hidden" name="product_data[{$product_id}][product_id]" value="{$product_id}" />
                <input type="hidden" name="product_data[{$product_id}][amount]" value="{$amount}" />
                {foreach from=$product.selected_options key=option_id item=option_value}
                    <input type="hidden" name="product_data[{$product.product_id}][product_options][{$option_id}]" value="{$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
                }
 
                <div class="ty-sellers-list__content">
 
                    {hook name="companies:vendor_products"}
                    <div class="ty-sellers-list__image">
                        {$logo="logo_`$company_id`"}
                        {$smarty.capture.$logo nofilter}
                    </div>
 
                    <div class="ty-sellers-list__title">
                        {$name="name_`$company_id`"}
                        {$smarty.capture.$name nofilter}
 
                        {$rating="rating_`$company_id`"}
                        <div class="sellers-list__rating">
                            {$smarty.capture.$rating nofilter}
                        </div>
                    </div>
 
                    {$location="location_`$company_id`"}
                    {if $smarty.capture.$location|trim}
                        <div class="ty-sellers-list__item-location">
                            <a href="{"companies.products?company_id=`$company_id`"|fn_url}" class="company-location"><bdi>
                                    {$smarty.capture.$location nofilter}
                            </bdi></a>
                        </div>
                    {/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
                    }
 
                    <div class="ty-sellers-list__controls">
                        {$product_amount = "product_amount_`$product_id`"}
                        {$smarty.capture.$product_amount nofilter}
 
                        <div class="ty-sellers-list__price">
                            <a class="ty-sellers-list__price-link"
                               href="{"products.view?product_id={$product_id}"|fn_url}"
                            >
                                {include file="common/price.tpl"
                                    value=$vendor_product.price
                                    class="ty-price-num"
                                }
                            </a>
 
                            {if $addons.reward_points.status == "A"}
                                {include file="addons/reward_points/views/products/components/product_representation.tpl"
                                    product=$vendor_product
                                }
                            {/if}
                        </div>
 
                        <div class="ty-sellers-list__buttons">
                            {hook name="vendor_products:list_buttons"}
                                {$add_to_cart = "add_to_cart_`$product_id`"}
                                {$smarty.capture.$add_to_cart nofilter}
 
                                {$list_buttons = "list_buttons_`$product_id`"}
                                {$smarty.capture.$list_buttons nofilter}
                            {/hook}
                        </div>
 
                    </div>
                    {/hook}
                </div>
            </form>
        </div>
    {/foreach}
    <!--sellers_list_{$first_vendor_product.master_product_id}--></div>
{/if}