Home Forums WoodMart support forum List/Grid Problem

List/Grid Problem

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #44066

    wanila
    Participant

    Hello!

    In woodmart online demo, the default shop page style is “grid”
    If a user select “list” , then shop page design will change to list. but if user go to other pages ( for example homepage ) and then user come back to shop page, the shop page design will be “grid” again.
    this is correct! no problem with that.

    but in my website, if a user select “list” and then go to other pages ( forexample homepage ) and then user come back to shop page, the shop page design will still be in “list” mode!
    even if user close the website and then open it again, the shop page will still show in “list” mode
    also, i found that this is not caching problem
    even the my shop page url is normal! ( http://www.examle.com/shop/ …… i mean no “shop_view=list” at the end of it )
    please check the private section.

    Thank you.

    #44108

    Artem Temos
    Keymaster

    Hi,

    Actually, it works correctly for your website and doesn’t for ours. There is a cache plugin installed on our website and that is why the grid view is always displayed when you close/open the shop page. In general, this value is saved in visitor’s session data and he will see the chosen products view (grid or list) even if he close/open the site again.

    Regards

    #44165

    wanila
    Participant

    For some reasons, i prefer to make my website work like woodmart demo …
    I installed the “wp fastest cache” but nothing happened.
    Is there anyway to make my website to be like woodmart demo without a cache plugin?

    #44171

    Artem Temos
    Keymaster

    Try to add the following PHP code snippet to the child theme functions.php file to do this

    	function woodmart_get_shop_view() {
    		if ( isset( $_REQUEST['shop_view'] ) ) {
    			return $_REQUEST['shop_view'];
    		}else {
    			$shop_view = woodmart_get_opt('shop_view');
    			if ( $shop_view == 'grid_list' ) {
    				return 'grid';
    			}elseif( $shop_view == 'list_grid'){
    				return 'list';
    			}else{
    				return $shop_view;
    			}
    		}
    	}
Viewing 4 posts - 1 through 4 (of 4 total)