Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #3361447
Can i have grid view on desktop and drop down on mobile?
Closed

Comments

  • Warren started the conversation

    Hi,

    The new grid option is great. However we have 40 + composite products (fabrics) per product. So on a mobile device the viewing is a very long scroll. Is there a way to have the grid on a Desktop but on a mobile it would be the drop down?

    Or would you have any suggestions?

    Website drop down show here. https://www.naturallycane.com.au/shop/show-all-living-products/collections/florence-3-seater-sofa-suite-tobacco/

    website product with Grid 4. https://www.naturallycane.com.au/shop/show-all-living-products/collections/vogue-3-seater-and-2-armchair-suite/


  •  767
    Janilyn replied

    Hi Warren,

    Thank you for contacting WPClever Support Forum. 

    We’ve received your ticket and assigned one of our developers to help you with that. 

    He’ll be looking into your question and responding with specific instructions as soon as possible. 

    Please stay patient as we're having very heavy workloads, it might take some time for our developers to reach back.

    Best regards.

    Janilyn T. - WPClever Support Agent

  •  1,281
    Dustin replied

    Hi Warren,

    Yes, you can do that.

    Please update our plugin to the latest version 7.0.2, then add the below custom code (How to add custom code?)

    add_filter( 'wooco_product_get_components', function ( $components ) {
        if ( wp_is_mobile() ) {
            foreach ( $components as $key => $component ) {
                $components[ $key ]['grid'] = 'no';
            }
        }
        return $components;
    }, 99 );
    add_filter( 'wooco_get_setting', function ( $setting, $name ) {
        if ( wp_is_mobile() && ( $name === 'selector' ) ) {
            return 'ddslick';
        }
        return $setting;
    }, 99, 2 );

    Please remember that it affects the real mobile device, so may you won't see the change when changing the browser size on the desktop.

    Best regards,
    Dustin