<?php
/**
 * Page Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_product_reviews_info_default.php 2993 2006-02-08 07:14:52Z birdbrain $
 */
?>
<div class="centerColumn" id="reviewsInfoDefault">
	<div class="product-info-wrap">
		<div class="row">

      <?php if (zen_not_null($products_image)) : ?>
      <div class="product-images col-md-6" itemtype="http://schema.org/ImageGallery">
        <div id="productReviewsDefaultProductImage"><?php require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php'); ?></div>
      </div>
      <?php endif; ?>

      <div class="product-details col-md-6">
        <div class="product-header">
          <h1 id="productName" class="productGeneral"><?php echo $products_name; ?></h1>

          <h2 id="productPrices" class="productGeneral"><?php echo $products_price; ?></h2>

          <?php
		        // more info in place of buy now
		        if (zen_has_product_attributes($review_info->fields['products_id'] )) {
		          //   $link = '<p>' . '<a href="' . zen_href_link(zen_get_info_page($review_info->fields['products_id']), 'products_id=' . $review_info->fields['products_id'] ) . '">' . MORE_INFO_TEXT . '</a>' . '</p>';
		          $link = '';
		        } else {
		          $link= '<a class="button" href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action', 'reviews_id')) . 'action=buy_now') . '">' . BUTTON_IN_CART_ALT . '</a>';
		        }

		        $the_button = $link;
		        $products_link = '';
		        echo zen_get_buy_now_button($review_info->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($review_info->fields['products_id']);
		      ?>

		      <?php echo '<a href="' . zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('reviews_id'))) . '">' . BUTTON_GOTO_PROD_DETAILS_ALT . '</a>'; ?>

          <div class="product-share">
            <ul>
              <li><a href="https://www.facebook.com/sharer.php?u=<?php echo urlencode(htmlspecialchars_decode(zen_href_link(zen_get_info_page((int)$_GET['products_id']), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id((int)$_GET['products_id'])) . '&products_id=' . (int)$_GET['products_id'] . '&amp;p[images][0]=' . (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ) . $products_image_large, $request_type, false))); ?>" class="facebook-share" title="Share on Facebook" target="_blank"><i class="fa fa-facebook"></i></a></li> 
              <li><a href="http://www.twitter.com/share?url=<?php echo urlencode(htmlspecialchars_decode(zen_href_link(zen_get_info_page((int)$_GET['products_id']), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id((int)$_GET['products_id'])) . '&products_id=' . (int)$_GET['products_id'], $request_type, false))); ?>" class="twitter-share" title="Share on Twitter" target="_blank"><i class="fa fa-twitter"></i></a></li> 
              <li><a href="https://plus.google.com/share?url=<?php echo urlencode(htmlspecialchars_decode(zen_href_link(zen_get_info_page((int)$_GET['products_id']), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id((int)$_GET['products_id'])) . '&products_id=' . (int)$_GET['products_id'], $request_type, false))); ?>" class="google-plus-share" title="Share on Google Plus" target="_blank"><i class="fa fa-google-plus"></i></a></li> 
              <li><a href="https://pinterest.com/pin/create/button/?url=<?php echo urlencode(htmlspecialchars_decode(zen_href_link(zen_get_info_page((int)$_GET['products_id']), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id((int)$_GET['products_id'])) . '&products_id=' . (int)$_GET['products_id'], $request_type, false))); ?>&amp;media=<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ) . $products_image_large; ?>&amp;description=" class="pinterest-share" title="Share on Pinterest" target="_blank"><i class="fa fa-pinterest"></i></a></li> 
              <li><a href="mailto:please_enter_your@emailaddresshere.com?subject=<?php echo urlencode($products_name); ?>&amp;body=<?php echo urlencode(htmlspecialchars_decode(zen_href_link(zen_get_info_page((int)$_GET['products_id']), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id((int)$_GET['products_id'])) . '&products_id=' . (int)$_GET['products_id'], $request_type, false))); ?>" title="Email a Friend"><i class="fa fa-envelope"></i></a></li>
            </ul>
          </div>
        </div>
      </div>

    </div>
    <div class="reviews-wrap">
      <h3 class="section-title"><?php echo TEXT_PRODUCTS_REVIEW; ?></h3>

      <ul class="reviews">
        <li class="review-item clearfix">
          <div class="review-avatar">
            <?php echo genesis_get_gravatar( $review_info->fields['customers_email_address'] ); ?>
          </div>
          <h3 class="review-by">
            <?php echo $review_info->fields['customers_name']; ?>
            <span class="review-date"><em> - <?php echo date( 'd M Y', strtotime( $review_info->fields['date_added'] ) ); ?></em></span>
          </h3>
          <p class="review-text"><?php echo zen_clean_html(stripslashes($review_info->fields['reviews_text'])); ?></p>
          <span class="the-rating" title="<?php echo $review_info->fields['reviews_rating']; ?>"><?php echo genesis_get_rating_html( $review_info->fields['reviews_rating'] ); ?></span>                 
        </li>
      </ul>

      <div class="view-all-review">
				<?php echo '<a class="button pull-right" href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, zen_get_all_get_params(array('reviews_id'))) . '">' . BUTTON_WRITE_REVIEW_ALT . '</a>'; ?>
      	<?php echo ($reviews_counter > 1 ? '<a class="button button-inverse pull-right" href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params(array('reviews_id'))) . '">' . BUTTON_MORE_REVIEWS_ALT . '</a>' : ''); ?>
      </div>

    </div>

	</div>
</div>