- Timestamp:
- 2009/09/02 18:26:38 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/Smarty/templates/default/detail.tpl
r18254 r18277 21 21 *}--> 22 22 <script type="text/javascript">//<![CDATA[ 23 // セレクトボックスに項目を割り当てる。 24 function lnSetSelect(form, name1, name2, val) { 25 26 sele11 = document[form][name1]; 27 sele12 = document[form][name2]; 28 29 if(sele11 && sele12) { 30 index = sele11.selectedIndex; 31 32 // セレクトボックスのクリア 33 count = sele12.options.length; 34 for(i = count; i >= 0; i--) { 35 sele12.options[i] = null; 36 } 37 38 // セレクトボックスに値を割り当てる 39 len = lists[index].length; 40 for(i = 0; i < len; i++) { 41 sele12.options[i] = new Option(lists[index][i], vals[index][i]); 42 if(val != "" && vals[index][i] == val) { 43 sele12.options[i].selected = true; 23 // 規格2に選択肢を割り当てる。 24 function fnSetClassCategories(form, classcat_id2_selected) { 25 sele1 = form.classcategory_id1; 26 sele2 = form.classcategory_id2; 27 28 if (sele1) { 29 if (sele2) { 30 // 規格2の選択肢をクリア 31 count = sele2.options.length; 32 for(i = count; i >= 0; i--) { 33 sele2.options[i] = null; 34 } 35 36 // 規格2に選択肢を割り当てる 37 classcats = classCategories[sele1.value]; 38 i = 0; 39 for (var classcat_id2_key in classcats) { 40 sele2.options[i] = new Option(classcats[classcat_id2_key].name, classcat_id2_key); 41 if (classcat_id2_key == classcat_id2_selected) { 42 sele2.options[i].selected = true; 43 } 44 i++; 44 45 } 45 46 } 47 fnCheckStock(form); 48 } 49 } 50 function fnCheckStock(form) { 51 classcat_id1 = form.classcategory_id1.value; 52 classcat_id2 = form.classcategory_id2 ? form.classcategory_id2.value : 0; 53 classcat2 = classCategories[classcat_id1][classcat_id2]; 54 55 // 在庫(品切れ) 56 eleDefault = document.getElementById('cartbtn_default'); 57 eleDynamic = document.getElementById('cartbtn_dynamic'); 58 if ( 59 classcat2 60 && classcat2.stock_find === false 61 ) { 62 eleDefault.style.display = 'none'; 63 eleDynamic.innerHTML = '申し訳ございませんが、只今品切れ中です。'; 64 } else { 65 eleDefault.style.display = ''; 66 eleDynamic.innerHTML = ''; 67 } 68 69 // 通常価格 70 eleDefault = document.getElementById('price01_default'); 71 eleDynamic = document.getElementById('price01_dynamic'); 72 if ( 73 classcat2 74 && typeof classcat2.price01 != 'undefined' 75 && String(classcat2.price01).length >= 1 76 ) { 77 eleDefault.style.display = 'none'; 78 eleDynamic.innerHTML = classcat2.price01; 79 } else { 80 eleDefault.style.display = ''; 81 eleDynamic.innerHTML = ''; 82 } 83 84 // 販売価格 85 eleDefault = document.getElementById('price02_default'); 86 eleDynamic = document.getElementById('price02_dynamic'); 87 if ( 88 classcat2 89 && typeof classcat2.price02 != 'undefined' 90 && String(classcat2.price02).length >= 1 91 ) { 92 eleDefault.style.display = 'none'; 93 eleDynamic.innerHTML = classcat2.price02; 94 } else { 95 eleDefault.style.display = ''; 96 eleDynamic.innerHTML = ''; 97 } 98 99 // ポイント 100 eleDefault = document.getElementById('point_default'); 101 eleDynamic = document.getElementById('point_dynamic'); 102 if ( 103 classcat2 104 && typeof classcat2.point != 'undefined' 105 && String(classcat2.point).length >= 1 106 ) { 107 eleDefault.style.display = 'none'; 108 eleDynamic.innerHTML = classcat2.point; 109 } else { 110 eleDefault.style.display = ''; 111 eleDynamic.innerHTML = ''; 46 112 } 47 113 } … … 77 143 78 144 <div id="detailrightblock"> 79 <!-- アイコン-->145 <!--▼商品ステータス--> 80 146 <!--{if count($arrProduct.product_flag) > 0}--> 81 147 <ul class="status_icon"> … … 90 156 </ul> 91 157 <!--{/if}--> 158 <!--▲商品ステータス--> 92 159 93 160 <!--★商品コード★--> … … 108 175 <div class="sale_price"><!--{$smarty.const.SALE_PRICE_TITLE}--><span class="mini">(税込)</span>: 109 176 <span class="price"> 110 <!--{if $arrProduct.price02_min == $arrProduct.price02_max}--> 111 <!--{$arrProduct.price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}--> 112 <!--{else}--> 113 <!--{$arrProduct.price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->~<!--{$arrProduct.price02_max|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}--> 114 <!--{/if}-->円</span></div> 177 <span id="price02_default"> 178 <!--{if $arrProduct.price02_min == $arrProduct.price02_max}--> 179 <!--{$arrProduct.price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}--> 180 <!--{else}--> 181 <!--{$arrProduct.price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->~<!--{$arrProduct.price02_max|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}--> 182 <!--{/if}--> 183 </span><span id="price02_dynamic"></span> 184 円 185 </span> 186 </div> 115 187 116 188 <!--★通常価格★--> … … 119 191 <!--{$smarty.const.NORMAL_PRICE_TITLE}-->: 120 192 <span class="price"> 121 <!--{if $arrProduct.price01_min == $arrProduct.price01_max}--> 122 <!--{$arrProduct.price01_min|number_format}--> 123 <!--{else}--> 124 <!--{$arrProduct.price01_min|number_format}-->~<!--{$arrProduct.price01_max|number_format}--> 125 <!--{/if}-->円</span> 193 <span id="price01_default"> 194 <!--{if $arrProduct.price01_min == $arrProduct.price01_max}--> 195 <!--{$arrProduct.price01_min|number_format}--> 196 <!--{else}--> 197 <!--{$arrProduct.price01_min|number_format}-->~<!--{$arrProduct.price01_max|number_format}--> 198 <!--{/if}--> 199 </span><span id="price01_dynamic"></span> 200 円 201 </span> 126 202 </div> 127 203 <!--{/if}--> … … 130 206 <!--{if $smarty.const.USE_POINT !== false}--> 131 207 <div><span class="price">ポイント: 132 <!--{if $arrProduct.price02_min == $arrProduct.price02_max}--> 133 <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}--> 134 <!--{else}--> 135 <!--{if $arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id == $arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}--> 208 <span id="point_default"> 209 <!--{if $arrProduct.price02_min == $arrProduct.price02_max}--> 136 210 <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}--> 137 211 <!--{else}--> 138 <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}-->~<!--{$arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}--> 139 <!--{/if}--> 140 <!--{/if}-->Pt</span></div> 212 <!--{if $arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id == $arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}--> 213 <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}--> 214 <!--{else}--> 215 <!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}-->~<!--{$arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}--> 216 <!--{/if}--> 217 <!--{/if}--> 218 </span><span id="point_dynamic"></span> 219 Pt 220 </span> 221 </div> 141 222 <!--{/if}--> 142 223 … … 153 234 </div> 154 235 155 156 <form name="form1" id="form1" method="post" action=" <!--{$smarty.server.REQUEST_URI|escape}-->">236 <!--▼買い物かご--> 237 <form name="form1" id="form1" method="post" action="?"> 157 238 <input type="hidden" name="mode" value="cart" /> 158 239 <input type="hidden" name="product_id" value="<!--{$tpl_product_id}-->" /> 159 240 <input type="hidden" name="favorite_product_id" value="" /> 160 <!--{if $tpl_classcat_find1}--> 161 <dl> 162 <dt> 163 <!--{$tpl_class_name1}--> 164 </dt> 165 <dd> 166 <select name="classcategory_id1" 167 style="<!--{$arrErr.classcategory_id1|sfGetErrorColor}-->" 168 onchange="lnSetSelect('form1', 'classcategory_id1', 'classcategory_id2', ''); " 169 > 170 <option value="">選択してください</option> 171 <!--{html_options options=$arrClassCat1 selected=$arrForm.classcategory_id1.value}--> 172 </select> 173 <!--{if $arrErr.classcategory_id1 != ""}--> 174 <br /><span class="attention">※ <!--{$tpl_class_name1}-->を入力して下さい。</span> 175 <!--{/if}--> 176 </dd> 177 </dl> 241 242 <!--{if $tpl_stock_find}--> 243 <dl> 244 <!--{if $tpl_classcat_find1}--> 245 <!--▼規格1--> 246 <dt><!--{$tpl_class_name1|escape}--></dt> 247 <dd> 248 <select name="classcategory_id1" 249 style="<!--{$arrErr.classcategory_id1|sfGetErrorColor}-->" 250 onchange="fnSetClassCategories(this.form);" 251 > 252 <!--{html_options options=$arrClassCat1 selected=$arrForm.classcategory_id1.value}--> 253 </select> 254 <!--{if $arrErr.classcategory_id1 != ""}--> 255 <br /><span class="attention">※ <!--{$tpl_class_name1}-->を入力して下さい。</span> 256 <!--{/if}--> 257 </dd> 258 <!--▲規格1--> 259 <!--{/if}--> 260 261 <!--{if $tpl_classcat_find2}--> 262 <!--▼規格2--> 263 <dt><!--{$tpl_class_name2|escape}--></dt> 264 <dd> 265 <select name="classcategory_id2" 266 style="<!--{$arrErr.classcategory_id2|sfGetErrorColor}-->" 267 onchange="fnCheckStock(this.form);" 268 > 269 </select> 270 <!--{if $arrErr.classcategory_id2 != ""}--> 271 <br /><span class="attention">※ <!--{$tpl_class_name2}-->を入力して下さい。</span> 272 <!--{/if}--> 273 </dd> 274 <!--▲規格2--> 275 <!--{/if}--> 276 277 <dt>数量</dt> 278 <dd> 279 <input type="text" name="quantity" class="box54" value="<!--{$arrForm.quantity.value|default:1}-->" maxlength="<!--{$smarty.const.INT_LEN}-->" style="<!--{$arrErr.quantity|sfGetErrorColor}-->" /> 280 <!--{if $arrErr.quantity != ""}--> 281 <br /><span class="attention"><!--{$arrErr.quantity}--></span> 282 <!--{/if}--> 283 </dd> 284 </dl> 178 285 <!--{/if}--> 179 180 <!--{if $tpl_stock_find}--> 181 <!--{if $tpl_classcat_find2}--> 182 <dl> 183 <dt><!--{$tpl_class_name2}--></dt> 184 <dd> 185 <select name="classcategory_id2" 186 style="<!--{$arrErr.classcategory_id2|sfGetErrorColor}-->"> 187 <option value="">選択してください</option> 188 </select> 189 <!--{if $arrErr.classcategory_id2 != ""}--> 190 <br /><span class="attention">※ <!--{$tpl_class_name2}-->を入力して下さい。</span> 191 <!--{/if}--> 192 </dd> 193 </dl> 194 <!--{/if}--> 195 196 <dl> 197 <dt>数量</dt> 198 <dd><input type="text" name="quantity" class="box54" value="<!--{$arrForm.quantity.value|default:1}-->" maxlength="<!--{$smarty.const.INT_LEN}-->" style="<!--{$arrErr.quantity|sfGetErrorColor}-->" /> 199 <!--{if $arrErr.quantity != ""}--> 200 <br /><span class="attention"><!--{$arrErr.quantity}--></span> 201 <!--{/if}--> 202 </dd> 203 </dl> 204 <!--{/if}--> 205 206 <!--{if $tpl_stock_find}--> 207 <p class="btn"> 208 <!--{if $smarty.const.OPTION_FAVOFITE_PRODUCT == 1 && $tpl_login === true}--> 286 287 <div class="btn"> 288 <!--{if $smarty.const.OPTION_FAVOFITE_PRODUCT == 1 && $tpl_login === true}--> 289 <div> 209 290 <!--{assign var=add_favorite value="add_favorite`$product_id`"}--> 210 291 <!--{if $arrErr[$add_favorite]}--><div class="attention"><!--{$arrErr[$add_favorite]}--></div><!--{/if}--> … … 218 299 <img src="<!--{$TPL_DIR}-->img/products/add_favolite_product_on.gif" width="115" height="20" alt="お気に入り登録済" name="add_favolite_product" id="add_favolite_product" /> 219 300 <!--{/if}--> 220 <!--{/if}--> 221 <!--★カゴに入れる★--> 222 <a href="javascript:void(document.form1.submit())" onmouseover="chgImg('<!--{$TPL_DIR}-->img/products/b_cartin_on.gif','cart');" onmouseout="chgImg('<!--{$TPL_DIR}-->img/products/b_cartin.gif','cart');"> 223 <img src="<!--{$TPL_DIR}-->img/products/b_cartin.gif" width="115" height="25" alt="カゴに入れる" name="cart" id="cart" /></a> 224 </p> 225 <!--{if 'sfGMODetailDisplay'|function_exists}--><!--{* GMOワンクリック *}--> 226 <!--{'sfGMODetailDisplay'|call_user_func}--> 301 </div> 227 302 <!--{/if}--> 228 <!--{else}--> 229 <div class="attention">申し訳ございませんが、只今品切れ中です。</div> 230 <!--{/if}--> 303 304 <!--{if $tpl_stock_find}--> 305 <div id="cartbtn_default"> 306 <!--★カゴに入れる★--> 307 <div> 308 <a href="javascript:void(document.form1.submit())" onmouseover="chgImg('<!--{$TPL_DIR}-->img/products/b_cartin_on.gif','cart');" onmouseout="chgImg('<!--{$TPL_DIR}-->img/products/b_cartin.gif','cart');"> 309 <img src="<!--{$TPL_DIR}-->img/products/b_cartin.gif" width="115" height="25" alt="カゴに入れる" name="cart" id="cart" /></a> 310 </div> 311 <!--{if 'sfGMODetailDisplay'|function_exists}--><!--{* GMOワンクリック *}--> 312 <!--{'sfGMODetailDisplay'|call_user_func}--> 313 <!--{/if}--> 314 </div> 315 <div class="attention" id="cartbtn_dynamic"></div> 316 <!--{else}--> 317 <div class="attention">申し訳ございませんが、只今品切れ中です。</div> 318 <!--{/if}--> 319 </div> 231 320 </form> 321 <!--▲買い物かご--> 232 322 233 323 </div> … … 255 345 <div class="subphotoimg"> 256 346 <a 257 347 <!--{if $arrFile[$lkey].filepath != ""}--> 258 348 href="?" 259 349 onclick="win01('./detail_image.php?product_id=<!--{$arrProduct.product_id}-->&image=<!--{$lkey}--><!--{if $smarty.get.admin == 'on'}-->&admin=on<!--{/if}-->','detail_image','<!--{$arrFile[$lkey].width+60}-->','<!--{$arrFile[$lkey].height+80}-->'); return false;" 260 350 target="_blank" 261 351 <!--{/if}--> 262 352 > 263 353 <!--サブ画像--> 264 354 <img src="<!--{$arrFile[$key].filepath}-->" alt="<!--{$arrProduct.name|escape}-->" width="<!--{$smarty.const.NORMAL_SUBIMAGE_WIDTH}-->" height="<!--{$smarty.const.NORMAL_SUBIMAGE_HEIGHT}-->" /></a> 265 355 <!--{if $arrFile[$lkey].filepath != ""}-->
Note: See TracChangeset
for help on using the changeset viewer.