- Posts: 490
- Thank you received: 2
how to make a product grid view
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.5
-- Error-message(debug-mod must be tuned on) -- : none
hi i want to implement a grid view for my products listing. I used DIV then image and title for the layout. i found the thread below
www.hikashop.com/forum/product-category-...in-list-or-grid.html
i cant get it to work. the page is blank.
Please help. thanks
Please Log in or Create an account to join the conversation.
Products listings display in a grid view by default and is not emtpy.
The "products listing" menu item that is added by HikaShop in the Joomla menu manager when you install HikaShop for the first time on the website will do that automatically when you use it.
So I don't know what is your problem. Please provide a link to the page with the problem and screenshots of the settings of its menu item.
Please Log in or Create an account to join the conversation.
let me explain. As seen on the thread i want to implement list view to grid view 2 columns and grid view 3 columns that can be selected by the user on the front end. I am currently using product list div single column title and description layout. How can i achieve this?
I tried the solution included in the other thread but cant get it to work. Any solutions? The thread i tried to follow is in my initial inquiry.
here is the example i want to achieve
Thanks
Please Log in or Create an account to join the conversation.
Well, if you tried the solution on the other thread and you got a blank page, it means you made a mistake somewhere.
Please provide screenshots of what you did where. Then, turn on the error reporting and debug mode settings of the Joomla configuration and access the blank page again and you should see an error message giving information on what is wrong in your modifications.
Please Log in or Create an account to join the conversation.
Part of the message is hidden for the guests. Please log in or register to see it.
this is the code
<?php global $Itemid;
if($Itemid==1697){ ?>
<a href="index.php?option=com_hikashop&view=product&layout=listing">grid</a>
<?php else{ ?>
<a href="index.php?option=com_hikashop&view=product&layout=listing">list</a>
<?php } ?>
both layouts are "image and description" so i guess it would be better to use the SEO links.
i edited the file listing_img_desc i added the link right after this code
if(!empty($this->row->extraData->top)) { echo implode("\r\n",$this->row->extraData->top); }
?>
well the page is no longer blank. But i dont see the anchor links.
debug is on and error reporting is set to max . this is the error but i dont think it is related.
Please Log in or Create an account to join the conversation.
Your code is not what it should be if you followed the explanations of the other thread:
www.hikashop.com/forum/product-category-...-or-grid.html#189449
Instead of YYY and ZZZ, you're supposed to put the links of the menu items. But you put just a non SEF link which is not valid:
index.php?option=com_hikashop&view=product&layout=listing
So please use real links. For example: mywebsite.com/alias-of-grid-menu-item.html
Also, the other thread says that you should add that modification in the file "listing" of the view "product". So why did you try adding it in the listing_img_desc view file ?
Please Log in or Create an account to join the conversation.
i just want to have the capability of adding a grid view. im using listing_img_desc with 1 column as my home page. i want to add a grid view button how can we do this?
BTW this is the error. i did as you instructed
Parse error: syntax error, unexpected '<' in /home/.../public_html/templates/.../html/com_hikashop/product/listing_img_desc.php on line 23
Please Log in or Create an account to join the conversation.
Again, you don't want to add that code in listing_img_desc. Please add it to listing.
Also, the error you have is not relative to the code you posted before. So either you changed the code, or you placed somewhere where it breaks the code.
Please understand that this is custom coding. We can't do it for you as part of the user support. We won't be able to help you further with that and we provided all the necessary information to do it.
If you need someone to help you with the changes, please contact a developer. You can potentially contact our partners here:
www.hikashop.com/home/our-partners.html
Please Log in or Create an account to join the conversation.
oh i see.So hikashop has no capability of displaying a grid view and a list view at the same page. If i need this i have to contact your partners. is this correct?
thanks again
Please Log in or Create an account to join the conversation.
I gave you the code modification to do it with HikaShop.
If you are not able to do the change on your own, then yes, you would have to contact a partner or have someone on your end help you with that.
Please Log in or Create an account to join the conversation.
i cant get that to work so i used a different code and i hope its ok.
you can see it here
Part of the message is hidden for the guests. Please log in or register to see it.
my problem now is with the filters. how do i make the filters work the same for all the links or the menu links i have created?
example. i searched for shoes. the results is for a list. so i clicked the grid view to display more and change the layout. the problem is that, the filter is set again to zero, so back to the start.Now, if i use again the filter and decided that the results is to many, my option is to go back to the list view. the filter for that menu will retain is former settings. What can i do with this?
i guess it should be simple. i searched for something using the filter, then decided to change the layout by clicking on the menu links then it should only change layout. how can i do this?
thanks again
Please Log in or Create an account to join the conversation.
The filters are saved per menu item.
So the issue you have with the filters is normal since you're using different menu items.
If you want to keep the filters values throughout the different display modes, then you should have only one menu item, and instead customize further the code of the view file to change the layout based on an extra parameter in the URL.
So it would be something like that:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Obviously, that's due to the customization you made to have these links for different views.
Impossible to provide detailed help because only you know the customization.
But as a hint, it looks as if you should reconsider where to place the code for the links, so it does not appear multiple times on a page, and not multiple times with with filters.
Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Please Log in or Create an account to join the conversation.
Hi,
The filters are saved per menu item.
So the issue you have with the filters is normal since you're using different menu items.
If you want to keep the filters values throughout the different display modes, then you should have only one menu item, and instead customize further the code of the view file to change the layout based on an extra parameter in the URL.
So it would be something like that:
Code:<?php if(!@$_GET['columns'] || $_GET['columns']>3){ $_GET['columns'] = 1; $this->params->set('columns', $_GET['columns']); ?> <a href="http://.../store">1 column</a> <a href="http://.../store?columns=2">2 columns</a> <a href="http://.../store?columns=3">3 columns</a>
thanks
Please Log in or Create an account to join the conversation.
We're still talking about the "listing" file of the "product" view. You can add that at the top there.
Please Log in or Create an account to join the conversation.
Just a quick questions.
1. What about SEO? Wouldn't it hurt it. Having 2-3 categories per item isn't so good.
2. What if I use canonical url?
3. Any chance it could be added into TODO list? So it could be used like it should... Looking other e-commerce its just quick ajax reload or something. It looks like it is not first time people are asking for it. Unless it is complicated to do with hikashop.
Regards
Please Log in or Create an account to join the conversation.
1.2. Having different URLs to reach the same pages is only a problem for SEO if you don't specify a canonical URL in your products/categories
3. It's already on our todo list.
Please Log in or Create an account to join the conversation.
tried the code above its not working. also the links are not working. its a blank screen
this is the error
this is the code
thanks
Please Log in or Create an account to join the conversation.
At the end of your code you are missing this: }
Add it and it should work....
Thanks
Please Log in or Create an account to join the conversation.