バージョン選択

フォーラム

メニュー

オンライン状況

45 人のユーザが現在オンラインです。 (24 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 45
もっと...

サイト内検索

質問 > 管理機能 > 特定カテゴリでのおすすめ商品の表示数について

管理機能

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
r.ts
投稿日時: 2024/3/5 9:11
対応状況: −−−
常連
登録日: 2024/2/29
居住地:
投稿: 48
Re: 特定カテゴリでのおすすめ商品の表示数について
ありがとうございました。

下記コードで対応しました。

RecommendProductRepository.php

/**
     * Get recommend product by display status of product.
     *
     * @return array
     */
    public function getRecommendProduct()
    {
        $query = $this->createQueryBuilder('rp')
            ->innerJoin('Eccube\Entity\Product', 'p', 'WITH', 'p.id = rp.Product')
	  ->innerJoin('Eccube\Entity\ProductCategory', 'c', 'WITH', 'c.product_id = rp.Product')
            ->where('p.Status = :Disp')
            ->andWhere('rp.visible = true')
	  ->andWhere('c.category_id = 2')
            ->orderBy('rp.sort_no', 'DESC')
	  ->setMaxResults(1)
            ->setParameter('Disp', ProductStatus::DISPLAY_SHOW)
            ->getQuery();

        return $query->getResult();
    }
フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
   特定カテゴリでのおすすめ商品の表示数について r.ts 2024/3/3 11:32
     Re: 特定カテゴリでのおすすめ商品の表示数について k.nakayama 2024/3/3 12:11
       Re: 特定カテゴリでのおすすめ商品の表示数について r.ts 2024/3/3 15:18
         Re: 特定カテゴリでのおすすめ商品の表示数について k.nakayama 2024/3/3 16:11
         » Re: 特定カテゴリでのおすすめ商品の表示数について r.ts 2024/3/5 9:11

 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は108,600名です
総投稿数は112,740件です

投稿数ランキング

1
seasoft
7369
2
468
3217
3
AMUAMU
2712
4
nanasess
2336
5
umebius
2085
6
h_tanaka
2025
7
yuh
1900
8
mcontact
1735
9
red
1583
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
805
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
balisys
502


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.