Changeset 21709 for branches/version-2_12-dev
- Timestamp:
- 2012/04/04 05:22:21 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/Smarty/templates/sphone/products/list.tpl
r21708 r21709 169 169 success: function(result){ 170 170 var productStatus = result.productStatus; 171 for (var j = 0; j < i; j++) { 172 if (result[j] != null) { 173 var product = result[j]; 174 var productHtml = ""; 175 var maxCnt = $(".list_area").length - 1; 176 var productEl = $(".list_area").get(maxCnt); 177 productEl = $(productEl).clone(true).insertAfter(productEl); 178 maxCnt++; 179 180 //商品写真をセット 181 $($(".list_area .listphoto img").get(maxCnt)).attr({ 182 src: "<!--{$smarty.const.ROOT_URLPATH}-->resize_image.php?image=" + product.main_list_image + '&width=80&height=80', 183 alt: product.name 184 }); 185 186 // 商品ステータスをセット 187 var statusAreaEl = $($(".list_area div.statusArea").get(maxCnt)); 188 // 商品ステータスの削除 189 statusAreaEl.empty(); 190 191 if (productStatus[product.product_id] != null) { 192 var statusEl = '<ul class="status_icon">'; 193 var statusCnt = productStatus[product.product_id].length; 194 for (var k = 0; k < statusCnt; k++) { 195 var status = productStatus[product.product_id][k]; 196 var statusImgEl = '<li>' + status.status_name + '</li>' + "\n"; 197 statusEl += statusImgEl; 198 } 199 statusEl += "</ul>"; 200 statusAreaEl.append(statusEl); 171 for (var product_id in result) { 172 if (isNaN(product_id)) continue; 173 var product = result[product_id]; 174 var productHtml = ""; 175 var maxCnt = $(".list_area").length - 1; 176 var productEl = $(".list_area").get(maxCnt); 177 productEl = $(productEl).clone(true).insertAfter(productEl); 178 maxCnt++; 179 180 //商品写真をセット 181 $($(".list_area .listphoto img").get(maxCnt)).attr({ 182 src: "<!--{$smarty.const.ROOT_URLPATH}-->resize_image.php?image=" + product.main_list_image + '&width=80&height=80', 183 alt: product.name 184 }); 185 186 // 商品ステータスをセット 187 var statusAreaEl = $($(".list_area div.statusArea").get(maxCnt)); 188 // 商品ステータスの削除 189 statusAreaEl.empty(); 190 191 if (productStatus[product.product_id] != null) { 192 var statusEl = '<ul class="status_icon">'; 193 var statusCnt = productStatus[product.product_id].length; 194 for (var k = 0; k < statusCnt; k++) { 195 var status = productStatus[product.product_id][k]; 196 var statusImgEl = '<li>' + status.status_name + '</li>' + "\n"; 197 statusEl += statusImgEl; 201 198 } 202 203 //商品名をセット 204 $($(".list_area a.productName").get(maxCnt)).text(product.name); 205 $($(".list_area a.productName").get(maxCnt)).attr("href", url + product.product_id); 206 207 //販売価格をセット 208 var price = $($(".list_area span.price").get(maxCnt)); 209 //販売価格をクリア 210 price.empty(); 211 var priceVale = ""; 212 //販売価格が範囲か判定 213 if (product.price02_min == product.price02_max) { 214 priceVale = product.price02_min_tax_format + '円'; 215 } else { 216 priceVale = product.price02_min_tax_format + '~' + product.price02_max_tax_format + '円'; 217 } 218 price.append(priceVale); 219 220 //コメントをセット 221 $($(".list_area .listcomment").get(maxCnt)).text(product.main_list_comment); 222 199 statusEl += "</ul>"; 200 statusAreaEl.append(statusEl); 223 201 } 202 203 //商品名をセット 204 $($(".list_area a.productName").get(maxCnt)).text(product.name); 205 $($(".list_area a.productName").get(maxCnt)).attr("href", url + product.product_id); 206 207 //販売価格をセット 208 var price = $($(".list_area span.price").get(maxCnt)); 209 //販売価格をクリア 210 price.empty(); 211 var priceVale = ""; 212 //販売価格が範囲か判定 213 if (product.price02_min == product.price02_max) { 214 priceVale = product.price02_min_tax_format + '円'; 215 } else { 216 priceVale = product.price02_min_tax_format + '~' + product.price02_max_tax_format + '円'; 217 } 218 price.append(priceVale); 219 220 //コメントをセット 221 $($(".list_area .listcomment").get(maxCnt)).text(product.main_list_comment); 224 222 } 225 223 pageNo++;
Note: See TracChangeset
for help on using the changeset viewer.