# Ürün Tablı Yapı

Ürünün detaylı bilgisi, yorumlar, taksit seçenekleri, önerileriniz ve özel bilgi alanının kod yapısı

## Görünüm

![Ürün Tablı Yapı](/img/tema/856974749.png)

## Kod Yapısı

### HTML

```twig title="index.html"
<div class="product-detail-tab" data-product-id="{{ product.id }}">
	<div class="product-detail-tab-header d-none d-md-flex">
		<div class="active" data-tab-index="1"><a href="javascript:void(0);">{{ theme.settings.tab_product_info }}</a></div>
        {% if theme.settings.product_detail_page_tabs.display_product_comments %}
            <div class="" data-tab-index="2"><a href="javascript:void(0);">{{ theme.settings.tab_product_comments }}</a></div>
        {% endif %}
        {% if theme.settings.product_detail_page_tabs.display_payment_options %}
            <div class="" data-tab-index="3" data-type="payment-option"><a href="javascript:void(0);">{{ theme.settings.tab_product_payment_options }}</a></div>
        {% endif %}
        {% if theme.settings.product_detail_page_tabs.display_product_feeds %}
            <div class="" data-tab-index="4"><a href="javascript:void(0);">{{ theme.settings.tab_product_feeds }}</a></div>
        {% endif %}
        {% if theme.settings.product_detail_page_tabs.display_special_information_area and product.specialInfo %}
            <div class="" data-tab-index="5"><a href="javascript:void(0);">{{ product.specialInfo.title }}</a></div>
        {% endif %}
    </div>
	<div class="product-detail-tab-content">
        <div class="product-detail-tab-row{% if theme.settings.product_detail_mobile_first_tab %} active{% endif %}">
            <div class="d-block d-md-none{% if theme.settings.product_detail_mobile_first_tab %} active{% endif %}" data-tab-index="1"><a href="javascript:void(0);">{{ theme.settings.tab_product_info }}</a></div>
    		<div class="active" data-tab-content="1">
    			<div class="product-detail">{{ product.details | raw }}</div>
    			{% if product.specs | length > 0 and theme.settings.display_product_attributes %}
    				<div class="product-specs-table">
    					<table class="table">
    						<tbody>
    							{% for spec in product.specs %}
    								<tr>
    									<td>{{ spec.name }}</td>
    									<td>:</td>
    									<td>{{ spec.values | join(', ') }}</td>
    								</tr>
    							{% endfor %}
    						</tbody>
    					</table>
    				</div>
    			{% endif %}
            </div>
        </div>
		<div class="product-detail-tab-row">
            {% if theme.settings.product_detail_page_tabs.display_product_comments %}
                <div class="d-block d-md-none" data-tab-index="2"><a href="javascript:void(0);">{{ theme.settings.tab_product_comments }}</a></div>
                <div class="" data-tab-content="2">{% include 'html/snippets/product/comment.twig' %}</div>
            {% endif %}
        </div>
		<div class="product-detail-tab-row">
            {% if theme.settings.product_detail_page_tabs.display_payment_options %}
                <div class="d-block d-md-none" data-tab-index="3" data-type="payment-option"><a href="javascript:void(0);">{{ theme.settings.tab_product_payment_options }}</a></div>
                <div class="" data-tab-content="3"></div>
            {% endif %}
        </div>
		<div class="product-detail-tab-row">
            {% if theme.settings.product_detail_page_tabs.display_product_feeds %}
                <div class="d-block d-md-none" data-tab-index="4"><a href="javascript:void(0);">{{ theme.settings.tab_product_feeds }}</a></div>
                <div class="" data-tab-content="4">{% include 'html/snippets/product/form/product-feed.twig' %}</div>
            {% endif %}
        </div>
		<div class="product-detail-tab-row">
            {% if theme.settings.product_detail_page_tabs.display_special_information_area and product.specialInfo %}
                <div class="d-block d-md-none" data-tab-index="5"><a href="javascript:void(0);">{{ product.specialInfo.title }}</a></div>
                <div class="" data-tab-content="5"><div>{{ product.specialInfo.content | raw }}</div></div>
            {% endif %}
        </div>
	</div>
</div>
```

### SCSS

```scss title="style.css"
/* Product Detail Tab */
.product-detail-tab {
    margin-bottom: var(--spacer-8);
    .product-detail-tab-header {
        align-items: center;
        margin-right: calc(-1*var(--spacer-4));
        margin-left: calc(-1*var(--spacer-4));
        [data-tab-index] {
            padding-right: var(--spacer-4);
            padding-left: var(--spacer-4);
            > a {
                @include center;
                height: 40px;
                color: $color-sub-text;
                font-size: var(--font-size-20);
                border-bottom: 1px solid transparent;
            }
            &.active {
                > a {
                    color: $color-primary;
                    font-weight: 700;
                    border-bottom-color: $color-primary;
                }
            }
        }
    }
	.product-detail-tab-content {
		[data-tab-content] {
			height: 0;
            overflow: hidden;
			> div {
                padding: var(--spacer-6) 0;
			}
			&.active {
				height: auto;
                overflow: visible;
                @include min($sm) {
                    display: block !important;
                }
            }
		}
	}
	@include max($md) {
		.product-detail-tab-header {
            overflow-x: auto;
            scroll-snap-type: x mandatory;
		}
	}
    @include max($sm) {
        .product-detail-tab-content {
            .product-detail-tab-row {
                margin-bottom: var(--spacer-8);
                [data-tab-index] {
                    > a {
                        position: relative;
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        height: 50px;
                        color: $color-text;
                        font-size: var(--font-size-20);
                        padding: 0 var(--spacer-8);
                        background-color: $color-border;
                        &:after {
                            content: '\f078';
                            font-weight: 900;
                            font-size: var(--font-size-24);
                            font-family: "Font Awesome 5 Free";
                            transition: $transition;
                        }
                    }
                }
                [data-tab-content] {
                    height: 0 !important;
                    overflow: hidden !important;
                    > div {
                        padding-bottom: 0;
                    }
                }
                &.active {
                    [data-tab-index] {
                        > a {
                            color: $color-white;
                            background-color: $color-primary;
                            &:after {
                                transform: rotate(-180deg);
                            }
                        }
                    }
                    [data-tab-content] {
                        &.active {
                            height: auto !important;
                            overflow: visible !important;
                        }
                    }
                }
            }
        }
    }
}
```

### JSON

```json title="index.js"
"tab_product_info": {
    "type": "text",
    "default_value": "Ürün Bilgisi",
    "label": "Ürün Bilgisi"
},
"tab_product_comments": {
    "type": "text",
    "default_value": "Yorumlar",
    "label": "Yorumlar"
},
"tab_product_payment_options": {
    "type": "text",
    "default_value": "Taksit Seçenekleri",
    "label": "Taksit Seçenekleri"
},
"tab_product_feeds": {
    "type": "text",
    "default_value": "Önerileriniz",
    "label": "Önerileriniz"
},
```
