Jump to content

Recommended Posts

Hello @Omar_one,

I had a deeper look now and found that the navbar modules are not processed at all in osc_template.php class. They are processed and included in the navbar parent module. Therefore it does not make sense to include them in Modules Control.

I'll remove them and update. Anyway it's not common to switch off the navbar modules for selected pages and if needed it can be done in the modules themself.

Thanks for your help and patience.

Best regards
Rainer

Share this post


Link to post
Share on other sites

New Version uploaded:

Module Control 1.1.0

Changes:

- removed support for navbar modules. Thanks to @Omar_one for the error report
- fixed typo for filename "osc_template.php" in instructions. Thanks to @Omar_one for the report

 

Share this post


Link to post
Share on other sites

New Version uploaded:

Module Control 1.2.0

Changes:

- Added back and fixed support for navbar modules.
- Added modified navbar content module with modules control support
- Fixed undefined warnings in navbar if no navbar modules are active in a navbar group

 

Share this post


Link to post
Share on other sites

Module Control 1.2.0 tested with OSCOM CE Phoenix 1.0.1.1 under PHP 7.3 and works flawless.

Share this post


Link to post
Share on other sites

Just installed and works as I wanted for the most part. Got an issue with the nav bar though. It doesn't show any of the modules even though I have them turned on.

image.thumb.png.746850d2cbf97886ece351712a61b290.png

Share this post


Link to post
Share on other sites

Also is there any way to add depth as an option to the index.php file? This would allow for a front page with no boxes but as soon as you go to a category they show.

Share this post


Link to post
Share on other sites
17 hours ago, LeeFoster said:

Just installed and works as I wanted for the most part. Got an issue with the nav bar though. It doesn't show any of the modules even though I have them turned on.

image.thumb.png.746850d2cbf97886ece351712a61b290.png

I had a look on my test store and for me it's just opposite: the navbar modules always show even they are flagged to be switched off. If I remember well this has been reported and I forgot to remove them. Will do in the next update.

There must be another reason why they do not show in your store. May be you have the navbar content module removed or hidden.

17 hours ago, LeeFoster said:

Also is there any way to add depth as an option to the index.php file? This would allow for a front page with no boxes but as soon as you go to a category they show.

This is not supported. It only works based on filename. But you can always hide individual boxes based on depth coding it in each box module.

Share this post


Link to post
Share on other sites
1 hour ago, raiwa said:

There must be another reason why they do not show in your store. May be you have the navbar content module removed or hidden.

Nope not hidden, I followed the instructions.

1 hour ago, raiwa said:

This is not supported. It only works based on filename. But you can always hide individual boxes based on depth coding it in each box module.

Might have a look at a way to add that in.

Share this post


Link to post
Share on other sites
1 minute ago, LeeFoster said:

Nope not hidden, I followed the instructions.

Sorry, no idea on my test store navbar shows.

Share this post


Link to post
Share on other sites
21 minutes ago, raiwa said:

Sorry, no idea on my test store navbar shows.

It's strange that it shows the brand and not the others.

Share this post


Link to post
Share on other sites
26 minutes ago, raiwa said:

Sorry, no idea on my test store navbar shows.

Just put it on a clean install of Phoenix 1.0.2.5 and I get the same issue.

Edited by LeeFoster

Share this post


Link to post
Share on other sites

I'll see and have a deeper look when I find some time.

Share this post


Link to post
Share on other sites

This is not in the core and it can't be added by modules controle. Modules controle only interferes in the osc_template.php class. It doesn't add any code to the output.In my develop store it looks like this:

<a class="navbar-brand nb-brand" href="http://localhost/xxxxxxxxxxxxxxxxxx">phoenix_git_slim_checkout</a></div>
      
    <div class="collapse navbar-collapse" id="collapseCoreNav">
      <ul class="navbar-nav mr-auto">
<li class="nav-item nb-home">

 

Share this post


Link to post
Share on other sites
7 minutes ago, raiwa said:

This is not in the core and it can't be added by modules controle. Modules controle only interferes in the osc_template.php class. It doesn't add any code to the output.In my develop store it looks like this:


<a class="navbar-brand nb-brand" href="http://localhost/xxxxxxxxxxxxxxxxxx">phoenix_git_slim_checkout</a></div>
      
    <div class="collapse navbar-collapse" id="collapseCoreNav">
      <ul class="navbar-nav mr-auto">
<li class="nav-item nb-home">

 

What version of Phoenix are you working from?

The standard navbar code shows that.

Edited by LeeFoster

Share this post


Link to post
Share on other sites
16 minutes ago, LeeFoster said:

What version of Phoenix are you working from?

The standard navbar code shows that.

v1.0.2.0

now I updated to 1.0.2.5 and get the same:

a class="navbar-brand nb-brand" href="http://localhost/Phoenix_Git/Responsive-osCommerce/index.php">phoenix_git_slim_checkout</a></div>
      
    <div class="collapse navbar-collapse" id="collapseCoreNav">
      <ul class="navbar-nav mr-auto">
<li class="nav-item nb-home">

But thats not relevant, relevant is your php code outputted between html: core-nav> == $0

Investigate where it comes from. Did you use my modified osc_template.php or did you apply the modifications?

I just replaced the module controle files again with the files from the uploaded package. No change.

 

Share this post


Link to post
Share on other sites
5 minutes ago, raiwa said:

v1.0.2.0

now I updated to 1.0.2.5 and get the same:


a class="navbar-brand nb-brand" href="http://localhost/Phoenix_Git/Responsive-osCommerce/index.php">phoenix_git_slim_checkout</a></div>
      
    <div class="collapse navbar-collapse" id="collapseCoreNav">
      <ul class="navbar-nav mr-auto">
<li class="nav-item nb-home">

But thats not relevant, relevant is your php code outputted between html: core-nav> == $0

Investigate where it comes from. Did you use my modified osc_template.php or did you apply the modifications?

I just replaced the module controle files again with the files from the uploaded package. No change.

 

I applied the modifications.

The code in the updated navbar module is what is causing the difference.

Standard Nav - 

<nav class="navbar <?php echo $navbar_style; ?> cm-navbar">
  <div class="<?php echo BOOTSTRAP_CONTAINER; ?>">
    <?php
    if ($oscTemplate->hasBlocks('navbar_modules_home')) {
      echo '<div class="navbar-header">' . PHP_EOL;
      echo $oscTemplate->getBlocks('navbar_modules_home');
      echo '</div>' . PHP_EOL;
    }
    ?>      
    <div class="collapse navbar-collapse" id="collapseCoreNav">
      <?php
      if ($oscTemplate->hasBlocks('navbar_modules_left')) {
        echo '<ul class="navbar-nav mr-auto">' . PHP_EOL;
        echo $oscTemplate->getBlocks('navbar_modules_left');
        echo '</ul>' . PHP_EOL;
      }
      if ($oscTemplate->hasBlocks('navbar_modules_right')) {
        echo '<ul class="navbar-nav ml-auto">' . PHP_EOL;
        echo $oscTemplate->getBlocks('navbar_modules_right');
        echo '</ul>' . PHP_EOL;
      }    
      ?>
    </div>
  </div>
</nav>

Nav from Module Control - 

<nav class="navbar<?php echo $navbar_style . $navbar_corners . $navbar_margin . $navbar_fixed; ?> cm-navbar" role="navigation">
  <div class="<?php echo BOOTSTRAP_CONTAINER; ?>">
    <?php
    if ($oscTemplate->hasBlocks('navbar_modules_home')) {
      echo '<div class="navbar-header">' . PHP_EOL;
      echo $oscTemplate->getBlocks('navbar_modules_home');
      echo '</div>' . PHP_EOL;
    }
    ?>      
    <div class="collapse navbar-collapse" id="bs-navbar-collapse-core-nav">
      <?php
      if ($oscTemplate->hasBlocks('navbar_modules_left')) {
        echo '<ul class="nav navbar-nav">' . PHP_EOL;
        echo $oscTemplate->getBlocks('navbar_modules_left');
        echo '</ul>' . PHP_EOL;
      }
      if ($oscTemplate->hasBlocks('navbar_modules_right')) {
        echo '<ul class="nav navbar-nav navbar-right">' . PHP_EOL;
        echo $oscTemplate->getBlocks('navbar_modules_right');
        echo '</ul>' . PHP_EOL;
      }
      ?>
    </div>
  </div>
</nav>
<?php echo $navbar_css; ?>

 

Edited by LeeFoster

Share this post


Link to post
Share on other sites

1. try with my provided modified file

2. switch error reporting to "ALL" and post the errors you get displayed

Share this post


Link to post
Share on other sites
7 minutes ago, LeeFoster said:

I applied the modifications.

The code in the updated navbar module is what is causing the difference.

Standard Nav - 


<nav class="navbar <?php echo $navbar_style; ?> cm-navbar">
  <div class="<?php echo BOOTSTRAP_CONTAINER; ?>">
    <?php
    if ($oscTemplate->hasBlocks('navbar_modules_home')) {
      echo '<div class="navbar-header">' . PHP_EOL;
      echo $oscTemplate->getBlocks('navbar_modules_home');
      echo '</div>' . PHP_EOL;
    }
    ?>      
    <div class="collapse navbar-collapse" id="collapseCoreNav">
      <?php
      if ($oscTemplate->hasBlocks('navbar_modules_left')) {
        echo '<ul class="navbar-nav mr-auto">' . PHP_EOL;
        echo $oscTemplate->getBlocks('navbar_modules_left');
        echo '</ul>' . PHP_EOL;
      }
      if ($oscTemplate->hasBlocks('navbar_modules_right')) {
        echo '<ul class="navbar-nav ml-auto">' . PHP_EOL;
        echo $oscTemplate->getBlocks('navbar_modules_right');
        echo '</ul>' . PHP_EOL;
      }    
      ?>
    </div>
  </div>
</nav>

Nav from Module Control - 


<nav class="navbar<?php echo $navbar_style . $navbar_corners . $navbar_margin . $navbar_fixed; ?> cm-navbar" role="navigation">
  <div class="<?php echo BOOTSTRAP_CONTAINER; ?>">
    <?php
    if ($oscTemplate->hasBlocks('navbar_modules_home')) {
      echo '<div class="navbar-header">' . PHP_EOL;
      echo $oscTemplate->getBlocks('navbar_modules_home');
      echo '</div>' . PHP_EOL;
    }
    ?>      
    <div class="collapse navbar-collapse" id="bs-navbar-collapse-core-nav">
      <?php
      if ($oscTemplate->hasBlocks('navbar_modules_left')) {
        echo '<ul class="nav navbar-nav">' . PHP_EOL;
        echo $oscTemplate->getBlocks('navbar_modules_left');
        echo '</ul>' . PHP_EOL;
      }
      if ($oscTemplate->hasBlocks('navbar_modules_right')) {
        echo '<ul class="nav navbar-nav navbar-right">' . PHP_EOL;
        echo $oscTemplate->getBlocks('navbar_modules_right');
        echo '</ul>' . PHP_EOL;
      }
      ?>
    </div>
  </div>
</nav>
<?php echo $navbar_css; ?>

 

I do not understand anymore, there is nothing to update in the navbar. The only modified core file is osc_template.php class.

Quote

Install:
1. - copy all files from "New Files" folder to the corrspondant store directory.
2. - copy and replace "osc_template.php" from "Modified File" folder.
      if your osc_template.php is already modified, use a file comparing tool and apply all modifications manually.
      All changes are commented with "// BOF modules control", "// EOF modules control" or "// modules control".

Please revert all what you did or try on a new clean installation with my provided files.

Share this post


Link to post
Share on other sites
2 minutes ago, raiwa said:

I do not understand anymore, there is nothing to update in the navbar. The only modified core file is osc_template.php class.

I didn't update, the latest download (1.2.0) has an updated nav bar file and says in the instructions to uninstall the standard one and install the included one.

Edited by LeeFoster

Share this post


Link to post
Share on other sites
6 minutes ago, LeeFoster said:

I didn't update, the latest download (1.2.0) has an updated nav bar file and says in the instructions to uninstall the standard one and install the included one.

What does this have to do with modules controle?

Did you try what I told you to do here:

16 minutes ago, raiwa said:

1. try with my provided modified file

2. switch error reporting to "ALL" and post the errors you get displayed

 

Share this post


Link to post
Share on other sites

Hello Lee,

Yes, you are 100% right. My fault, my confusion.

I didn't remember that I added the modified navbar for module controle support and didn't read my own instructions 😆
The included navbar was for the old Frozen BS3 and produced the error you posted.

I updated now the included modified navbar and uploaded the new package:

Modules Control Phoenix

Please you taht one, the only difference is the navbar module.

Thanks to push my nose on this.
Rainer

Share this post


Link to post
Share on other sites
5 hours ago, raiwa said:

Hello Lee,

Yes, you are 100% right. My fault, my confusion.

I didn't remember that I added the modified navbar for module controle support and didn't read my own instructions 😆
The included navbar was for the old Frozen BS3 and produced the error you posted.

I updated now the included modified navbar and uploaded the new package:

Modules Control Phoenix

Please you taht one, the only difference is the navbar module.

Thanks to push my nose on this.
Rainer

I'll test this later, thanks

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

×