[Svn-src-all:3223] [version-2_12-dev 22124] #1972 商品を削除した際に、おすすめ商品からも削除される仕様に変更
tokuhiro
admin @ mail.ec-cube.net
2012年 12月 7日 (金) 17:04:45 JST
Subversion committed to /home/svn/open 22124
http://svn.ec-cube.net/open_trac/changeset/22124
┌────────────────────────────┐
│更新者 : tokuhiro │
│更新日時: 2012-12-07 17:04:44 +0900 (金, 07 12月 2012)│
└────────────────────────────┘
Log:
--------------------------------------------------------
#1972 商品を削除した際に、おすすめ商品からも削除される仕様に変更
Changed: [U:修正,A:追加,D:削除]
--------------------------------------------------------
U branches/version-2_12-dev/data/Smarty/templates/admin/contents/recommend.tpl
U branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_Recommend.php
U branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products.php
U branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Recommend.php
変更: branches/version-2_12-dev/data/Smarty/templates/admin/contents/recommend.tpl
===================================================================
--- branches/version-2_12-dev/data/Smarty/templates/admin/contents/recommend.tpl 2012-12-06 10:24:26 UTC (rev 22123)
+++ branches/version-2_12-dev/data/Smarty/templates/admin/contents/recommend.tpl 2012-12-07 08:04:44 UTC (rev 22124)
@@ -110,9 +110,6 @@
</div>
<div class="table-detail">
<div class="detail-name">商品名: <!--{$arrItems[$smarty.section.cnt.iteration].name|h}--></div>
- <!--{if $arrItems[$smarty.section.cnt.iteration].p_del_flg == '1'}-->
- <div class="attention">※<!--{$arrItems[$smarty.section.cnt.iteration].name|h}-->は販売商品から削除されています。</div>
- <!--{/if}-->
<div class="detail-form">
<form name="form<!--{$smarty.section.cnt.iteration}-->" id="form<!--{$smarty.section.cnt.iteration}-->" method="post" action="?">
<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
変更: branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_Recommend.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_Recommend.php 2012-12-06 10:24:26 UTC (rev 22123)
+++ branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_Recommend.php 2012-12-07 08:04:44 UTC (rev 22124)
@@ -174,7 +174,7 @@
*/
function getRecommendProducts() {
$objQuery = $objQuery =& SC_Query_Ex::getSingletonInstance();
- $col = 'dtb_products.name,dtb_products.main_list_image,dtb_products.del_flg as p_del_flg,dtb_best_products.*';
+ $col = 'dtb_products.name,dtb_products.main_list_image,dtb_best_products.*';
$table = 'dtb_best_products INNER JOIN dtb_products ON dtb_best_products.product_id = dtb_products.product_id';
$where = 'dtb_best_products.del_flg = 0';
$order = 'rank';
変更: branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products.php 2012-12-06 10:24:26 UTC (rev 22123)
+++ branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products.php 2012-12-07 08:04:44 UTC (rev 22124)
@@ -261,6 +261,7 @@
$objQuery->begin();
$objQuery->update('dtb_products_class', $sqlval, "product_id IN (SELECT product_id FROM dtb_products WHERE $where)", $arrParam);
$objQuery->delete('dtb_customer_favorite_products', "product_id IN (SELECT product_id FROM dtb_products WHERE $where)", $arrParam);
+ $objQuery->delete('dtb_best_products', "product_id IN (SELECT product_id FROM dtb_products WHERE $where)", $arrParam);
$objQuery->update('dtb_products', $sqlval, $where, $arrParam);
$objQuery->commit();
}
変更: branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Recommend.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Recommend.php 2012-12-06 10:24:26 UTC (rev 22123)
+++ branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Recommend.php 2012-12-07 08:04:44 UTC (rev 22124)
@@ -93,7 +93,7 @@
// おすすめ商品取得
$col = 'T1.best_id, T1.category_id, T1.rank, T1.product_id, T1.title, T1.comment, T1.create_date, T1.update_date';
$table = 'dtb_best_products as T1 INNER JOIN dtb_products as T2 ON T1.product_id = T2.product_id';
- $where = 'T1.del_flg = 0 and T2.status = 1 and T2.del_flg = 0';
+ $where = 'T1.del_flg = 0 and T2.status = 1';
$objQuery->setOrder('T1.rank');
$objQuery->setLimit(RECOMMEND_NUM);
$arrBestProducts = $objQuery->select($col, $table, $where);
Svn-src-all メーリングリストの案内