View Full Version : List view as default
suntech
05-07-2011, 09:00 AM
I am looking to findout if there is a way to have list view the default and only option for showing the product listing.
Thank you,
Tim
pgmarshall
05-07-2011, 09:55 AM
Yes - simply open your admin panel ... Configuration -> Product Setting -> Product Listing -> Product Display Type (Default = 0 or Columns = 1)-> Set to 0.
Job done ...
ps. The system will first look here ... if the user has chosen something already this will override ... also if the active session has already picked one it will remain.
So when you are testing after switching ... make sure you start a new session ... close your browser and reopen it otherwise the system will automatically select the last used list style.
Regards,
suntech
05-07-2011, 10:08 AM
Thank you, that is a good start.
I would also like to remove the option for the user to change the view.
suntech
05-07-2011, 10:41 AM
Got it. If anybody else wants to do this go to includes/modules/product_listing.php
Change:
$list = '<table align="left"><tr><td width="20" align="center"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('gridlist')). 'gridlist=list') . '"> ' . tep_image(DIR_WS_ICONS . 'list.png', 'View as List') . '</a></td><td class="splink"><a class="filterbox" href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('gridlist')). 'gridlist=list') . '">' . TEXT_VIEW_AS_LIST . '</a></td></tr></table>';
$grid = '<table align="left"><tr><td width="20" align="center"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('gridlist')). 'gridlist=grid') . '"> ' . tep_image(DIR_WS_ICONS . 'grid.png', 'View as Grid') . '</a></td><td class="splink"><a class="filterbox" href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('gridlist')). 'gridlist=grid') . '">' . TEXT_VIEW_AS_GRID . '</a></td></tr></table>';
To:
//$list = '<table align="left"><tr><td width="20" align="center"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('gridlist')). 'gridlist=list') . '"> ' . tep_image(DIR_WS_ICONS . 'list.png', 'View as List') . '</a></td><td class="splink"><a class="filterbox" href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('gridlist')). 'gridlist=list') . '">' . TEXT_VIEW_AS_LIST . '</a></td></tr></table>';
//$grid = '<table align="left"><tr><td width="20" align="center"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('gridlist')). 'gridlist=grid') . '"> ' . tep_image(DIR_WS_ICONS . 'grid.png', 'View as Grid') . '</a></td><td class="splink"><a class="filterbox" href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('gridlist')). 'gridlist=grid') . '">' . TEXT_VIEW_AS_GRID . '</a></td></tr></table>';
indiskafilmer
01-12-2012, 07:16 AM
Thank Suntech
finn4u
01-20-2012, 06:25 AM
Hi please help i need help.
rax : (http://www.raxday.com/) Oscmax
when you Hit on the Category Laptop
select the Product Acer rax : Acer [11] - $100.00 (http://www.raxday.com/product_info.php?products_id=3)
I have added the attributes and prices
Can you help me in the product attributes and price value as per the following
100mg
__________________________________________________ ___
10 Pill --- (Price) -- (Add to Cart)
20 Pills --- (Price) -- (Add to Cart)
30 Pills --- (Price) -- (Add to Cart)
50mg
________________________________________
10 Pill --- (Price) -- (Add to Cart)
20 Pills --- (Price) -- (Add to Cart)
30 Pills --- (Price) -- (Add to Cart)
Powered by vBulletin® Version 4.2.0 Copyright © 2023 vBulletin Solutions, Inc. All rights reserved.