Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save izayoi256/c1ec736583f0ad8fc5a54595fec0c7cb to your computer and use it in GitHub Desktop.
Save izayoi256/c1ec736583f0ad8fc5a54595fec0c7cb to your computer and use it in GitHub Desktop.
LC_Page_Admin_Order_ProductSelect.php
// 略
switch ($this->getMode()) {
case 'search':
$objProduct = new SC_Product_Ex();
$this->arrForm = $objFormParam->getHashArray();
$wheres = $this->createWhere($objFormParam, $objDb);
$this->tpl_linemax = $this->getLineCount($wheres, $objProduct);
//ぶった斬りポイント==================================================================
// ページ送りの処理
$page_max = SC_Utils_Ex::sfGetSearchPageMax($_POST['search_page_max']);
// ページ送りの取得
$objNavi = new SC_PageNavi_Ex($_POST['search_pageno'], $this->tpl_linemax, $page_max, 'eccube.moveSearchPage', NAVI_PMAX);
$this->tpl_strnavi = $objNavi->strnavi; // 表示文字列
$startno = $objNavi->start_row;
$arrProduct_id = $this->getProducts($wheres, $objProduct, $page_max, $startno);
$productList = $this->getProductList($arrProduct_id, $objProduct);
//取得している並び順で並び替え
$this->arrProducts = $this->sortProducts($arrProduct_id, $productList);
$objProduct->setProductsClassByProductIds($arrProduct_id);
// ここから追加
foreach($arrProduct_id as $product_id){
$arrProductClasses = $objProduct->getProductsClassFullByProductId($product_id);
// 追加
SC_Utils::sfPrintR($arrProductClasses);
// 商品名など隠したい場合は代わりに下記を追加
SC_Utils::sfPrintR(array_map(function($v){return array_intersect_key($v, array_flip(array('stock', 'stock_unlimited')));}, $arrProductClasses));
}
// ここまで追加
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment