Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Support thread for featured products with Ribbon v2.3.4.1 CE


Recommended Posts

On 5/25/2019 at 8:43 AM, JcMagpie said:

Not sure if many will need this but here it is for those  (one or two) that may 😊. Has been updated to allow

1) Ribbon text to be set in language file

2) Set number displayed on small, medium and large screens in admin.

3) Ribbon color and gradient can be set in admin

4) Added class to limit length of text display to one line to keep compact. ( css can be removed in template file )

Only for CE Frozen BS3 or Frozen BS4

If you already have one running then you don't need to install the header_tags again.

Enjoy!

Oh and for those who wish to see it running it's on the BS4 test site but running in static mode. https://chilleddisplays.co.uk/

image.thumb.png.52beaa35714409f5e3623e2ea880ea2b.png

 

Featured products with Ribbon Header v2.3.4.1CE V1.0.zip

 

 

Have it installed in the header above the breadcrumb but need to limit inner product box height and width

Is there a way to limit the image size?

On a large screen it stretches the image to fit and reducing the image size would hopefully reduce the box size.

image.png.2c463e95ac51f00a6da3205b42f79bde.png

Thanks,

Doug

 

Link to comment
Share on other sites

Figured it out.

Changed:

/public_html/includes/modules/content/index/templates/featured_products_carousel.php

responsive:{  1000:{
                        items:4
                          }
                          },

 

To

responsive:{  1000:{
                        items:6
                          }
                          },

 

And:

/public_html/includes/modules/content/index/templates/featured_products_carousel.php

// Scroll per page not per item.
      slideBy:4,

 

To

// Scroll per page not per item.
      slideBy:6,

 

 

 

/public_html/includes/modules/content/index/templates/featured_products_carousel.php

(window).on("load",function()
{
  var owl = $("#i-featured-products");
  owl.owlCarousel({
       
	  responsive:{	
                  0:{
                       items:1
                         },

                  600:{
                       items:2
                          },

                  1000:{
                        items:6
                          }
                          },

      // By default, when true, auto plays every 5 secs (5000), 
      // Change true to false to NOT auto play or to another value ie 4000 to change auto play speed
      autoplay: ' . (MODULE_CONTENT_HEADER_FEATURED_PRODUCTS_CAROUSEL_AUTOPLAY == 'True' ? (MODULE_CONTENT_HEADER_FEATURED_PRODUCTS_CAROUSEL_AUTOPLAY_SPEED > '0' ? MODULE_CONTENT_HEADER_FEATURED_PRODUCTS_CAROUSEL_AUTOPLAY_SPEED : 'true') : 'false') . ',

      // By default, when true, auto plays every 5 secs (5000), 
      // Change true to false to NOT auto play or to another value ie 4000 to change auto play speed
      autoplayTimeout: ' . (MODULE_CONTENT_HEADER_FEATURED_PRODUCTS_CAROUSEL_AUTOPLAY == 'True' ? (MODULE_CONTENT_HEADER_FEATURED_PRODUCTS_CAROUSEL_AUTOPLAY_SPEED > '0' ? MODULE_CONTENT_HEADER_FEATURED_PRODUCTS_CAROUSEL_AUTOPLAY_SPEED : 'true') : 'false') . ',
      
	  // Stop autoplay on mouse hover
      autoplayHoverPause: true,


      // Scroll per page not per item.
      slideBy:6,


      // Option to stretch items when it is less than the supplied items.
      itemsScaleUp: false,

 

Link to comment
Share on other sites

7 hours ago, JcMagpie said:

That should not be required if your using the new header code as that can be changed in admin

image.png.3f650bb656807b0672e689dce7b4a50e.png

Still using the original version!

Don't want to change the code again to put it in the header.

 

Link to comment
Share on other sites

Thanks!

Far better layout and function than the previous version.

 

 

2 hours ago, JcMagpie said:

Has been updated to make it work with BS4 and other small changes.

Also the header verson is now on the apps section. Use only one on the same site to avoid conflicts.

 

Link to comment
Share on other sites

This works perfect in the header.👍

It loads on all pages, would rather it load on index.php

Not sure if un-commenting the code in owl would work. Probably have to reload module to try it out.

//if (basename($_SERVER['SCRIPT_NAME']) == 'index.php'

Plus a couple of other commented out items

Link to comment
Share on other sites

😊 headers are for all pages normaly. That is why you have an index add-on which only shows on index page. You can do what you ask but will require more code to do that.

If you feal upto it you can try. You simply need to add a function to add page select to the add-on. Take a look at the date picker header tag the function for page selection is used in that. You will need to add that to the header add-on so it is only shown on selected pages.

or look at @raiwa  add-on

it also uses the page select funtion to limit display to selected pages.

😂 or you can do it the old brute force way by editing template_top and using more than one header.php

find

<?php require('includes/header.php'); ?>

replace with as required

<?php if ($PHP_SELF == 'product_info.php') {
          require('includes/header.php') ;
 }elseif ($PHP_SELF == 'index.php') {
          require('includes/header2.php');
 }else{
          require('includes/headerx.php');
          }

Looks like a lot of work to me, much simpler to just use the index add-on, but it's upto you.

 

Link to comment
Share on other sites

Well with a cup of coffee and some time spent pulling my hair out trying to get the page select to work with the existing function and failing miserably :( came up with a simple alternative.

in the add-on  template file add the following at start of

<?php if ( basename($PHP_SELF) == 'index.php' && $cPath==null) { ?>

then at end of file add

<?php } ?>

What you are doing is basicly saying if it's not an index page ignore this code. So on pages like product_info or checkout or contact us that header will not show.

It will show on any page that is part of index page.

My not be the most elagent way of doing this but it works.

 

Link to comment
Share on other sites

Thanks....

Wanted to add it to the header, really like the header placement as opposed to the index.

But want the functionality of only displaying on the index page.

A lot of work, yes...  Worth it, only time will tell...

 

 

10 hours ago, JcMagpie said:

😊 headers are for all pages normaly. That is why you have an index add-on which only shows on index page. You can do what you ask but will require more code to do that.

If you feal upto it you can try. You simply need to add a function to add page select to the add-on. Take a look at the date picker header tag the function for page selection is used in that. You will need to add that to the header add-on so it is only shown on selected pages.

or look at @raiwa  add-on

it also uses the page select funtion to limit display to selected pages.

😂 or you can do it the old brute force way by editing template_top and using more than one header.php

find


<?php require('includes/header.php'); ?>

replace with as required


<?php if ($PHP_SELF == 'product_info.php') {
          require('includes/header.php') ;
 }elseif ($PHP_SELF == 'index.php') {
          require('includes/header2.php');
 }else{
          require('includes/headerx.php');
          }

Looks like a lot of work to me, much simpler to just use the index add-on, but it's upto you.

 

 

 

Thanks, you always come up with great ideas!

I get this concept, going to continue trying to come up with an alternate solution.

 

8 hours ago, JcMagpie said:

Well with a cup of coffee and some time spent pulling my hair out trying to get the page select to work with the existing function and failing miserably :( came up with a simple alternative.

in the add-on  template file add the following at start of


<?php if ( basename($PHP_SELF) == 'index.php' && $cPath==null) { ?>

then at end of file add


<?php } ?>

What you are doing is basicly saying if it's not an index page ignore this code. So on pages like product_info or checkout or contact us that header will not show.

It will show on any page that is part of index page.

My not be the most elagent way of doing this but it works.

 

 

 

 

Link to comment
Share on other sites

  • 4 weeks later...

 

On 5/31/2019 at 2:37 PM, JcMagpie said:

Well with a cup of coffee and some time spent pulling my hair out trying to get the page select to work with the existing function and failing miserably :( came up with a simple alternative.

in the add-on  template file add the following at start of


<?php if ( basename($PHP_SELF) == 'index.php' && $cPath==null) { ?>

then at end of file add


<?php } ?>

What you are doing is basicly saying if it's not an index page ignore this code. So on pages like product_info or checkout or contact us that header will not show.

It will show on any page that is part of index page.

My not be the most elagent way of doing this but it works.

Hi can it be used to exclude category pages as well?

Something seems missing I tried using it on one of my code in header but it does not hide the item in header.

Thanx for help in advance;

Warm Regds./

radhavallabh

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...