Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.


raiwa

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

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

 

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

 

Link to comment
Share on other sites

  • 1 month later...
Link to comment
Share on other sites

  • 2 months later...
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.

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

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

Link to comment
Share on other sites

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

 

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

 

Link to comment
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
Link to comment
Share on other sites

1. try with my provided modified file

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

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

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

 

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

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

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.

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