<!--product start-->
<script>
function write_log() {
var val = 'ohaoaha';
console.log(val);
}
function changeImage(id, path, tId, title){
var objImage = document.getElementById(id);
var objTitle = document.getElementById(tId);
objImage.src = path;
objTitle.innerText = title;
}
function comboChange(zoom, start){
var product_left_width;
var product_left_height;
var product_img_width;
var product_cap_width;
var font_size;
var image_width;
var image_height;
var detail_width;
var detail_pLeft;
var detail_pRight;
var comment_display;
var koutuu_height;
var ensen_height;
var sankou_display;
var sankou_display;
var objName;
var objTitle;
var objTable;
var objLTable;
var objBTable;
var objPLeft;
var objPImg;
var objPCap;
var objComment;
var objAddress;
var objSyubetu;
var objSyumoku;
var objKoutuu;
var objEnsen;
var objSankou;
var objBikou;
var objImage = document.getElementsByName("image");
var objDetail = document.getElementsByName("detail");
if(zoom == 1){
table_width = "215px";
table_margin = "0px";
ltable_width = "120px";
btable_width = "120px";
product_left_width = "215px";
product_left_height = "450px";
product_img_width = "215px";
product_cap_width = "215px";
font_size = "90%";
tfont_size = "90%";
image_width = 215;
image_height = 155;
detail_width = 103;
detail_pLeft = "0px";
detail_pRight = "0px";
comment_display = "none";
koutuu_height = "40px";
ensen_height = "40px";
sankou_display = "none";
}
else if(zoom == 2){
table_width = "294px";
table_margin = "0px";
ltable_width = "140";
btable_width = "140";
product_left_width = "294px";
product_left_height = "500px";
product_img_width = "294px";
product_cap_width = "294px";
font_size = "100%";
tfont_size = "100%";
image_width = 294;
image_height = 210;
detail_width = 110;
detail_pLeft = "20px";
detail_pRight = "25px";
comment_display = "none";
koutuu_height = "40px";
ensen_height = "20px";
sankou_display = "none";
}
else if(zoom == 3){
table_width = "455px";
table_margin = "0px";
ltable_width = "190px";
btable_width = "190px";
product_left_width = "455px";
product_left_height = "600px";
product_img_width = "455px";
product_cap_width = "455px";
font_size = "110%";
tfont_size = "100%";
image_width = 455;
image_height = 330;
detail_width = 110;
detail_pLeft = "85px";
detail_pRight = "55px";
comment_display = "none";
koutuu_height = "20px";
ensen_height = "20px";
sankou_display = "none";
}
else if(zoom == 4){
table_width = "455px";
table_margin = "0px";
ltable_width = "190px";
btable_width = "190px";
product_left_width = "940px";
product_left_height = "500px";
product_img_width = "455px";
product_cap_width = "455px";
font_size = "110%";
tfont_size = "100%";
image_width = 455;
image_height = 330;
detail_width = 110;
detail_pLeft = "70px";
detail_pRight = "60px";
comment_display = "table-row";
koutuu_height = "20px";
ensen_height = "20px";
sankou_display = "block";
}
var l = 0;
for(i = start+1; i < (start + objImage.length+1); i++){
objName = document.getElementById("name" + i);
objTitle = document.getElementById("title" + i);
objTable = document.getElementById("table" + i);
objLTable = document.getElementById("ltable" + i);
objBTable = document.getElementById("btable" + i);
objPLeft = document.getElementById("product_left" + i);
objPImg = document.getElementById("product_img" + i);
objPCap = document.getElementById("product_cap" + i);
objComment= document.getElementById("comment" + i);
objAddress= document.getElementById("address" + i);
objSyubetu= document.getElementById("syubetu" + i);
objSyumoku= document.getElementById("syumoku" + i);
objEnsen = document.getElementById("ensen" + i);
objKoutuu = document.getElementById("koutuu" + i);
objSankou = document.getElementById("sankou" + i);
objBikou = document.getElementById("bikou" + i);
objAddress.style.display = comment_display;
objSyubetu.style.display = comment_display;
objSyumoku.style.display = comment_display;
objPLeft.style.width = product_left_width;
objPLeft.style.height = product_left_height;
objPImg.style.width = product_img_width;
objPCap.style.width = product_cap_width;
objImage.item(l).width = image_width;
objImage.item(l).height = image_height;
//objDetail.item(l).width = 103;
// objDetail.item(l).style.marginLeft = detail_pLeft;
//objDetail.item(l).style.marginRight = detail_pRight;
objName.style.fontSize = font_size;
objTitle.style.display = comment_display;
objTable.style.fontSize = font_size;
objTable.style.width = table_width;
objTable.style.marginBottom = table_margin;
objLTable.style.width = ltable_width;
objBTable.style.width = btable_width;
objLTable.style.fontSize = tfont_size;
objBTable.style.fontSize = tfont_size;
objComment.style.display = comment_display;
objKoutuu.style.height = koutuu_height;
objEnsen.style.height = ensen_height;
objSankou.style.display = sankou_display;
objBikou.style.fontSize = font_size;
l++;
}
}
</script>
<script>
$(function() {
$('.add-cart').on('click', function(event) {
var $form = $(this).parents('li').find('form');
// 個数フォームのチェック
var $quantity = $form.parent().find('.quantity');
if ($quantity.val() < 1) {
$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
setTimeout(function() {
loadingOverlay('hide');
}, 100);
return true;
} else {
$quantity[0].setCustomValidity('');
}
event.preventDefault();
$.ajax({
url: $form.attr('action'),
type: $form.attr('method'),
data: $form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// カートブロックを更新する
$.ajax({
url: "{{ url('block_cart') }}",
type: 'GET',
dataType: 'html'
}).done(function(html) {
$('.ec-headerRole__cart').html(html);
});
window.location.href = "{{ url('cart') }}";
}).fail(function(data) {
alert('{{ 'リストへの追加に失敗しました。'|trans }}');
}).always(function(data) {
// Buttonを有効にする
$('.add-cart').prop('disabled', false);
});
});
$('.reload').on('click', function(event) {
location.reload();
});
});
$('.ec-modal-overlay, .ec-modal .ec-inlineBtn--cancel').on('click', function() {
$('.ec-modal').hide()
});
</script>
{#商品情報を取得#}
{% set Products = repository('Eccube\\Entity\\Product').findBy({Status: 1}, { update_date: 'desc' },119) %}
{% set product_mum = Products|length %}
{# 1ページに表示する件数 #}
{% set count_item = 15 %}
{%set max_page = (product_mum / count_item)|round(0, 'floor')+1%}
{% set RedirectQueryString = app.request.server.get('REDIRECT_QUERY_STRING') %}
{% if RedirectQueryString != null %}
{% set page_num = RedirectQueryString|slice('page='|length) %}
{% else %}
{%set page_num = 0%}
{% endif %}
{% if page_num == 0 %}
{%set start_num = page_num%}
{% set page_num = 1 %}
{% else %}
{%set start_num = ((page_num-1) * count_item)%}
{% endif %}
<div id="toplist" style="width:970px;">
<h3 class="t5" style="color:black;margin-top:10px;width:960px;">取扱い物件一覧
<font style="margin-left:620px;">表示形式:
<select id="size" name="size" size="1" onChange="comboChange(this.options[this.selectedIndex].value,{{start_num}})">
<option value="1">縮小表示</option>
<option value="2" selected="selected">標準</option>
<option value="3">拡大表示</option>
<option value="4">最大化</option>
</select>
</font>
</h3>
<div align="center" style="margin:0 5px;height:30px;width:960px;border:1px solid #E2DFD2; font-size:18px;">
<<
{% for i in 1..max_page %}
{% if i == page_num %}
{{i}}
{% else %}
<a href="{{ url('homepage',{'page':i}) }}">{{i}}</a>
{% endif %}
{% endfor %}
>>
</div>
<!--<h3 class="t5">オススメ商品</h3>-->
<!--product_left start-->
{% for Product in Products|slice(start_num,count_item) %}
<li class="ec-shelfGrid__item">
{% set ProductClass = repository('Eccube\\Entity\\ProductClass').findBy({Product:Product.id}) %}
{% if ProductClass != null %}
{% set SaleType = repository('Eccube\\Entity\\Master\\SaleType').findBy({id: ProductClass[0].SaleType}) %}
{% if SaleType != null %}
{% set SaleTypeName = SaleType[0].name %}
{% else %}
{% set SaleTypeName = '' %}
{% endif %}
<div id="product_left{{start_num+loop.index}}" class="product_left" style="width:294px;height:500px;margin:0 0 5px 5px;">
<!--product_img start-->
<div id="product_img{{start_num+loop.index}}" class="product_img_01" style="width:294px;">
<h4 id="name{{start_num+loop.index}}" class="bold" style="padding:5px 0 3px 0;font-size:110%;border-bottom:thin solid green;background-color:snow;color:black;margin-bottom:4px;">{{Product.name}}</h4>
<p id="title{{start_num+loop.index}}" style="display:none;margin-left:5px;text-align:left;font-size:95%;color:black;"> </p>
<a href="{{ url('product_detail', {'id': Product.id}) }}">
<img id="image{{start_num+loop.index}}" name="image" height="210" width="294" src="{{ asset(Product.mainImage|no_image_product, 'save_image') }}"alt="{{Product.name}}" />
</a>
<p id="bikou{{start_num+loop.index}}"><font style="color:blue;">{{Product.comment}}</font></p>
</div>
<!--/product_img end-->
<!--product_cap start-->
<div id="product_cap{{start_num+loop.index}}" class="product_cap_01" style="width:295px;padding-left:1px;padding-top:0px; float:right;">
<!--{*--><h4 class="bold"><a href="<!--{$smarty.const.URL_DIR}-->products/detail.php?product_id=<!--{$arrBestProducts[cnt].product_id}-->"><!--{$arrBestProducts[cnt].name|escape}--></a></h4><!--*}-->
<!--{*--><p class="t10"><!--{$arrBestProducts[cnt].comment|escape|nl2br}--></p><!--*}-->
<!-- edit area start-->
<div style="color:black;font-size:96%;">
<p id="comment{{start_num+loop.index}}" style="padding-bottom:10px;color:black;display:none;">
{{Product.mainListComment}}
</p>
<table id="table{{start_num+loop.index}}" border="1" width="294" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
<tr>
<td align="center">価 格</td>
<td align="center">
{% if Product.getPrice02IncTaxMax==0%}
<font style="color:red; font-weight:bolder;">ご成約済</font>
{% elseif Product.getPrice02IncTaxMax==1 %}
<font style="color:red; font-weight:bolder;">商 談 中</font>
{% else %}
<font style="color:red; font-weight:bolder;">
{{Product.getPrice02IncTaxMax}}万円</font>
{% endif %}
</td>
</tr>
<tr id="address{{start_num+loop.index}}" style="display:none;">
<td align="center">所 在 地</td>
<td align="center"><font style="color:blue;">{{Product.pref}}{{Product.ku}}{{Product.adDetail}}</font></td>
</tr>
<tr id="syubetu{{start_num+loop.index}}" style="display:none;">
<td align="center">物 件 種 別</td>
<td align="center"><font style="color:blue;">{{SaleTypeName}}</font></td>
</tr>
<tr id="syumoku{{start_num+loop.index}}" style="display:none;">
<td align="center" width="900px">物 件 種 目</td>
<td align="center"><font style="color:blue;">{{Product.syumoku}}</font></td>
</tr>
<tr>
<td align="center">土 地 面 積</td><td align="center"><font style="color:blue;">
<table id="ltable{{start_num+loop.index}}" width="140" border="0" cellpadding="0" cellspacing="0"><tr><td width="49%" align="right">
{{Product.landArea}}m<Span style="font-size:60%;height:10;position:relative; top:-3%;">2</Span></td>
<td width="51%" align="right">
{% if Product.landArea != "" %}
{% set ltubo = "%.2f"|format(((Product.landArea * 0.3025)*100)/100) %}
{{ltubo}} 坪
{% endif %}
</td></tr></table>
</font></td>
</tr>
<tr>
<td align="center">
{% if SaleTypeName == "マンション" %}
専 有 面 積
{% else %}
建 物 面 積
{% endif %}
</td><td align="center"><font style="color:blue;">
<table id="btable{{start_num+loop.index}}" width="140" border="0" cellpadding="0" cellspacing="0"><tr><td width="49%" align="right">
{{Product.buildArea}}m<Span style="font-size:60%;height:10;position:relative; top:-3%;">2</Span></td>
<td width="51%" align="right">
{% if Product.buildArea != "" %}
{% set btubo = "%.2f"|format(((Product.buildArea * 0.3025)*100)/100) %}
{{btubo}} 坪
{% endif %}
</td></tr></table>
</font></td>
</tr>
<tr>
<td id="ensen{{start_num+loop.index}}" align="center">沿 線 ・ 駅</td><td align="center"><font style="color:blue;">{{Product.ensen}}{{Product.station}}</font></td>
</tr>
</table>
<p id="koutuu{{start_num+loop.index}}" style="height:40px;display:none;">交通:<font style="color:blue;">{{Product.stOther}}</font></p>
<!--{assign var=name value="detail`$smarty.section.cnt.iteration`"}-->
<!--{assign var=id value=$arrBestProducts[cnt].product_id}-->
<tr style="height:40px;">
<td colspan="2" align="center">
<a href="{{ url('product_detail', {'id': Product.id}) }}" onmouseover="chgImg('../html/user_data/assets/images/b_detail_h.gif','detail1');" onmouseout="chgImg('../html/user_data/assets/images/b_detail.gif','detail1');">
<img src="../html/user_data/assets/images/b_detail.gif" width="110" height="21" alt="詳しくはこちら" name="detail1" id="detail1" />
</a>
</td>
<td>
<form action="{{ url('product_add_cart', {id:Product.id}) }}" method="post" id="form{{ Product.id }}" name="productForm{{ Product.id }}">
<input type="hidden" id="quantity{{ Product.id }}" name="quantity" required="required" min="1" maxlength="9" class="quantity" value="1">
<input type="hidden" id="product_id" name="product_id" value="{{ Product.id }}">
<input type="hidden" id="ProductClass" name="ProductClass" value="{{ Product.ProductClasses[0].id }}">
<input type="hidden" id="_token" name="_token" value="{{csrf_token('Eccube\\Form\\Type\\AddCartType') }}" />
</form>
{#<div class="ec-productRole__btn">#}
<a type="button" class="add-cart" data-cartid="{{ Product.id }}" form="productForm{{ Product.id }}">
<img src="../../html/user_data/assets/images/b_box_in.gif" width="108" height="21" alt="カゴに入れる"style="margin:5px 0 0 0;"/>
</a>
{#</div>#}
</td>
</tr>
</div>
<!-- / edit area end-->
</div>
<!--/product_cap end-->
<div style="clear:left;">
<p id="sankou{{start_num+loop.index}}" style="display:none;margin-left:5px;margin-bottom:10px;padding-top:5px;">
<font style="color:black;font-size:96%;"><参考画像>(画像の上にマウスを乗せると拡大画像がご覧になれます)</font><br>
{% if Product.mainImage !=""%}
<img onmouseover="changeImage('image{{start_num+loop.index}}','{{ asset(Product.mainImage|no_image_product, 'save_image') }}', 'title{{start_num+loop.index}}', '')" src="{{ asset(Product.mainImage|no_image_product ,'save_image') }}" style="margin:0;border:1px solid black;height:41px;width:41px;"/>
{% endif %}
<!--{if $arrBestProducts[cnt].sub_large_image1 != ""}-->
{% if Product.sub1Image !=""%}
<img onmouseover="changeImage('image{{start_num+loop.index}}','{{ asset(Product.sub1Image|no_image_product, 'save_image') }}', 'title{{start_num+loop.index}}', '{{Product.sub1Title}}')" src="{{ asset(Product.sub1Image|no_image_product, 'save_image') }}" style="margin:0;border:1px solid black;height:41px;width:41px;"/>
{% endif %}
<!--{if $arrBestProducts[cnt].sub_large_image1 != ""}-->
{% if Product.sub2Image !=""%}
<img onmouseover="changeImage('image{{start_num+loop.index}}','{{ asset(Product.sub2Image|no_image_product, 'save_image') }}', 'title{{start_num+loop.index}}', '{{Product.sub2Title}}')" src="{{ asset(Product.sub2Image|no_image_product, 'save_image') }}" style="margin:0;border:1px solid black;height:41px;width:41px;"/>
{% endif %}
<!--{if $arrBestProducts[cnt].sub_large_image1 != ""}-->
{% if Product.sub3Image !=""%}
<img onmouseover="changeImage('image{{start_num+loop.index}}','{{ asset(Product.sub3Image|no_image_product, 'save_image') }}', 'title{{start_num+loop.index}}', '{{Product.sub3Title}}')" src="{{ asset(Product.sub3Image|no_image_product, 'save_image') }}" style="margin:0;border:1px solid black;height:41px;width:41px;"/>
{% endif %}
<!--{if $arrBestProducts[cnt].sub_large_image1 != ""}-->
{% if Product.sub4Image !=""%}
<img onmouseover="changeImage('image{{start_num+loop.index}}','{{ asset(Product.sub4Image|no_image_product, 'save_image') }}', 'title{{start_num+loop.index}}', '{{Product.sub4Title}}')" src="{{ asset(Product.sub4Image|no_image_product, 'save_image') }}" style="margin:0;border:1px solid black;height:41px;width:41px;"/>
{% endif %}
<!--{if $arrBestProducts[cnt].sub_large_image1 != ""}-->
{% if Product.sub5Image !=""%}
<img onmouseover="changeImage('image{{start_num+loop.index}}','{{ asset(Product.sub5Image|no_image_product, 'save_image') }}', 'title{{start_num+loop.index}}', '{{Product.sub5Title}}')" src="{{ asset(Product.sub5Image|no_image_product, 'save_image') }}" style="margin:0;border:1px solid black;height:41px;width:41px;"/>
{% endif %}
<!--{if $arrBestProducts[cnt].sub_large_image1 != ""}-->
{% if Product.sub6Image !=""%}
<img onmouseover="changeImage('image{{start_num+loop.index}}','{{ asset(Product.sub6Image|no_image_product, 'save_image') }}', 'title{{start_num+loop.index}}', '{{Product.sub6Title}}')" src="{{ asset(Product.sub6Image|no_image_product, 'save_image') }}" style="margin:0;border:1px solid black;height:41px;width:41px;"/>
{% endif %}
<!--{if $arrBestProducts[cnt].sub_large_image1 != ""}-->
{% if Product.sub7Image !=""%}
<img onmouseover="changeImage('image{{start_num+loop.index}}','{{ asset(Product.sub7Image|no_image_product, 'save_image') }}', 'title{{start_num+loop.index}}', '{{Product.sub7Title}}')" src="{{ asset(Product.sub7Image|no_image_product, 'save_image') }}" style="margin:0;border:1px solid black;height:41px;width:41px;"/>
{% endif %}
<!--{if $arrBestProducts[cnt].sub_large_image1 != ""}-->
{% if Product.sub8Image !=""%}
<img onmouseover="changeImage('image{{start_num+loop.index}}','{{ asset(Product.sub8Image|no_image_product, 'save_image') }}', 'title{{start_num+loop.index}}', '{{Product.sub8Title}}')" src="{{ asset(Product.sub8Image|no_image_product, 'save_image') }}" style="margin:0;border:1px solid black;height:41px;width:41px;"/>
{% endif %}
<!--{if $arrBestProducts[cnt].sub_large_image1 != ""}-->
{% if Product.sub9Image !=""%}
<img onmouseover="changeImage('image{{start_num+loop.index}}','{{ asset(Product.sub9Image|no_image_product, 'save_image') }}', 'title{{start_num+loop.index}}', '{{Product.sub9Title}}')" src="{{ asset(Product.sub9Image|no_image_product, 'save_image') }}" style="margin:0;border:1px solid black;height:41px;width:41px;"/>
{% endif %}
<!--{if $arrBestProducts[cnt].sub_large_image1 != ""}-->
{% if Product.sub12Image !=""%}
<img onmouseover="changeImage('image{{start_num+loop.index}}','{{ asset(Product.sub12Image|no_image_product, 'save_image') }}', 'title{{start_num+loop.index}}', '{{Product.sub12Title}}')" src="{{ asset(Product.sub12Image|no_image_product, 'save_image') }}" style="margin:0;border:1px solid black;height:41px;width:41px;"/>
{% endif %}
<!--{if $arrBestProducts[cnt].sub_large_image1 != ""}-->
{% if Product.sub13Image !=""%}
<img onmouseover="changeImage('image{{start_num+loop.index}}','{{ asset(Product.sub13Image|no_image_product, 'save_image') }}', 'title{{start_num+loop.index}}', '{{Product.sub13Title}}')" src="{{ asset(Product.sub13Image|no_image_product, 'save_image') }}" style="margin:0;border:1px solid black;height:41px;width:41px;"/>
{% endif %}
<!--{if $arrBestProducts[cnt].sub_large_image1 != ""}-->
{% if Product.sub14Image !=""%}
<img onmouseover="changeImage('image{{start_num+loop.index}}','{{ asset(Product.sub14Image|no_image_product, 'save_image') }}', 'title{{start_num+loop.index}}', '{{Product.sub14Title}}')" src="{{ asset(Product.sub14Image|no_image_product, 'save_image') }}" style="margin:0;border:1px solid black;height:41px;width:41px;"/>
{% endif %}
<!--{if $arrBestProducts[cnt].sub_large_image1 != ""}-->
{% if Product.sub15Image !=""%}
<img onmouseover="changeImage('image{{start_num+loop.index}}','{{ asset(Product.sub15Image|no_image_product, 'save_image') }}', 'title{{start_num+loop.index}}', '{{Product.sub15Title}}')" src="{{ asset(Product.sub15Image|no_image_product, 'save_image') }}" style="margin:0;border:1px solid black;height:41px;width:41px;"/>
{% endif %}
<!--{if $arrBestProducts[cnt].sub_large_image1 != ""}-->
</p>
</div>
</div>
<!--/product_left end-->
</li>
{% else %}
{% set SaleTypeName = '' %}
{% endif %}
{% endfor %}
<!--/product end-->
<!--{/section}-->
<!--{if $navi != ""}-->
<div align="center" style="margin:0 5px 5px;height:30px;width:960px;border:1px solid #E2DFD2;clear:left;font-size:18px;">
<<
{% for i in 1..max_page %}
{% if i ==page_num %}
{{i}}
{% else %}
<a href="{{ url('homepage',{'page':i}) }}">{{i}}</a>
{% endif %}
{% endfor %}
>>
</div>
<!--{/if}-->
</div>