Jump to content
SCH_001

Not show new products index for mobile users

Recommended Posts

Customer gave me some feed back today saying he wishes he did not have to scroll down past new products to get to the search bar and the categories listing.

I turned off new products and it looks so much better on a mobile device but on a desk top leaves a big blank hole and to be honest I would like to promote whats new

So seems new products is a module (new products index not boxes) can I put some code in somewhere that stops it displaying on a mobile but still displays on a PC?

Many thanks

Share this post


Link to post
Share on other sites

BS4 you should be able to put

<div class="col-sm-<?php echo $content_width; ?> d-none d-sm-block">

or

<div class="col-sm-<?php echo $content_width; ?> d-none d-md-block">

in tpl_cm_i_new_products.php, but i forget the equivalent classes for BS3.

Also you should install the search bar into the header, and disable the column search box.

Share this post


Link to post
Share on other sites
Posted (edited)

So anyone got a solution for BS3?

and the above code does it go at the start as tried it and it threw the layout out

Edited by supercheaphobb
more info

Share this post


Link to post
Share on other sites
Posted (edited)

Available classes

Use a single or combination of the available classes for toggling content across viewport breakpoints.

  Extra small devicesPhones (<768px) Small devicesTablets (≥768px) Medium devicesDesktops (≥992px) Large devicesDesktops (≥1200px)
.visible-xs-* Visible Hidden Hidden Hidden
.visible-sm-* Hidden Visible Hidden Hidden
.visible-md-* Hidden Hidden Visible Hidden
.visible-lg-* Hidden Hidden Hidden Visible
.hidden-xs Hidden Visible Visible Visible
.hidden-sm Visible Hidden Visible Visible
.hidden-md Visible Visible Hidden Visible
.hidden-lg Visible Visible Visible Hidden

 

so just add hidden-xs to the end to hide on extra small devices, you can add as many hiden-* as you need

https://getbootstrap.com/docs/3.4/css/#responsive-utilities

e.g.

<div class="col-sm-<?php echo $content_width; ?> cm-i-new-products hidden-xs hidden-sm">

 

Edited by puddlec
added link

App created for phoenix
TinyMCE editor for admin

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×