Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

Как добавить табы в карточку товара


Recommended Posts

Привет всем. Собственно вопрос такой. Есть сайт_http://chemodano.com.ua/. Но в карточке товара все характеристики (Описание, похожие товары и Коментарии) идут не табами а просто друг за другом. Как сделать их табами?

Надіслати
Поділитися на інших сайтах


Привет всем. Собственно вопрос такой. Есть сайт_http://chemodano.com.ua/. Но в карточке товара все характеристики (Описание, похожие товары и Коментарии) идут не табами а просто друг за другом. Как сделать их табами?

переписать код из дефолтного в карточке товара

 

вот табы в дефолтном шаблоне

<div id="tabs" class="htabs"><a href="#tab-description"><?php echo $tab_description; ?></a>
    <?php if ($attribute_groups) { ?>
    <a href="#tab-attribute"><?php echo $tab_attribute; ?></a>
    <?php } ?>
    <?php if ($review_status) { ?>
    <a href="#tab-review"><?php echo $tab_review; ?></a>
    <?php } ?>
    <?php if ($products) { ?>
    <a href="#tab-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a>
    <?php } ?>
  </div>
  <div id="tab-description" class="tab-content"><?php echo $description; ?></div>
  <?php if ($attribute_groups) { ?>
  <div id="tab-attribute" class="tab-content">
    <table class="attribute">
      <?php foreach ($attribute_groups as $attribute_group) { ?>
      <thead>
        <tr>
          <td colspan="2"><?php echo $attribute_group['name']; ?></td>
        </tr>
      </thead>
      <tbody>
        <?php foreach ($attribute_group['attribute'] as $attribute) { ?>
        <tr>
          <td><?php echo $attribute['name']; ?></td>
          <td><?php echo $attribute['text']; ?></td>
        </tr>
        <?php } ?>
      </tbody>
      <?php } ?>
    </table>
  </div>
  <?php } ?>
  <?php if ($review_status) { ?>
  <div id="tab-review" class="tab-content">
    <div id="review"></div>
    <h2 id="review-title"><?php echo $text_write; ?></h2>
    <b><?php echo $entry_name; ?></b><br />
    <input type="text" name="name" value="" />
    <br />
    <br />
    <b><?php echo $entry_review; ?></b>
    <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea>
    <span style="font-size: 11px;"><?php echo $text_note; ?></span><br />
    <br />
    <b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span> 
    <input type="radio" name="rating" value="1" />
     
    <input type="radio" name="rating" value="2" />
     
    <input type="radio" name="rating" value="3" />
     
    <input type="radio" name="rating" value="4" />
     
    <input type="radio" name="rating" value="5" />
     <span><?php echo $entry_good; ?></span><br />
    <br />
    <b><?php echo $entry_captcha; ?></b><br />
    <input type="text" name="captcha" value="" />
    <br />
    <img src="index.php?route=product/product/captcha" alt="" id="captcha" /><br />
    <br />
    <div class="buttons">
      <div class="right"><a id="button-review" class="button"><?php echo $button_continue; ?></a></div>
    </div>
  </div>
  <?php } ?>
  <?php if ($products) { ?>
  <div id="tab-related" class="tab-content">
    <div class="box-product">
      <?php foreach ($products as $product) { ?>
      <div>
        <?php if ($product['thumb']) { ?>
        <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
        <?php } ?>
        <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
        <?php if ($product['price']) { ?>
        <div class="price">
          <?php if (!$product['special']) { ?>
          <?php echo $product['price']; ?>
          <?php } else { ?>
          <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
          <?php } ?>
        </div>
        <?php } ?>
        <?php if ($product['rating']) { ?>
        <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
        <?php } ?>
        <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a></div>
      <?php } ?>
    </div>
  </div>

 

их css:

.htabs {
	height: 30px;
	line-height: 16px;
	border-bottom: 1px solid #DDDDDD;
}
.htabs a {
	border-top: 1px solid #DDDDDD;
	border-left: 1px solid #DDDDDD;
	border-right: 1px solid #DDDDDD;
	background: #FFFFFF url('../image/tab.png') repeat-x;
	padding: 7px 15px 6px 15px;
	float: left;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
	font-weight: bold;
	text-align: center;
	text-decoration: none;
	color: #000000;
	margin-right: 2px;
	display: none;
}
.htabs a.selected {
	padding-bottom: 7px;
	background: #FFFFFF;
}
.tab-content {
	border-left: 1px solid #DDDDDD;
	border-right: 1px solid #DDDDDD;
	border-bottom: 1px solid #DDDDDD;
	padding: 10px;
	margin-bottom: 20px;
	z-index: 2;
	overflow: auto;
}
Надіслати
Поділитися на інших сайтах


Вот код моей карточки товара. Никак не пойму, что нужно переписать.


<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
 <div class="breadcrumb">
        <?php foreach ($breadcrumbs as $i=> $breadcrumb) { ?><?php echo $breadcrumb['separator']; ?>
		<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb" style="display: inline"><?php if($i+1<count($breadcrumbs)) { ?><a href="<?php echo $breadcrumb['href']; ?>" itemprop="url"><?php echo $breadcrumb['text']; ?></a> <?php } else { ?><span itemprop="title"><?php echo $breadcrumb['text']; ?></span><?php } ?></div>
        <?php } ?>
  </div>
  <h1><?php echo $heading_title; ?></h1>
  <div class="product-info">
    <?php if ($thumb || $images) { ?>
    <div class="left">
      <?php if ($thumb) { ?>
      <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div>
      <?php } ?>
      <?php if ($images) { ?>
      <div class="image-additional">
        <?php foreach ($images as $image) { ?>
        <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a>
        <?php } ?>
      </div>
      <?php } ?>
    </div>
    <?php } ?>
    <div class="right">
      <div class="description">
        <?php /* ?><?php if ($manufacturer) { ?>
        <span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br />
        <?php } ?><?php */?>
           <div class="tab-content">
              <table class="attribute">
                  <?php foreach ($attribute_groups as $attribute_group) { ?>
                  <thead>
                  <th colspan="2" style="text-align: left; padding-bottom: 6px;">
                      <span style="color:#86621d ;"><?php echo $attribute_group['name']; ?></span>
                  </th>
                  </thead>
                  <tbody>
                  <?php foreach ($attribute_group['attribute'] as $attribute) { ?>
                  <tr>
                      <td><?php echo $attribute['name']; ?></td>
                      <td><?php echo $attribute['text']; ?></td>
                  </tr>
                  <?php } ?>
                  <tr>
                      <td><?php echo $text_stock; ?></td>
                      <td><?php echo $stock; ?></td>
                  </tr>
                  </tbody>
                  <?php } ?>
              </table>
          </div>

        <div class="pull-left">
            <span style="color: #373b36; font-size: 12px; padding: 0 0 10px 20px;display: block;"><?php echo $text_model; ?><?php echo $model; ?></span>
            <?php if ($price) { ?>
            <div class="price">
                <?php if (!$special) { ?>
                <span id="price" class="all"><?php echo $price; ?></span>
                <?php } else { ?>
                <span class="price-old"><?php echo $price; ?></span> <span class="price-new all"><?php echo $special; ?></span>
                <?php } ?>
                <br />
                <?php if ($tax) { ?>
                <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br />
                <?php } ?>
                <?php if ($points) { ?>
                <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span><br />
                <?php } ?>
                <?php if ($discounts) { ?>
                <br />
                <div class="discount">
                    <?php foreach ($discounts as $discount) { ?>
                    <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br />
                    <?php } ?>
                </div>
                <?php } ?>
            </div>
            <?php } ?>
        </div>
        <div class="pull-right">
          <span style="display: block; padding: 0 0 0 55px; "><a href="<?php echo $manufacturers; ?>"><img src="<?php echo $mimage; ?>" title="<?php echo $manufacturer; ?>" /></a></span>

            <div class="cart" style="display: block; padding: 0 50px 10px 0;">
                <div><?php /* echo $text_qty;*/ ?>
                    <input type="hidden" name="quantity" size="2" value="<?php echo $minimum; ?>" />
                    <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
                     
                    <?php if (empty($key)) { ?>
                    <input id="button-cart" type="button" value="<?php echo $button_cart; ?>" onclick="this.value='<?php echo $button_cart_already; ?>'" class="button" style="border-radius: 10px;height: 37px;width: 200px;font-size:18px;" />
                    <?php } else { ?>
                    <input id="button-cart" type="button" value="<?php echo $button_cart_already; ?>" class="button" style="border-radius: 10px;height: 37px;width: 200px;font-size:18px;"/>
                    <?php } ?>
                    <!--input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" /-->
                </div>
                <?php if ($minimum > 1) { ?>
                <div class="minimum"><?php echo $text_minimum; ?></div>
                <?php } ?>
            </div>
        </div>


    <div style="margin-top: 125px;">{SOCIAL_BUTTONS}</div>
    </div>
        
	</div>

      <?php if ($options) { ?>
      <div class="options">
        <h2><?php echo $text_option; ?></h2>
        <br />
        <?php foreach ($options as $option) { ?>
        <?php if ($option['type'] == 'select') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <select name="option[<?php echo $option['product_option_id']; ?>]">
            <option value=""><?php echo $text_select; ?></option>
            <?php foreach ($option['option_value'] as $option_value) { ?>
            <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
            <?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
            </option>
            <?php } ?>
          </select>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'radio') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <?php foreach ($option['option_value'] as $option_value) { ?>
          <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
          <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
            <?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
          </label>
          <br />
          <?php } ?>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'checkbox') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <?php foreach ($option['option_value'] as $option_value) { ?>
          <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
          <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
            <?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
          </label>
          <br />
          <?php } ?>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'image') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <table class="option-image">
            <?php foreach ($option['option_value'] as $option_value) { ?>
            <tr>
              <td style="width: 1px;"><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /></td>
              <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label></td>
              <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
                  <?php if ($option_value['price']) { ?>
                  (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
                  <?php } ?>
                </label></td>
            </tr>
            <?php } ?>
          </table>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'text') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'textarea') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="40" rows="5"><?php echo $option['option_value']; ?></textarea>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'file') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="button" value="<?php echo $button_upload; ?>" id="button-option-<?php echo $option['product_option_id']; ?>" class="button">
          <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'date') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'datetime') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'time') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" />
        </div>
        <br />
        <?php } ?>
        <?php } ?>
      </div>
      <?php } ?>

      
        <?php /* ?>
      <?php if ($review_status) { ?>
      <div class="review">
        <div><img src="catalog/view/theme/default/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" />  <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a>  |  <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a></div>
        <div class="share">
		<!-- AddThis Button BEGIN -->
			<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
				<a class="addthis_button_preferred_1"></a>
				<a class="addthis_button_preferred_2"></a>
				<a class="addthis_button_preferred_3"></a>
				<a class="addthis_button_preferred_12"></a>
				<a class="addthis_button_compact"></a>
				<a class="addthis_counter addthis_bubble_style"></a>
			</div>
          <script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js"></script>
          <!-- AddThis Button END -->
        </div>
      </div>
      <?php } ?>
    
        <?php */ ?>
    <div style="height: 85px;"></div>
  <div>
      <div class="green">Описание</div>
      <?php echo $description; ?>
  </div>
    <div style="clear: both">
        <div class="green"><?php echo $tab_related; ?></div>
        <div class="product-grid rel">
                <?php foreach ($products as $product) { ?>
                <div>
                    <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
                    <?php if ($product['thumb']) { ?>
                    <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
                    <?php } ?>
                    <div style="clear: both">
                    <?php if ($product['price']) { ?>
                    <div class="price" style="float: left;">
                        <?php if (!$product['special']) { ?>
                        <?php echo $product['price']; ?>
                        <?php } else { ?>
                        <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
                        <?php } ?>
                    </div>
                    <?php } ?>
                  <div class="cart" style=" float: right;">
                    <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a>
                  </div>

                </div>
            <div class="shadows3"></div>
        </div>
            <?php } ?>
    </div>

    			<div class="green"><?php echo $tab_comments ?></div>
                <div id="tab-comments" class="tab-content">
			  		<div class="pcComments"></div>
			  		<div class="pcForm"></div>
			  	</div>
  </div>


  <?php /* ?><div id="tabs" class="htabs">
  <?php if ($product_tabs_1) { ?>
		<?php foreach($product_tabs_1 as $product_tab_1) { ?>
				<a href="#tab-product-tab<?php echo $product_tab_1['tab_id'];?>"><?php echo $product_tab_1['name']; ?></a>
		<?php } ?>
	<?php } ?>
	<a href="#tab-description"><?php echo $tab_description; ?></a>
	<?php if ($product_tabs_2) { ?>
			<?php foreach($product_tabs_2 as $product_tab_2) { ?>
				<a href="#tab-product-tab<?php echo $product_tab_2['tab_id'];?>"><?php echo $product_tab_2['name']; ?></a>
			<?php } ?>
	<?php } ?>
    <?php if ($attribute_groups) { ?>
    <a href="#tab-attribute"><?php echo $tab_attribute; ?></a>
    <?php } ?>
	<?php if ($product_tabs_3) { ?>
			<?php foreach($product_tabs_3 as $product_tab_3) { ?>
				<a href="#tab-product-tab<?php echo $product_tab_3['tab_id'];?>"><?php echo $product_tab_3['name']; ?></a>
			<?php } ?>
	<?php } ?>
	<a href="#tab-comments"><?php echo $tab_comments ?></a>
    <?php if ($review_status) { ?>
    <a href="#tab-review"><?php echo $tab_review; ?></a>
    <?php } ?>
	<?php if ($product_tabs_4) { ?>
			<?php foreach($product_tabs_4 as $product_tab_4) { ?>
				<a href="#tab-product-tab<?php echo $product_tab_4['tab_id'];?>"><?php echo $product_tab_4['name']; ?></a>
			<?php } ?>
	<?php } ?>
    <?php if ($products) { ?>
    <a href="#tab-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a>
    <?php } ?>
	<?php if ($product_tabs_5) { ?>
			<?php foreach($product_tabs_5 as $product_tab_5) { ?>
				<a href="#tab-product-tab<?php echo $product_tab_5['tab_id'];?>"><?php echo $product_tab_5['name']; ?></a>
			<?php } ?>
	<?php } ?>
  </div>
  <?php if ($product_tabs_1) { ?>
		<?php foreach($product_tabs_1 as $product_tab_1) { ?>
			<div id="tab-product-tab<?php echo $product_tab_1['tab_id'];?>" class="tab-content"><?php echo $product_tab_1['text']; ?></div>
		<?php } ?>
<?php } ?>
  <div id="tab-description" class="tab-content" unselectable="on" oncopy="return false" oncontextmenu="return false" onselectstart="return false"><?php echo $description; ?></div>
  <?php if ($product_tabs_2) { ?>
		<?php foreach($product_tabs_2 as $product_tab_2) { ?>
			<div id="tab-product-tab<?php echo $product_tab_2['tab_id'];?>" class="tab-content"><?php echo $product_tab_2['text']; ?></div>
		<?php } ?>
	<?php } ?>
  <?php if ($attribute_groups) { ?>
  <div id="tab-attribute" class="tab-content">
    <table class="attribute">
      <?php foreach ($attribute_groups as $attribute_group) { ?>
      <thead>
        <tr>
          <td colspan="2"><?php echo $attribute_group['name']; ?></td>
        </tr>
      </thead>
      <tbody>
        <?php foreach ($attribute_group['attribute'] as $attribute) { ?>
        <tr>
          <td><?php echo $attribute['name']; ?></td>
          <td><?php echo $attribute['text']; ?></td>
        </tr>
        <?php } ?>
      </tbody>
      <?php } ?>
    </table>
  </div>
  <?php } ?>
  <?php if ($product_tabs_3) { ?>
		<?php foreach($product_tabs_3 as $product_tab_3) { ?>
			<div id="tab-product-tab<?php echo $product_tab_3['tab_id'];?>" class="tab-content"><?php echo $product_tab_3['text']; ?></div>
		<?php } ?>
	<?php } ?>
  <?php if ($review_status) { ?>
  <div id="tab-review" class="tab-content">
    <div id="review"></div>
    <h2 id="review-title"><?php echo $text_write; ?></h2>
    <b><?php echo $entry_name; ?></b><br />
    <input type="text" name="name" value="" />
    <br />
    <br />
    <b><?php echo $entry_review; ?></b>
    <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea>
    <span style="font-size: 11px;"><?php echo $text_note; ?></span><br />
    <br />
    <b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span> 
    <input type="radio" name="rating" value="1" />
     
    <input type="radio" name="rating" value="2" />
     
    <input type="radio" name="rating" value="3" />
     
    <input type="radio" name="rating" value="4" />
     
    <input type="radio" name="rating" value="5" />
     <span><?php echo $entry_good; ?></span><br />
    <br />
    <b><?php echo $entry_captcha; ?></b><br />
    <input type="text" name="captcha" value="" />
    <br />
    <img src="index.php?route=product/product/captcha" alt="" id="captcha" /><br />
    <br />
    <div class="buttons">
      <div class="right"><a id="button-review" class="button"><?php echo $button_continue; ?></a></div>
    </div>
  </div>
  <?php } ?>
  <?php if ($product_tabs_4) { ?>
			<?php foreach($product_tabs_4 as $product_tab_4) { ?>
				<div id="tab-product-tab<?php echo $product_tab_4['tab_id'];?>" class="tab-content"><?php echo $product_tab_4['text']; ?></div>
			<?php } ?>
	<?php } ?>
  <?php if ($products) { ?>
  <div id="tab-related" class="tab-content">
    <div class="box-product">
      <?php foreach ($products as $product) { ?>
      <div>
        <?php if ($product['thumb']) { ?>
        <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
        <?php } ?>
        <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
        <?php if ($product['price']) { ?>
        <div class="price">
          <?php if (!$product['special']) { ?>
          <?php echo $product['price']; ?>
          <?php } else { ?>
          <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
          <?php } ?>
        </div>
        <?php } ?>
        <?php if ($product['rating']) { ?>
        <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
        <?php } ?>
        <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a></div>
      <?php } ?>
    </div>
  </div>
  <?php } ?>
  <?php if ($product_tabs_5) { ?>
		<?php foreach($product_tabs_5 as $product_tab_5) { ?>
			<div id="tab-product-tab<?php echo $product_tab_5['tab_id'];?>" class="tab-content"><?php echo $product_tab_5['text']; ?></div>
		<?php } ?>
	<?php } ?>
	<div id="tab-comments" class="tab-content">
  		<div class="pcComments"></div>
  		<div class="pcForm"></div>
  	</div>
  <?php if ($tags) { ?>
  <div class="tags"><b><?php echo $text_tags; ?></b>
    <?php for ($i = 0; $i < count($tags); $i++) { ?>
    <?php if ($i < (count($tags) - 1)) { ?>
    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>,
    <?php } else { ?>
    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>
    <?php } ?>
    <?php } ?>
  </div>
  <?php } ?>
    <?php */ ?>
  <?php echo $content_bottom; ?></div>

<script type="text/javascript">
    $('#button-cart').click(function(){
        $('.empty').html('<a class="but" href="shopping-cart">Оформить заказ</a>')
    })
</script>

<script type="text/javascript">
$(document).ready(function() {
	$('.colorbox').colorbox({
		overlayClose: true,
		opacity: 0.5,
		rel: "colorbox"
	});
});
</script>
<script type="text/javascript"><!--
$('#button-cart').bind('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/cart/add',
		type: 'post',
		data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
		dataType: 'json',
		success: function(json) {
			$('.success, .warning, .attention, information, .error').remove();

			if (json['error']) {
				if (json['error']['option']) {
					for (i in json['error']['option']) {
						$('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '</span>');
					}
				}
			}

			if (json['success']) {
                if ($('#notification-container').html() == undefined || $('#notification-container').html() == '') {
                    appendNoticeTemplates();
                }

                var tpl33 = '<div class="notify-discount" id="ololo33">\
                   <a class="ui-notify-cross ui-notify-close boss_button_remove" onclick="$(\'#ololo33\').fadeOut(200)"></a>\
                   <h2 class="boss_icon_success"><span class="boss_title"></span>Внимание!</h2>\
                   <div class="boss_text">\
                     <h3>Не забудьте! Вы можете получить скидку 3% на товары, не учавствующие в основной акции, поделившись страницей товара в социальной сети.</h3>\
                   </div>\
                 </div>';
                if ($('#ololo33').html() == undefined) {
                    $(tpl33).appendTo("#notification-container");
                }
              addProductNotice(json['title'], json['thumb'], json['success'], 'success');
              $('#cart_menu span.s_grand_total').html(json['total_sum']);
              $('#cart_menu div.s_cart_holder').html(json['output']);
			  $('#cart-total').html(json['total']);
          }
		}
	});
});
//--></script>
<?php if ($options) { ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery.shuffleLetters.js"></script>
<script type="text/javascript"><!--
var tt="<?php echo $text_tax;?>";var bp='0';var tp='0';var sp='0';var pe;var se;var te;var pl=<?php echo($this->currency->getDecimalPlace())?>;var dc="<?php $dc=$this->language->get('decimal_point');echo $dc;?>";<?php if($price){?>bp='<?php  $filter="/[^0-9\\".$dc."]/";echo preg_replace($filter,"",$price)?>';bp=bp.replace(dc, ".");<?php if($tax){?>tp="<?php echo preg_replace($filter,"",$tax)?>";tp=tp.replace(dc, ".");tt="<?php echo $text_tax;?> ";<?php }?><?php if(!$special){?><?php }else{?>sp="<?php echo preg_replace($filter,"",$special)?>";sp=sp.replace(dc, ".");<?php }?><?php }?>var priceMod={};var optPrices={};var symLeft=<?php echo($this->currency->getSymbolLeft()!='')?"'".$this->currency->getSymbolLeft()."'":"''";?>;var symRight=<?php echo($this->currency->getSymbolRight()!='')?"'".$this->currency->getSymbolRight()."'":"''";?>;function addCommas(a){a+="";x=a.split(".");x1=x[0];x2=x.length>1?dc+x[1]:"";var b=/(\d+)(\d{3})/;if(dc!=","){while(b.test(x1)){x1=x1.replace(b,"$1"+","+"$2")}}return x1+x2}function updatePrice(){var a=0;for(var b in optPrices){a=a+parseFloat(optPrices[b])}if(parseFloat(bp)+a!=parseFloat(c)){var c=(parseFloat(bp)+a).toFixed(pl);var d=(parseFloat(tp)+a*(parseFloat(tp)/parseFloat(bp))).toFixed(pl);var e=(parseFloat(sp)+a).toFixed(pl);c=symLeft.toString()+addCommas(c)+symRight.toString();e=symLeft.toString()+addCommas(e)+symRight.toString();d=tt+symLeft.toString()+addCommas(d)+symRight.toString();$("span.#price").stop().text("").animate({percent:100},"slow",function(){$(this).shuffleLetters({text:c})});$("span.price-old").stop().text("").animate({percent:100},"slow",function(){$(this).shuffleLetters({text:c})});$("span.price-new").stop().text("").animate({percent:100},"slow",function(){$(this).shuffleLetters({text:e})});$("span.price-tax").stop().text("").animate({percent:100},"slow",function(){$(this).shuffleLetters({text:d})})}}<?php foreach($options as $option){?><?php if($option['type']=='select'){?>priceMod["<?php echo $option['product_option_id'];?>"]=[];optPrices["<?php echo $option['product_option_id'];?>"]='0';priceMod["<?php echo $option['product_option_id'];?>"].push('+0');<?php foreach($option['option_value'] as $option_value){?>priceMod["<?php echo $option['product_option_id'];?>"].push('<?php if($option_value['price']){echo $option_value['price_prefix'];$c_s=preg_replace($filter,"",$option_value['price']);$c_s= str_replace($dc, ".", $c_s);echo $c_s;}else{echo "+0";}?>');<?php }?>$('select[name="option[<?php echo $option['product_option_id'];?>]"]').change(function(){optPrices[<?php echo $option['product_option_id'];?>]=priceMod[<?php echo $option['product_option_id'];?>][this.selectedIndex];updatePrice();});<?php }?><?php if($option['type']=='radio'){?><?php foreach($option['option_value'] as $option_value){?>priceMod["<?php echo $option['product_option_id'];?>_<?php echo $option_value['product_option_value_id'];?>"]={};optPrices["<?php echo $option['product_option_id'];?>"]='0';priceMod["<?php echo $option['product_option_id'];?>_<?php echo $option_value['product_option_value_id'];?>"]="<?php if($option_value['price']){echo $option_value['price_prefix'];$c_s=preg_replace($filter,"",$option_value['price']);$c_s=str_replace($dc,".",$c_s);echo $c_s;}else{echo "+0";}?>";$('#option-value-<?php echo $option_value['product_option_value_id'];?>').click(function(){if(this.checked){optPrices['<?php echo $option['product_option_id'];?>']=priceMod['<?php echo $option['product_option_id'];?>_<?php echo $option_value['product_option_value_id'];?>'];}else{optPrices['<?php echo $option['product_option_id'];?>_<?php echo $option_value['product_option_value_id'];?>']='0';}updatePrice();});<?php }?><?php }?><?php if($option['type']=='checkbox'){?><?php foreach($option['option_value'] as $option_value){?>priceMod["<?php echo $option['product_option_id'];?>_<?php echo $option_value['product_option_value_id'];?>"]={};optPrices["<?php echo $option['product_option_id'];?>_<?php echo $option_value['product_option_value_id'];?>"]='0';priceMod["<?php echo $option['product_option_id'];?>_<?php echo $option_value['product_option_value_id'];?>"]="<?php if($option_value['price']){echo $option_value['price_prefix'];$c_s=preg_replace($filter,"",$option_value['price']);$c_s=str_replace($dc,".",$c_s);echo $c_s;}else{echo "+0";}?>";$('#option-value-<?php echo $option_value['product_option_value_id'];?>').click(function(){if(this.checked){optPrices['<?php echo $option['product_option_id'];?>_<?php echo $option_value['product_option_value_id'];?>']=priceMod['<?php echo $option['product_option_id'];?>_<?php echo $option_value['product_option_value_id'];?>'];}else{optPrices['<?php echo $option['product_option_id'];?>_<?php echo $option_value['product_option_value_id'];?>']='0';}updatePrice();});<?php }?><?php }?><?php if($option['type']=='image'){?><?php foreach($option['option_value'] as $option_value){?>priceMod["<?php echo $option['product_option_id'];?>_<?php echo $option_value['product_option_value_id'];?>"]={};optPrices["<?php echo $option['product_option_id'];?>"]='0';priceMod["<?php echo $option['product_option_id'];?>_<?php echo $option_value['product_option_value_id'];?>"]="<?php if($option_value['price']){echo $option_value['price_prefix'];$c_s=preg_replace($filter,"",$option_value['price']);$c_s=str_replace($dc,".",$c_s);echo $c_s;}else{echo "+0";}?>";$('#option-value-<?php echo $option_value['product_option_value_id'];?>').click(function(){if(this.checked){optPrices['<?php echo $option['product_option_id'];?>']=priceMod['<?php echo $option['product_option_id'];?>_<?php echo $option_value['product_option_value_id'];?>'];}else{optPrices['<?php echo $option['product_option_id'];?>_<?php echo $option_value['product_option_value_id'];?>']='0';}updatePrice();});<?php }?><?php }?><?php }?>
//--></script>
<?php foreach ($options as $option) { ?>
<?php if ($option['type'] == 'file') { ?>
<script type="text/javascript"><!--
new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', {
	action: 'index.php?route=product/product/upload',
	name: 'file',
	autoSubmit: true,
	responseType: 'json',
	onSubmit: function(file, extension) {
		$('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
		$('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', true);
	},
	onComplete: function(file, json) {
		$('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', false);

		$('.error').remove();

		if (json['success']) {
			alert(json['success']);

			$('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json['file']);
		}

		if (json['error']) {
			$('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json['error'] + '</span>');
		}

		$('.loading').remove();
	}
});
//--></script>
<?php } ?>
<?php } ?>
<?php } ?>
<script type="text/javascript"><!--
$('#review .pagination a').live('click', function() {
	$('#review').fadeOut('slow');

	$('#review').load(this.href);

	$('#review').fadeIn('slow');

	return false;
});

$('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>');

$('#tab-comments .pcForm').load('index.php?route=module/productcomments/renderForm&product_id=<?php echo $product_id; ?>');
$('#tab-comments .pcComments').load('index.php?route=module/productcomments/renderComments&product_id=<?php echo $product_id; ?>');

$('#button-review').bind('click', function() {
	$.ajax({
		url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>',
		type: 'post',
		dataType: 'json',
		data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()),
		beforeSend: function() {
			$('.success, .warning').remove();
			$('#button-review').attr('disabled', true);
			$('#review-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>');
		},
		complete: function() {
			$('#button-review').attr('disabled', false);
			$('.attention').remove();
		},
		success: function(data) {
			if (data['error']) {
				$('#review-title').after('<div class="warning">' + data['error'] + '</div>');
			}

			if (data['success']) {
				$('#review-title').after('<div class="success">' + data['success'] + '</div>');

				$('input[name=\'name\']').val('');
				$('textarea[name=\'text\']').val('');
				$('input[name=\'rating\']:checked').attr('checked', '');
				$('input[name=\'captcha\']').val('');
			}
		}
	});
});
//--></script>
<script type="text/javascript"><!--
$('#tabs a').tabs();
//--></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	if ($.browser.msie && $.browser.version == 6) {
		$('.date, .datetime, .time').bgIframe();
	}

	$('.date').datepicker({dateFormat: 'yy-mm-dd'});
	$('.datetime').datetimepicker({
		dateFormat: 'yy-mm-dd',
		timeFormat: 'h:m'
	});
	$('.time').timepicker({timeFormat: 'h:m'});
});
</script>


<?php echo $footer; ?>

 

Надіслати
Поділитися на інших сайтах


замените код ниже на тот, что из дефолтного


<div id="tabs" class="htabs">
  <?php if ($product_tabs_1) { ?>
<?php foreach($product_tabs_1 as $product_tab_1) { ?>
<a href="#tab-product-tab<?php echo $product_tab_1['tab_id'];?>"><?php echo $product_tab_1['name']; ?></a>
<?php } ?>
<?php } ?>
<a href="#tab-description"><?php echo $tab_description; ?></a>
<?php if ($product_tabs_2) { ?>
<?php foreach($product_tabs_2 as $product_tab_2) { ?>
<a href="#tab-product-tab<?php echo $product_tab_2['tab_id'];?>"><?php echo $product_tab_2['name']; ?></a>
<?php } ?>
<?php } ?>
    <?php if ($attribute_groups) { ?>
    <a href="#tab-attribute"><?php echo $tab_attribute; ?></a>
    <?php } ?>
<?php if ($product_tabs_3) { ?>
<?php foreach($product_tabs_3 as $product_tab_3) { ?>
<a href="#tab-product-tab<?php echo $product_tab_3['tab_id'];?>"><?php echo $product_tab_3['name']; ?></a>
<?php } ?>
<?php } ?>
<a href="#tab-comments"><?php echo $tab_comments ?></a>
    <?php if ($review_status) { ?>
    <a href="#tab-review"><?php echo $tab_review; ?></a>
    <?php } ?>
<?php if ($product_tabs_4) { ?>
<?php foreach($product_tabs_4 as $product_tab_4) { ?>
<a href="#tab-product-tab<?php echo $product_tab_4['tab_id'];?>"><?php echo $product_tab_4['name']; ?></a>
<?php } ?>
<?php } ?>
    <?php if ($products) { ?>
    <a href="#tab-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a>
    <?php } ?>
<?php if ($product_tabs_5) { ?>
<?php foreach($product_tabs_5 as $product_tab_5) { ?>
<a href="#tab-product-tab<?php echo $product_tab_5['tab_id'];?>"><?php echo $product_tab_5['name']; ?></a>
<?php } ?>
<?php } ?>
  </div>
  <?php if ($product_tabs_1) { ?>
<?php foreach($product_tabs_1 as $product_tab_1) { ?>
<div id="tab-product-tab<?php echo $product_tab_1['tab_id'];?>" class="tab-content"><?php echo $product_tab_1['text']; ?></div>
<?php } ?>
<?php } ?>
  <div id="tab-description" class="tab-content" unselectable="on" oncopy="return false" oncontextmenu="return false" onselectstart="return false"><?php echo $description; ?></div>
  <?php if ($product_tabs_2) { ?>
<?php foreach($product_tabs_2 as $product_tab_2) { ?>
<div id="tab-product-tab<?php echo $product_tab_2['tab_id'];?>" class="tab-content"><?php echo $product_tab_2['text']; ?></div>
<?php } ?>
<?php } ?>
  <?php if ($attribute_groups) { ?>
  <div id="tab-attribute" class="tab-content">
    <table class="attribute">
      <?php foreach ($attribute_groups as $attribute_group) { ?>
      <thead>
        <tr>
          <td colspan="2"><?php echo $attribute_group['name']; ?></td>
        </tr>
      </thead>
      <tbody>
        <?php foreach ($attribute_group['attribute'] as $attribute) { ?>
        <tr>
          <td><?php echo $attribute['name']; ?></td>
          <td><?php echo $attribute['text']; ?></td>
        </tr>
        <?php } ?>
      </tbody>
      <?php } ?>
    </table>
  </div>
  <?php } ?>
  <?php if ($product_tabs_3) { ?>
<?php foreach($product_tabs_3 as $product_tab_3) { ?>
<div id="tab-product-tab<?php echo $product_tab_3['tab_id'];?>" class="tab-content"><?php echo $product_tab_3['text']; ?></div>
<?php } ?>
<?php } ?>
  <?php if ($review_status) { ?>
  <div id="tab-review" class="tab-content">
    <div id="review"></div>
    <h2 id="review-title"><?php echo $text_write; ?></h2>
    <b><?php echo $entry_name; ?></b><br />
    <input type="text" name="name" value="" />
    <br />
    <br />
    <b><?php echo $entry_review; ?></b>
    <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea>
    <span style="font-size: 11px;"><?php echo $text_note; ?></span><br />
    <br />
    <b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span> 
    <input type="radio" name="rating" value="1" />
     
    <input type="radio" name="rating" value="2" />
     
    <input type="radio" name="rating" value="3" />
     
    <input type="radio" name="rating" value="4" />
     
    <input type="radio" name="rating" value="5" />
     <span><?php echo $entry_good; ?></span><br />
    <br />
    <b><?php echo $entry_captcha; ?></b><br />
    <input type="text" name="captcha" value="" />
    <br />
    <img src="index.php?route=product/product/captcha" alt="" id="captcha" /><br />
    <br />
    <div class="buttons">
      <div class="right"><a id="button-review" class="button"><?php echo $button_continue; ?></a></div>
    </div>
  </div>
  <?php } ?>
  <?php if ($product_tabs_4) { ?>
<?php foreach($product_tabs_4 as $product_tab_4) { ?>
<div id="tab-product-tab<?php echo $product_tab_4['tab_id'];?>" class="tab-content"><?php echo $product_tab_4['text']; ?></div>
<?php } ?>
<?php } ?>
  <?php if ($products) { ?>
  <div id="tab-related" class="tab-content">
    <div class="box-product">
      <?php foreach ($products as $product) { ?>
      <div>
        <?php if ($product['thumb']) { ?>
        <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
        <?php } ?>
        <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
        <?php if ($product['price']) { ?>
        <div class="price">
          <?php if (!$product['special']) { ?>
          <?php echo $product['price']; ?>
          <?php } else { ?>
          <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
          <?php } ?>
        </div>
        <?php } ?>
        <?php if ($product['rating']) { ?>
        <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
        <?php } ?>
        <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a></div>
      <?php } ?>
    </div>
  </div>
  <?php } ?>
  <?php if ($product_tabs_5) { ?>
<?php foreach($product_tabs_5 as $product_tab_5) { ?>
<div id="tab-product-tab<?php echo $product_tab_5['tab_id'];?>" class="tab-content"><?php echo $product_tab_5['text']; ?></div>
<?php } ?>
<?php } ?>
<div id="tab-comments" class="tab-content">
  <div class="pcComments"></div>
  <div class="pcForm"></div>
  </div>

 

и не забудьте в css tab-классы заменить на дефолтные

Надіслати
Поділитися на інших сайтах


Створіть аккаунт або увійдіть для коментування

Ви повинні бути користувачем, щоб залишити коментар

Створити обліковий запис

Зареєструйтеся для отримання облікового запису. Це просто!

Зареєструвати аккаунт

Вхід

Уже зареєстровані? Увійдіть тут.

Вхід зараз
  • Зараз на сторінці   0 користувачів

    • Ні користувачів, які переглядиють цю сторінку

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.