留言板
image is not displaying in shopping portlet
sasmita swain,修改在11 年前。
image is not displaying in shopping portlet
Regular Member 帖子: 183 加入日期: 12-2-24 最近的帖子
hiii
when i am uploading image in shopping portlet ,it is not displaying in items
why??
Thanks
Sasmita
when i am uploading image in shopping portlet ,it is not displaying in items
why??
Thanks
Sasmita
Nikhil Nishchal,修改在11 年前。
RE: image is not displaying in shopping portlet
Regular Member 帖子: 176 加入日期: 12-6-22 最近的帖子
which version of Liferay you are using?
While uploading image in shopping portlet , please checked the check-box below the image uploading field <use small image, like those>.
then save, image will be displayed.
Are you using any hooks on this?
While uploading image in shopping portlet , please checked the check-box below the image uploading field <use small image, like those>.
then save, image will be displayed.
Are you using any hooks on this?
sasmita swain,修改在11 年前。
RE: image is not displaying in shopping portlet
Regular Member 帖子: 183 加入日期: 12-2-24 最近的帖子Nikhil Nishchal:
which version of Liferay you are using?
While uploading image in shopping portlet , please checked the check-box below the image uploading field <use small image, like those>.
then save, image will be displayed.
Are you using any hooks on this?
ya i am using hooks..I am usingLR6.1.I have checked checkbox and szve images but still it is not displaying
Nikhil Nishchal,修改在11 年前。
RE: image is not displaying in shopping portlet
Regular Member 帖子: 176 加入日期: 12-6-22 最近的帖子
then please check hook code if you have done any change with image display.
Because default portlet is working fine.
What changes u made through hook?
Did you dibug the code? any log error
Because default portlet is working fine.
What changes u made through hook?
Did you dibug the code? any log error
sasmita swain,修改在11 年前。
RE: image is not displaying in shopping portlet
Regular Member 帖子: 183 加入日期: 12-2-24 最近的帖子
hi
i want to display image in SKU in shopping portlet..
i want to display image in SKU in shopping portlet..
Nikhil Nishchal,修改在11 年前。
RE: image is not displaying in shopping portlet
Regular Member 帖子: 176 加入日期: 12-6-22 最近的帖子
If image is upladed (check in DB entry).
You can retrieve as a sample code below from (cart.jsp):
ShoppingCartItem cartItem = (ShoppingCartItem)entry.getKey();
ShoppingItem item = cartItem.getItem();
// SKU and small image
StringBundler sb = new StringBundler();
if (item.isSmallImage()) {
sb.append("<br />");
sb.append("<img alt=\"");
sb.append(item.getSku());
sb.append("\" border=\"0\" src=\"");
if (Validator.isNotNull(item.getSmallImageURL())) {
sb.append(item.getSmallImageURL());
}
else {
sb.append(themeDisplay.getPathImage());
sb.append("/shopping/item?img_id=");
sb.append(item.getSmallImageId());
sb.append("&t=");
sb.append(WebServerServletTokenUtil.getToken(item.getSmallImageId()));
}
sb.append("\">");
}
You can retrieve as a sample code below from (cart.jsp):
ShoppingCartItem cartItem = (ShoppingCartItem)entry.getKey();
ShoppingItem item = cartItem.getItem();
// SKU and small image
StringBundler sb = new StringBundler();
if (item.isSmallImage()) {
sb.append("<br />");
sb.append("<img alt=\"");
sb.append(item.getSku());
sb.append("\" border=\"0\" src=\"");
if (Validator.isNotNull(item.getSmallImageURL())) {
sb.append(item.getSmallImageURL());
}
else {
sb.append(themeDisplay.getPathImage());
sb.append("/shopping/item?img_id=");
sb.append(item.getSmallImageId());
sb.append("&t=");
sb.append(WebServerServletTokenUtil.getToken(item.getSmallImageId()));
}
sb.append("\">");
}