フォーラム

ホーム » Liferay Portal » English » 2. Using Liferay » General

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
sasmita swain
shopping category
2012/10/30 22:03
答え

sasmita swain

ランク: Regular Member

投稿: 185

参加年月日: 2012/02/24

最近の投稿

hi

how to keep shopping subcategory under category in shopping portlet. in one page.....

Thanks
Sasmita
Gaurav Jain
RE: shopping category
2012/10/30 22:35
答え

Gaurav Jain

ランク: Regular Member

投稿: 143

参加年月日: 2011/01/31

最近の投稿

sasmita swain:
hi

how to keep shopping subcategory under category in shopping portlet. in one page.....

Thanks
Sasmita


Hi Sasmita, your query is not really clear. Can you please elaborate?

However I could understand that you currently shopping portlet shows all parent categories on front page; and to see subcategories you need to click any one category; but you want to make all categories with subcategories visible at one go??
- If yes, you may achieve this by hooking shopping portlet jsps (categories.jspf)

Currently there is following code in it:
1List results = ShoppingCategoryServiceUtil.getCategories(scopeGroupId, categoryId, searchContainer.getStart(), searchContainer.getEnd());


here categoryId is parent category id which is 0 for first time. You may change this code to use different method instead:
getCategories(long groupId) , but this method doesn't supports paging params.
sasmita swain
RE: shopping category
2012/10/30 22:42
答え

sasmita swain

ランク: Regular Member

投稿: 185

参加年月日: 2012/02/24

最近の投稿

Gaurav Jain:
sasmita swain:
hi

how to keep shopping subcategory under category in shopping portlet. in one page.....

Thanks
Sasmita


Hi Sasmita, your query is not really clear. Can you please elaborate?

However I could understand that you currently shopping portlet shows all parent categories on front page; and to see subcategories you need to click any one category; but you want to make all categories with subcategories visible at one go??
- If yes, you may achieve this by hooking shopping portlet jsps (categories.jspf)

Currently there is following code in it:
1List results = ShoppingCategoryServiceUtil.getCategories(scopeGroupId, categoryId, searchContainer.getStart(), searchContainer.getEnd());


here categoryId is parent category id which is 0 for first time. You may change this code to use different method instead:
getCategories(long groupId) , but this method doesn't supports paging params.


in shopping portlet on first page it is showing category..when u are adding category it is going to next page then u can add subcategory..but i want to keep subcategory under main category on first page..

here i have attached screen shot..
Test casees is my main category
GRE IS MY SUBCATEGORY
画像の固定

添付ファイル: category.png (105.6k)
Gaurav Jain
RE: shopping category
2012/10/30 22:56
答え

Gaurav Jain

ランク: Regular Member

投稿: 143

参加年月日: 2011/01/31

最近の投稿

So as I explained already you may hook shopping portlet jsps for your need. I also gave you an example
sasmita swain
RE: shopping category
2012/10/31 0:52
答え

sasmita swain

ランク: Regular Member

投稿: 185

参加年月日: 2012/02/24

最近の投稿

hi

how it will come in pagination????

Thanks

Sasmita
Gaurav Jain
RE: shopping category
2012/10/31 2:42
答え

Gaurav Jain

ランク: Regular Member

投稿: 143

参加年月日: 2011/01/31

最近の投稿

There is no method for categories to support pagination.
So if you have to copeup somewhere I guess emoticon