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

This is based on an existing addon so all credit goes to the original author. I have only made a very small change.

A simple addon to let you place a featured products carousel with “Wow!” Ribbons on the index page.

Simply install the files and install and turn on.

It requires owl_carousel so if you do not have that then just follow the instructions included to install that.

It has been tested on the v2.3.4.1 CE Only.

image.thumb.png.51c3a836ed9d3c14abb5c1f760d2399d.png

 

 

Link to comment
Share on other sites

  • 4 weeks later...
On 6/24/2018 at 12:29 PM, JcMagpie said:

This is based on an existing addon so all credit goes to the original author. I have only made a very small change.

A simple addon to let you place a featured products carousel with “Wow!” Ribbons on the index page.

Simply install the files and install and turn on.

It requires owl_carousel so if you do not have that then just follow the instructions included to install that.

It has been tested on the v2.3.4.1 CE Only.

image.thumb.png.51c3a836ed9d3c14abb5c1f760d2399d.png

 

Seems awesome is it possible to use it with categories?? I use the same Frozen CE version..

Like I want featured categories on my index page.. Please help would be deeply appreciated..

Warm Regds./

radhavallabh

Link to comment
Share on other sites

1 hour ago, JcMagpie said:

I’m not sure I understand what your asking, If a category is to be a featured or special then its simpler just to change its image.

I meant use Categories in the Carousel rather than the products.. The image and link will be of the category specified..

Link to comment
Share on other sites

No sorry no plans to do that, just don't see the point. If you want to display cats then ask @burt  as he has a Cat's on index add-on as part of the 28d thing.

Or post in the commercial section to get one coded.

 

Link to comment
Share on other sites

12 minutes ago, JcMagpie said:

No sorry no plans to do that, just don't see the point. If you want to display cats then ask @burt  as he has a Cat's on index add-on as part of the 28d thing.

Or post in the commercial section to get one coded.

Okay Thank you will do that...:smile:

Link to comment
Share on other sites

  • 2 months later...

The Add-on has been updated to use owl carousel 2.3.4 and include the display issue fix.

It no longer requires the owl_carousel 2.3.4 script to be loaded locally. These are now loaded to the header and footer using Header_Tags and use CDN rather than local install.

Owl requires the owl style sheets and jQuery to be loaded in a specific order to work properly. See the recommendations here

https://owlcarousel2.github.io/OwlCarousel2/docs/started-installation.html

If you are using any other add-on using owl it may cause issues if it’s not installed correctly.

It is still a no core change add-on.

Install and turn on both Header_Tags then simply install the other files and install and turn on the new add-on.

It has been tested on the v2.3.4.1 CE Only.

 

Link to comment
Share on other sites

Just a fiddle with the addon, and noticed a few things

  • any reason for having two header modules instead of just the one? - one for the css the other for java script could you not just do something like the below - similar was done for the colourbox header tag as part of the product info page
	$oscTemplate->addBlock( '<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.js"></script>' . "\n", $this->group);
    $oscTemplate->addBlock( '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.css">' . "\n", 'header_tags');
    $oscTemplate->addBlock( '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.css">' . "\n", 'header_tags');
  • tried turning on showing the product descriptions, and got an error on featured_products_carousel.php line 37 should tep_i_featured_products_carousel_limit_text not be tep_fp_featured_products_carousel_limit_text
  • noticed it was possible to have a product shown, after being selected as a featured product been set to inactive 

I managed to fix that by adding product_status to the query that gets the information to be shown, then warping the array that outputs the product info in a if statement that checks the product status - not sure if that is the best way of achieving that, but it worked for me.

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

 

Link to comment
Share on other sites

For point one I just followed the recomendation by the Owl 2.3.4 documentation which requires script to be in the footer hence the 2 tags addons.

https://owlcarousel2.github.io/OwlCarousel2/docs/started-installation.html

As for the description I'll have a look, probably in the old version 🙄 as Its not something I have knowingly changed on this version.

 

Link to comment
Share on other sites

Has been updated to fix error as i loaded up old files, they will work but just with default Owl2 settings.

Bug fix to make speed controls work.

If you want to edit then in template file,

Find line autoPlay: and copy it and replace autoPlay: with autoplayTimeout:

Find paginationSpeed: and replace with autoplaySpeed:

Find slideSpeed: and replace with navSpeed:

Find navigationText and replace with navText

 

The issue with discription is still to be fixed. For now it's been disabled.

 

Link to comment
Share on other sites

Bug fixed to make product description show properly. You can simply replace the template file, or uninstall and replace files and reinstall.

Sorry was just poor editing on my part. Full Pakage has been uploaded to apps.

image.thumb.png.d851141d955c08eae67ed469597fedc6.png

 

Link to comment
Share on other sites

  • 2 months later...
  • 4 months later...

I installed this for someone with an older CE version and it stopped the list/grid view from working on the category listing pages. I changed the code in both header tags modules as below to fix it.  Even if it doesn't cause any problems, there's no reason to have the code work on any page other than the home page, at least at its current version, so making this change would be a good idea, in my opinion. 

    function execute() {
      global $oscTemplate, $category_depth;
 
      if (basename($_SERVER['SCRIPT_NAME']) == 'index.php' && (isset($category_depth) && $category_depth == 'top') && ! isset($_GET['manufacturers_id'])) {   

           original code here

      }
    }

 

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thank's Jack it makes sence to me, I just did not think of that at the time. I have used your edit on my test site and it worked fine. However I was unable to update the add-on as when I add your code to it and submit it to the apps market it is rejected showing this error.

PHP Parse error: syntax error, unexpected 'global' (T_GLOBAL), expecting function (T_FUNCTION) or const (T_CONST) in Featured products with Ribbon v2.3.4.1CE V5.4/includes/modules/header_tags/ht_jcm_owl_carousel2_js.php on line 38
Errors parsing Featured products with Ribbon v2.3.4.1CE V5.4/includes/modules/header_tags/ht_jcm_owl_carousel2_js.php

line 38 is,

image.png.cdcc47a9eb2bd03578216800855a10b2.png

No idea why it's beeing flaged as an error as it worked on test site without logging any errors. :(

 

Link to comment
Share on other sites

Has been updated to include Jack's fix. Was nothing wrong with Jacks code at all I tested on 2 live sites and in PHP Sandbox and no errors were reported. Not sure why the apps market kept regecting it as having errors.

on 3rd submision the very same code was accept go figure! 🙄

it was tested upto PHP 7.3.5 in sand box so you should be able to use without any issues.

image.png.bf07fb6ae4220a4f4ddd437707aae592.png

 

Link to comment
Share on other sites

The class constructor has a syntax error which is why the Apps Marketplace did not accept the upload. Here is the class constructor of includes/modules/header_tags/ht_jcm_owl_carousel2_js.php:

    function __construct() {
      $this->title = MODULE_HEADER_TAGS_JCM_OWL_CAROUSEL2_JS_TITLE;
      $this->description = MODULE_HEADER_TAGS_JCM_OWL_CAROUSEL2_JS_DESCRIPTION;

      if ( defined('MODULE_HEADER_TAGS_JCM_OWL_CAROUSEL2_JS_STATUS') ) {
        $this->sort_order = MODULE_HEADER_TAGS_JCM_OWL_CAROUSEL2_JS_SORT_ORDER;
        $this->enabled = (MODULE_HEADER_TAGS_JCM_OWL_CAROUSEL2_JS_STATUS == 'True');
      }
    }

    global $oscTemplate, $category_depth;

      if (basename($_SERVER['SCRIPT_NAME']) == 'index.php' && (isset($category_depth) && $category_depth == 'top') && ! isset($_GET['manufacturers_id'])) {



    $oscTemplate->addBlock( '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.css">' . "\n", $this->group);
    $oscTemplate->addBlock( '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.css">' . "\n", $this->group);



             }
          }

Either the constructor is closed early before the global statement, or a function name is missing.

Either way, it's good now that the Apps Marketplace can detect such issues 👍

:heart:, osCommerce

Link to comment
Share on other sites

Yes it's good that it's picking up issues but unless I can reproduce the error it's hard to debug :( , I have set sand box to strict error reporting and it's still shows no issues.

error log on server is also set to report all errors and is showing none. Will keep looking but as app market has now accepted same code? maybe one that's going to take a bit more effort to pin down.

 

Link to comment
Share on other sites

1 minute ago, JcMagpie said:

Yes it's good that it's picking up issues but unless I can reproduce the error it's hard to debug :( , I have set sand box to strict error reporting and it's still shows no issues.

error log on server is also set to report all errors and is showing none. Will keep looking but as app market has now accepted same code? maybe one that's going to take a bit more effort to pin down.

It looks like the function from Jack's code is missing...

  function execute() {

Dan

Link to comment
Share on other sites

😂 ok that's would explain why I can not debug as it's not missing in any of my file!

Just checked and it's in the zip file I uploaded which was accepted by apps market. No idea how it go lost in first 2 zips!! still now we know why I can stop looking for the bug.

Thanks Dan would not have spotted that  as I kept debuging my files. 🙄

 

Link to comment
Share on other sites

  • 2 weeks later...

Looking to move this either into the header a full 12 columns wide

Or prefer to it act as the index_products and display inline with the left column.

Currently the beadcrumb trail, then the left column and then below is the featured products.

Have changed this value to numerous settings

<div id="i_featured_products_carousel" class="col-sm-8">

Have tried using css to achieve the display but to no avail.

Guessing I am not using the proper code to push it to where I want.

Link to comment
Share on other sites

Sorry did not get notification of question. To do that you would need to make a new add-on as these are for index if I remember corectly. To put in header you require a header add-on.

22 hours ago, Dnj1964 said:

Or prefer to it act as the index_products and display inline with the left column.

Not sure what you mean by that? pic would help some one as chalenged as me 😊

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

Featured products header carousel with Ribbon v2.3.4.1CE BS3/4 V1.1

Updated to fix small css error on ribbon.

If you use gradient on ribbon then use color1 and color2 . Make sure color is blank.

If using one color then use color only and leave color1 and color2 blank.

image.png.d7cb1d283f0a66e4c21ba80d9da88e3a.png

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

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...