Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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

Link to comment
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.

Link to comment
Share on other sites

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">

 

Phoenix support now at https://phoenixcart.org/forum/
App created for phoenix
TinyMCE editor for admin

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...