Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon} Modular Front Page


kymation

Recommended Posts

@@kymation

@@peterpil19  col-xs-12 sets the width to 100% (among other things) so I can see that working. I don't understand why it didn't work in the first place, but if this fixes the problem then I see nothing wrong with doing it.

 

The Equal Heights module works on blocks with the "equal-height" class, so check that your product containers have that class.

 

Regards

Jim

 

Hi Jim,

 

I haven't modified the stock installation of the front page add on so the front page new products  and categories images modules are already specifying the "equal-height" class for the containers.

 

Per my question a little earlier do you know where the "equal-height" class is actually defined. I have been unable to find it in the default installation of bootstrap EDGE or GOLD. It is not in the custom.css or the bootstrap.css files that I can see. The custom.css file for the 'equal heights div' module in the link supplied earlier also did not seem to have this class defined.

 

It's a really super Add On by the way. It should be default in osCommerce.

 

Peter

CE PHOENIX SUPPORTER

Support the Project, go PRO and get access to certified add ons

Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design.

Download the latest version of CE Phoenix from gitHub here

Link to comment
Share on other sites

The "equal-height" class is defined by the JavaScript in the Equal Heights module. It calculates a maximum height and then creates the CSS to add that height to the class. I don't know if the current Edge release uses that class.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

@@peterpil19

 

I'm sorry, I was giving misinformation. In the core of Edge the equal heights issue has only been fixed with css (ie. without needing header tags module) for the products listing which appear within categories, on New Products page, Specials page, search results.

 

The standard front page modules are still on the 'to do' list.

 

For the front page you will need to use the header tags module. What this does is to use javascript to find the biggest height of a grid box and then set all of the boxes on the page to the same height. It uses the class equal-height as a selector for this, and I don't think there's actually any css associated with it.

The files you need for this: ht_div_equal_heights.php in includes/modules/header_tags/ and the corresponding language file(s). They're available here:

http://addons.oscommerce.com/info/9507

 

You then need to install and then enable (for the index page).

 

A further complication is that since all this was done, an extra level has been introduced in the front page (index nested) so if it doesn't work for eg. new products within a category, we'll have to work out a fix for you.

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

@@BrockleyJohn

 

No worries and thank you very much for the suggestion.

 

I've reinstalled the header tags add on from the link you supplied and it seems to be working now :D

 

Thanks again to everyone for their patience in working through the various issue with me. I have certainly learned a lot. 

 

Peter

CE PHOENIX SUPPORTER

Support the Project, go PRO and get access to certified add ons

Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design.

Download the latest version of CE Phoenix from gitHub here

Link to comment
Share on other sites

  • 1 month later...

I wanted to install the featured products module into a recently installed 2.3.4 BS Edge. I understood that I also had to install the modular frontpage module which I did (Why did I have to, isn't something very similar already integrated into my version? At least the index modules that I have (customer greeting, main text, new products,...) look pretty much the same as the one of the modular frontpage.)

 

Anyway, I copied in all the new files for modular frontpage (from the responsive folder!) and featured products, I added the required section at the end of index.php, and added the frontpgae modules in my admin content configuration:

 

Result: The modules do not show up on my front page. The shop loads fine but the center area is empty.

If I use the index.php provided with modular frontpage, the screen is all white, no shop at all.

 

 

Any idea? As said I mainly need the featured products module.

 

I already noticed that my index.php looks different than the one provided with modular frontpage (instead of classes there are static file names, plus a whole section is missing, like eg. most of the lines from 52 to 99)

Edited by inra311
Link to comment
Share on other sites

@@inra311  Modular Front Page, and all of the addon modules for it, were written long before the Bootstrap code was modified to include modules on the index page. In fact the core code was written before the Bootstrap project even started. The Bootstrap project ignored the prior existing code and created an incompatible set of modules, so the much older Modular Front Page is not compatible with the current code. You can use either one, but you can use only one.

 

There is no added section in index.php -- the code from Modular Front Page replaces the existing code. The code that is replaced does not resemble the original code as it has been rewritten for the Bootstrap project. You will have to find the correct section of the code to replace and do that by hand. In the latest copy of Edge that I have, the code to be replaced looks like this:

<div class="page-header">
  <h1><?php echo HEADING_TITLE; ?></h1>
</div>

<?php
  if ($messageStack->size('product_action') > 0) {
    echo $messageStack->output('product_action');
  }
?>

<div class="row">
  <?php echo $oscTemplate->getContent('index'); ?>
</div>

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

I wanted to test this Featured module (based on latest edge), so I performed the following actions;

 

1.  Go here:  http://addons.oscommerce.com/info/9438

Notice it says:  "This Addon requires the Modular Front Page Bootstrap Addon to function"

 

2.  Look at the code downloaded.

I see nothing in there that makes me think "needs the modular front page addon".

 

3.  Upload files.  

Instead of uploading as requested in "front_page" group, I upload into "index" group.

 

4.  I install the module and set up the parameters.  

 

5.  I look at the shop, that part of the shop is mangled.  Why?

 

a.  to fix it, I get rid of the deprecated DIR_WS_* and deprecated FILENAME_* and replace as appropriate

b.  or another way to fix it;  install compatibility module

 

6.  Refresh the shop.  All is working

 

Conclusion:

 

This featured addon does not need the modular front page.

IMO (for what that is worth), it simply needs updating for latest edge as shown at 5a.  

It needs to be uploaded into "index" group for content modules.

 

Questions (for open discussion not arguments):

 

a. Should addon makers change/evolve their addons to suit how the core is evolving/changing ?

b. Would all of the other "front_page" modules work if loaded direct into "index" ?

 

If the answer to b is "yes"... it would be around 10 minutes work with a search and replace, then [a] becomes easy and support becomes less heavy for both core and addons...

Edited by burt
Link to comment
Share on other sites

I meanwhile came to similar assumptions. And  I also just tried a version by Tsimi, which says to be for 2.3.4BS Edge but it does not work for similar reasons I guess.

 

I even had the idea to copy it into the index folder (instead of frontpage), thinkung this is the newer version of basically the same thing. I need to rename it from cm_fp_  to  cm_i _ so that it was found to be available for the index modules.

 

I think the Tsimi version is already for the index section but gave me error for filenames and classes. I understood that these were replaced for hardcoded paths (well, I am not a programmer, just trying to understand what I read here or in the code)

 

I will try to modify the DIR and filename stuff (I think I have seen the pattern somewhere, or maybe someone might just tell me how to do...)

Link to comment
Share on other sites

@@inra311  Installing the Compatibility Addon will make most Bootstrap modules work with the current Edge release. You will still need to make any of the changes that the Addon says to make in the filenames.php and database_tables.php.

 

@@burt  My modules are coded to use the directory they are installed in, so moving them to the index directory instead of the front_page directory will probably just work. The caveat is whether the curent version of Edge supplies all of the data that the modules expect to see. I believe that it does, but I haven't tested that.

 

As to whether the Addon coders should be expected to keep all of their Addons up to date with the latest Edge version -- what are you smoking? I know that the pace has slowed a bit recently, but I have seen a dozen or so changes to Edge in a single day. Now go click on my username and count the number of Addons that are coded for Bootstrap. Do you seriously think I'm going to drop everything and go test all of those Addons against every new change in Edge everytime you create one? Even looking at the changes to pick the ones most likely to cause problems would be a major job.

 

No, this is not happening. I will update any module that I need to use, or that someone has asked for, but only if I have the time to spare. I have about as much spare time as you do. Think about that.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

OK, point taken.  In my extremely simplistic thinking, it's all positive. 

 

+cuts down on questions from users

+cuts down on coders time spent answering those users

+cuts down on core code changes 

 

Only negative is as you say;  

-the time taken to do a few code changes here and there

 

In case you change your mind (or someone else wants to use it sáns modular-front-page);  

I can confirm the featured module uploaded into "index" group and with the deprecated code changed (or the compat module installed)...it works extremely well.

Link to comment
Share on other sites

Although this thread is not really the place to discuss this, personally I think all addons should be updated to work on the latest version. Now whether the addon creator does this or someone else, it does not matter. It should be made possible that addons are unlocked in the addon area so others can add to or improve the original code if the addon creator does not have the time, without the need to create a whole new addon which will cause confusion. This would be a benefit to the addon, oscommerce and future users.

 

Now that sounds really simple, but there has to be some form of quality control, and that should be done by the original creator. If the new uploaded code is good and only a minor update the code should stay, but if it changes the addon greatly it should be moved to a new area. If the addon cannot be added to by anyone other than the creator, the creator should be able to be contacted by people that update the code and then have the option to updating the addon. Again this can be done directly or through the support forum for the addon.

 

If an addon is not updated it is bad for the user and the addon. It causes confusion and also makes people ask question that are unnecessary in the forums.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Personally I think the only reason this is a question is because of the number of releases and various versions of osC that exist....if we had an up to date official release, the user base would be using relatively common code and coders would, by demand, end up updating their code to work with it.  The support on the forums here would be much simpler too. 

 

As Jim points out having coders revise or even keep up with changes between releases isn't likely to happen for the reasons he mentions. 

 

Dan 

Link to comment
Share on other sites

Personally I think the only reason this is a question is because of the number of releases and various versions of osC that exist....if we had an up to date official release, the user base would be using relatively common code and coders would, by demand, end up updating their code to work with it.  The support on the forums here would be much simpler too. 

 

As Jim points out having coders revise or even keep up with changes between releases isn't likely to happen for the reasons he mentions. 

 

Dan

Exactly, you need to have a fixed release to test against, you can not say something works with a moving target.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

  • 2 months later...

Hello,

i'm trying to use the code of Front Page Banner Rotator to show Banner Rotator in the header, it's seems to work except for the ALIGN

When i change in the admin "Align Banners" the banner show allways in left

this is the code.

Any help is appreciate

catalog\includes\modules\content\header\cm_header_carousel.php

<?php

/*
  $Id: cm_header_carousel.php, v1.0 20160521 TITO4$
	Based and adapted on a previous work of Kymation.
	All credits go to James C Keebaugh. Thanks Jim for your great work.
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2016 Agustín Devós

  Released under the GNU General Public License v2.0 or later
*/

  class cm_header_carousel {
    public $version = '2.0.1';
    public $code;
    public $group;
    public $title;
    public $description;
    public $sort_order;
    public $enabled = false;

    public function __construct() {
      $this->code = get_class($this);
      $this->group = basename(dirname(__FILE__));

      $this->title = MODULE_CONTENT_HEADER_CAROUSEL_TITLE;
      $this->description = MODULE_CONTENT_HEADER_CAROUSEL_DESCRIPTION;

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

    public function execute() {
      global $oscTemplate;
      
      $this->set_css();
      $this->set_javascript();

      $banners_data = $this->get_banner_data();
      if ( $banners_data !== false && count( $banners_data ) > 0 ) {
        
        ob_start();
        include('includes/modules/content/' . $this->group . '/templates/' . basename(__FILE__));
        $template = ob_get_clean();

        $oscTemplate->addContent($template, $this->group);
      }
    }

    public function isEnabled() {
      return $this->enabled;
    }

    public function check() {
      return defined('MODULE_CONTENT_HEADER_CAROUSEL_STATUS');
    }

    function enable() {
            tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = 'True' where configuration_key = 'MODULE_CONTENT_HEADER_CAROUSEL_STATUS'");
            $this->enabled = (MODULE_CONTENT_HEADER_CAROUSEL_STATUS == 'True');
    }

    function disable() {
            tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = 'False' where configuration_key = 'MODULE_CONTENT_HEADER_CAROUSEL_STATUS'");
            $this->enabled = (MODULE_CONTENT_HEADER_CAROUSEL_STATUS == 'False');
    }
	
    public function install() {
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Module Version', 'MODULE_CONTENT_HEADER_CAROUSEL_VERSION', '" . $this->version . "', 'The version of this module that you are running.', '6', '0', 'tep_cfg_disabled(', now() ) ");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Banner Rotator', 'MODULE_CONTENT_HEADER_CAROUSEL_STATUS', 'True', 'Do you want to show the banner rotator?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_CONTENT_HEADER_CAROUSEL_SORT_ORDER', '80', 'Sort order of display. Lowest is displayed first.', '6', '2', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_CONTENT_HEADER_CAROUSEL_CONTENT_WIDTH', '12', 'What width container should the content be shown in?', '6', '3', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Banner Order', 'MODULE_CONTENT_HEADER_CAROUSEL_BANNER_ORDER', 'Asc', 'Order that the Banner Rotator uses to show the banners.', '6', '4', 'tep_cfg_select_option(array(\'Asc\', \'Desc\'), ', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Banner Rotator Group', 'MODULE_CONTENT_HEADER_CAROUSEL_GROUP', 'rotator2', 'Name of the banner group that the Banner Rotator uses to show the banners.', '6', '5', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Banner Rotator Max Banners', 'MODULE_CONTENT_HEADER_CAROUSEL_MAX_DISPLAY', '4', 'Maximum number of banners that the Banner Rotator will show', '6', '6', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Align Banners', 'MODULE_CONTENT_HEADER_CAROUSEL_ALIGN', 'center', 'Align the banners to the left, center, or right?', '6', '7', 'tep_cfg_select_option(array(\'left\', \'center\', \'right\'), ', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Automatic Carousel', 'MODULE_CONTENT_HEADER_CAROUSEL_AUTOPLAY', 'true', 'Do you want the carousel to run automatically?', '6', '8', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Start Delay', 'MODULE_CONTENT_HEADER_CAROUSEL_START_DELAY', '0', 'Delay the start of the carousel (1000 = 1 second).', '6', '9', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Hold Time', 'MODULE_CONTENT_HEADER_CAROUSEL_HOLD_TIME', '4000', 'The time each banner is shown (1000 = 1 second).', '6', '10', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Transition Time', 'MODULE_CONTENT_HEADER_CAROUSEL_TRANSITION_TIME', '500', 'The time to transition between banners (1000 = 1 second).', '6', '11', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Easing', 'MODULE_CONTENT_HEADER_CAROUSEL_EASING', 'swing', 'How the carousel transitions between banners.', '6', '12', 'tep_cfg_pull_down_easing_list(', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Loop Around', 'MODULE_CONTENT_HEADER_CAROUSEL_LOOP', 'true', 'Do you want the carousel to start again after showing all of the banners?', '6', '13', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
      }

    public function remove() {
      tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
    }

    public function keys() {
      $keys = array();
      $keys[] = 'MODULE_CONTENT_HEADER_CAROUSEL_VERSION';
      $keys[] = 'MODULE_CONTENT_HEADER_CAROUSEL_STATUS';
      $keys[] = 'MODULE_CONTENT_HEADER_CAROUSEL_SORT_ORDER';
      $keys[] = 'MODULE_CONTENT_HEADER_CAROUSEL_CONTENT_WIDTH';
      $keys[] = 'MODULE_CONTENT_HEADER_CAROUSEL_BANNER_ORDER';
      $keys[] = 'MODULE_CONTENT_HEADER_CAROUSEL_GROUP';
      $keys[] = 'MODULE_CONTENT_HEADER_CAROUSEL_MAX_DISPLAY';
      $keys[] = 'MODULE_CONTENT_HEADER_CAROUSEL_ALIGN';
      $keys[] = 'MODULE_CONTENT_HEADER_CAROUSEL_AUTOPLAY';
      $keys[] = 'MODULE_CONTENT_HEADER_CAROUSEL_START_DELAY';
      $keys[] = 'MODULE_CONTENT_HEADER_CAROUSEL_HOLD_TIME';
      $keys[] = 'MODULE_CONTENT_HEADER_CAROUSEL_TRANSITION_TIME';
      $keys[] = 'MODULE_CONTENT_HEADER_CAROUSEL_EASING';
      $keys[] = 'MODULE_CONTENT_HEADER_CAROUSEL_LOOP';
      return $keys;
    }

    private function get_banner_data() {
      $banner_query_raw = "
        select
          banners_id,
          banners_url,
          banners_image,
          banners_html_text
        from
          " . TABLE_BANNERS . "
        where
          banners_group = '" . MODULE_CONTENT_HEADER_CAROUSEL_GROUP . "'
          and status = '1'
        order by 
          banners_id " . MODULE_CONTENT_HEADER_CAROUSEL_BANNER_ORDER . "
        limit
          " . MODULE_CONTENT_HEADER_CAROUSEL_MAX_DISPLAY;

      $banner_query = tep_db_query($banner_query_raw);

      if( tep_db_num_rows($banner_query) > 0 ) {
        $banners_data = array();
        while( $banners = tep_db_fetch_array($banner_query) ) {
          $banners_data[] = array(
            'banners_id' => $banners['banners_id'],
            'banners_url' => $banners['banners_url'],
            'banners_image' => $banners['banners_image'],
            'banners_html_text' => $banners['banners_html_text']
          );
        }
        return $banners_data;
      }
      return false;
    }
    
    private function set_css() {
      global $oscTemplate;
      
      // Set the CSS to load in the footer
      $add_css = '  <link rel="stylesheet" href="ext/jquery/slideshow/slideshow.css" />' . PHP_EOL;
      $add_css .= '  <style type="text/css">
        .slideshow {
          position: relative;
          width: 100%;
        }

        .slideshow .slide figure {
          position: relative;
          margin: 0;
        }

        .slideshow .slide figure img {
          width: 100%;
          vertical-align: top;
        }			

        .slideshow .slideTabs {
          text-align: center;
          position: absolute;
          bottom: 2%;
          width: 100%;
          z-index: 10;
        }

        .slideshow .slideTabs a {
          padding: 10px;				
          margin: 0 5px;	
          line-height: 2em;				
          background: url(images/slideshow/dot_white.png) no-repeat center center;
          opacity: 0.6;	
        }

        .slideshow .slideTabs a.selected {
          opacity: 1;		
        }	

        .slideshow .prev, 
        .slideshow .next {
          position: absolute;
          cursor: pointer;	
          padding: 10px 3px;
          background-color: rgba(0,0,0,0.1);
        }

        .slideshow .prev {
          left: 0;
        }
        
        .slideshow .next {
          right: 0;
			  }
	    </style>' . PHP_EOL;

      $oscTemplate->addBlock($add_css, 'footer_scripts');
    }
    
    private function set_javascript() {
      global $oscTemplate;
      
      // Set the JavaScript to load in the footer
      $add_scripts = '  <script src="ext/jquery/slideshow/jquery.easing.1.3.js"></script>' . PHP_EOL;
      $add_scripts .= '  <script src="ext/jquery/slideshow/jquery.imagesloaded.js"></script>' . PHP_EOL;
      $add_scripts .= '  <script src="ext/jquery/slideshow/slideshow.js"></script>' . PHP_EOL;
      $add_scripts .= '		<script type="text/javascript">
        $(document).ready(function() {
          var slideshow_tabs = new Slideshow({
            align: \'' . MODULE_CONTENT_HEADER_CAROUSEL_ALIGN . '\',
            id: \'rotator2\',
            autoplay: ' . MODULE_CONTENT_HEADER_CAROUSEL_AUTOPLAY . ',
            autoplay_start_delay: ' . MODULE_CONTENT_HEADER_CAROUSEL_START_DELAY . ',
            displayTime: ' . MODULE_CONTENT_HEADER_CAROUSEL_HOLD_TIME . ',
            transition_delay: ' . MODULE_CONTENT_HEADER_CAROUSEL_TRANSITION_TIME . ',
            easing: \'' . MODULE_CONTENT_HEADER_CAROUSEL_EASING . '\',
            loop: ' . MODULE_CONTENT_HEADER_CAROUSEL_LOOP . ',
            loader_image: \'images/slideshow/loader.gif\'
				  });    
			  });
		  </script>' . PHP_EOL;

      $oscTemplate->addBlock($add_scripts, 'footer_scripts');
    }

  }// End class
  
  
  ////////////////////////////////////////////////////////////////////////////
  //                                                                        //
  //  This is the end of the module class.                                  //
  //  Everything past this point is an independent function, not a method.  //
  //                                                                        //
  ////////////////////////////////////////////////////////////////////////////


  ////
  // Function to show a disabled entry (Value is shown but cannot be changed)
  if (!function_exists('tep_cfg_disabled')) {

    function tep_cfg_disabled($value) {
      return tep_draw_input_field('configuration_value', $value, ' disabled');
    }

  }


	////
	// Generate a pulldown menu of the available easing methods
	if (!function_exists('tep_cfg_pull_down_easing_list')) {
		function tep_cfg_pull_down_easing_list( $easing_type, $key = '' ) {
      $easing_array = array();
      $easing_array[] = array('id'=>'linear','text'=>'linear');
      $easing_array[] = array('id'=>'swing','text'=>'swing');
      $easing_array[] = array('id'=>'jswing','text'=>'jswing');
      $easing_array[] = array('id'=>'easeInQuad','text'=>'easeInQuad');
      $easing_array[] = array('id'=>'easeInCubic','text'=>'easeInCubic'); 
      $easing_array[] = array('id'=>'easeInQuart','text'=>'easeInQuart');
      $easing_array[] = array('id'=>'easeInQuint','text'=>'easeInQuint');
      $easing_array[] = array('id'=>'easeInSine','text'=>'easeInSine');
      $easing_array[] = array('id'=>'easeInExpo','text'=>'easeInExpo');
      $easing_array[] = array('id'=>'easeInCirc','text'=>'easeInCirc');
      $easing_array[] = array('id'=>'easeInElastic','text'=>'easeInElastic');
      $easing_array[] = array('id'=>'easeInBack','text'=>'easeInBack');
      $easing_array[] = array('id'=>'easeInBounce','text'=>'easeInBounce');
      $easing_array[] = array('id'=>'easeOutQuad','text'=>'easeOutQuad');
      $easing_array[] = array('id'=>'easeOutCubic','text'=>'easeOutCubic');
      $easing_array[] = array('id'=>'easeOutQuart','text'=>'easeOutQuart');
      $easing_array[] = array('id'=>'easeOutQuint','text'=>'easeOutQuint');
      $easing_array[] = array('id'=>'easeOutSine','text'=>'easeOutSine');
      $easing_array[] = array('id'=>'easeOutExpo','text'=>'easeOutExpo');
      $easing_array[] = array('id'=>'easeOutCirc','text'=>'easeOutCirc');
      $easing_array[] = array('id'=>'easeOutElastic','text'=>'easeOutElastic');
      $easing_array[] = array('id'=>'easeOutBack','text'=>'easeOutBack');
      $easing_array[] = array('id'=>'easeInOutQuad','text'=>'easeInOutQuad');
      $easing_array[] = array('id'=>'easeInOutCubic','text'=>'easeInOutCubic');
      $easing_array[] = array('id'=>'easeInOutQuart','text'=>'easeInOutQuart');
      $easing_array[] = array('id'=>'easeInOutQuint','text'=>'easeInOutQuint');
      $easing_array[] = array('id'=>'easeInOutSine','text'=>'easeInOutSine');
      $easing_array[] = array('id'=>'easeInOutCirc','text'=>'easeInOutCirc');
      $easing_array[] = array('id'=>'easeInOutCirc','text'=>'easeInOutCirc');
      $easing_array[] = array('id'=>'easeInOutElastic','text'=>'easeInOutElastic');
      $easing_array[] = array('id'=>'easeInOutBack','text'=>'easeInOutBack');
      $easing_array[] = array('id'=>'easeInOutBounce','text'=>'easeInOutBounce');

			return tep_draw_pull_down_menu( 'configuration_value', $easing_array, $easing_type );
		}
	}

Link to comment
Share on other sites

Isn't there already a banner module for the header? I thought someone built one,

 

In any case, the code you want to change will be in the template, provided that you need to change any of the code. You can probably do what you want just by adding some CSS to your user.css.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Hello Jim,

 

thanks for your replay, I try to install Banner Rotator in Header and/or Footer by tito4 http://addons.oscommerce.com/info/9500 (it'is an adaptation of your Banner Rotator Content Module (Bootstrap)), but as you can see in the 2 pictures the same code work perfectly in tne index (banner is in the center) but doesn't work correctly in Header or footer (Banner is only in the left)

Thanks for your time

 

Marco

 

bannerheaderr.pdfbannerfooter.pdf

 

 
Link to comment
Share on other sites

  • 3 months later...
On 2/24/2017 at 9:09 PM, kymation said:

@@inra311  Modular Front Page, and all of the addon modules for it, were written long before the Bootstrap code was modified to include modules on the index page. In fact the core code was written before the Bootstrap project even started. The Bootstrap project ignored the prior existing code and created an incompatible set of modules, so the much older Modular Front Page is not compatible with the current code. You can use either one, but you can use only one.

 

There is no added section in index.php -- the code from Modular Front Page replaces the existing code. The code that is replaced does not resemble the original code as it has been rewritten for the Bootstrap project. You will have to find the correct section of the code to replace and do that by hand. In the latest copy of Edge that I have, the code to be replaced looks like this:


<div class="page-header">
  <h1><?php echo HEADING_TITLE; ?></h1>
</div>

<?php
  if ($messageStack->size('product_action') > 0) {
    echo $messageStack->output('product_action');
  }
?>

<div class="row">
  <?php echo $oscTemplate->getContent('index'); ?>
</div>

Regards

Jim

Hi @kymation 

i hope you could help me, I’ve been trying to install the Modular Front Page (the latest version available for download) on 2.3.4 Responsive BS Edge but I’ve been having difficulties, I’ve replaced all the files in the relevant directories and have double checked this, I think my error is due to the index.php file. When I use the index.php file provided in the download, my store doesn’t load and I get an HTML 500 error, but reverting back to the old index file allows the store page to load but obviously  without the Modular Front Page (MFP) additions

From what I understand above, is the index.php file provided in the MFP add-on not converted to the bootstrap Edge version already? Does it still need to be re-written ?

I’ve tried using the original index.php file that I installed oscommerce with and then replacing the above code that you mentioned with the MFP’s index.php additional code (quoted below) but now the page loads but without the MFP changes/additions. The content in the centre only is blank.

Quote

// Start Modular Front Page
?>

<div class="row">

<?php
    echo $oscTemplate->getContent('front_page');
?>

</div>

<?php
// End Modular Front Page

Is this what you meant when you said the above code should be replaced , did you mean to replace it with this code? Also is there anything else that should be replaced/deleted as the installation document says that there are some lines to be added/deleted. 

If you could kindly assist me with this I’d greatly appreciate it. Please and Thank You !

 

PS: if anyone else out there has any helpful hints I’d really really appreciate it

Edited by mmotala10
Link to comment
Share on other sites

@mmotala10 You've got it pretty much right. The Edge version of osCommerce involved thousands of changes over more than a year. The version of Modular Front Page for Edge that I posted was valid when I posted it, but there have been many changes in Edge since that time, so it's no longer quite correct.

The code that you posted should work. Just replace that first block of code with the code from Modular Front Page that you quoted. Let me know if that doesn't work and I'll take another look.

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

18 hours ago, kymation said:

@mmotala10 You've got it pretty much right. The Edge version of osCommerce involved thousands of changes over more than a year. The version of Modular Front Page for Edge that I posted was valid when I posted it, but there have been many changes in Edge since that time, so it's no longer quite correct.

The code that you posted should work. Just replace that first block of code with the code from Modular Front Page that you quoted. Let me know if that doesn't work and I'll take another look.

Regards

Jim

Hi @kymation

 

I've tried the fix recommended but unfortunately, it doesn't seem to work. The page (index page) loads but the middle is blank, none of the front_page additions seem to show up at all.

Also, would that mean that most add-ons for Edge will experience similar issues with needing certain pages to be rewritten to accommodate it?  If that is the case, which version of OSCommerce with bootstrap would be ideal for a beginner to work on that will have the majority of add-ons patched for it already? 

Thanks again Jim, really appreciate it!

Link to comment
Share on other sites

Did you install any of the Front Page modules? Nothing is installed by default. If you have, check your PHP error log for errors on that page. 

Since Edge was under development for a long time, and Addons for it were developed at various times during that cycle, it's hard to say what Addons will work with what vintage of Edge. However, if you install the Compatibility Addon, most of them should work with the latest version. 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

On 8/10/2017 at 7:15 PM, kymation said:

Did you install any of the Front Page modules? Nothing is installed by default. If you have, check your PHP error log for errors on that page. 

Since Edge was under development for a long time, and Addons for it were developed at various times during that cycle, it's hard to say what Addons will work with what vintage of Edge. However, if you install the Compatibility Addon, most of them should work with the latest version. 

Regards

Jim

 

Hi @kymation

My apologies on the delayed post( I was experimenting a bit) and on the following, replacing the code you had mentioned with that of the new MFP code actually causes the page to break and display an HTML 500 error,  when I replaced the word  ‘index’ below with ‘front_page’ , that was when the middle of the page was presented with blank data, whilst all the modules were turned on, or off for that matter.

Quote

<div class="page-header">
  <h1><?php echo HEADING_TITLE; ?></h1>
</div>

<?php
  if ($messageStack->size('product_action') > 0) {
    echo $messageStack->output('product_action');
  }
?>

<div class="row">
  <?php echo $oscTemplate->getContent('index'); ?>
</div>

I’m assuming this would mean that the code for the MFP would need to be re-written completely ?

You mentioned that if I install the compatibility add-on then most add-ons should work with the latest OSC Edge version, would that also work for the MFP then? i.e. install the compatibility add-on and then re-install the MFP add-on ?

As always, much much appreciated Jim !

Kind Regards

 

Link to comment
Share on other sites

Most of the modules (if not all of them) in Modular Front Page will need the Compatibility Addon to function. MFP was written at a time when the Edge release had not yet made the changes that made most Addons incompatible.

The code that you absolutely need is this:

<div class="row">

<?php
    echo $oscTemplate->getContent('front_page');
?>

</div>

This needs to replace the code you posted above in index.php.

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

 

Hey @kymation

okay thanks a lot that makes sense, I’ve just installed the compatibility add-on now as well as made the requested changes that you said I should and voila ! We seem to have some good progress ! The main page loads (as it didn’t before this)  , but seems to be pretty blank.

I know that most of the modules need to have some data to display in order to have anything to show, example the main text and "the Upcoming Products will not show if there are no future products in the specified time frame. This is the default.” so I know I’ll have to go add some stuff for that in order to make it change/display other stuff, but I seem to have encountered a little possible bug with the ‘Customer greeting’ module as when I set it to activate my site has all of it’s data disappear from the screen, like in the below attachment, any possible explanations/fixes?  

customer greeting.png

Link to comment
Share on other sites

A blank page where there should be content usually means that you have an error in the code for that page. You need to look in your PHP error log for that error message to figure out where to look. If you can't figure it out, post the error message(s) here and I'll take a look. If you have more than a few errors, clear the log and load that page again to get just the relevant messages.

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...