Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.


raiwa

Recommended Posts

New add-on Modules Control

Extended and more complete version of Slim Checkout to control each individual content module for each store page.

Download:

https://github.com/raiwa/Module_Control/tree/master/New_Files/catalog/admin/includes/languages

What it does:
- add Module Control Page to Admin/Modules
- allows to define controlled pages
- allows to decide separate for each installed module and for each controlled page to be hidden.
- control for each store root page (file)
- control for each installed module of the following groups:
    - navbar
    - header
    - boxes
    - footer
    - footer_suffix
    
Install:
- copy all files from "New Files" folder
- copy and replace "osc_template.php" from "Modified File" folder.

Go to Admin/Modules/Modules Control

This is Beta version. Please try and test.

Any bug report and suggestion very welcome.

 

rgds

Rainer

Link to comment
Share on other sites

Yes that's intended. Or one or another. Slim checkout is not compatible with module control and viceversa. 

Link to comment
Share on other sites

3 minutes ago, raiwa said:

Yes that's intended. Or one or another. Slim checkout is not compatible with module control and viceversa. 

but if I uninstall  the Slim checkout module the modules names like  footer_scripts, navbar_modules_right, navbar_modules_home and header_tags  shown again in catalog side... so I just keep it installed 

Get the latest Responsive osCommerce CE (community edition) here .

Link to comment
Share on other sites

6 minutes ago, Omar_one said:

and one thing when I go admin /modules/  there is no /Modules Control   .. just type the www.mysite.com/admin/modules_control.php

Sorry forgot to add the module  box file. I will add it tomorrow 

Link to comment
Share on other sites

3 minutes ago, Omar_one said:

but if I uninstall  the Slim checkout module the modules names like  footer_scripts, navbar_modules_right, navbar_modules_home and header_tags  shown again in catalog side... so I just keep it installed 

Add in modules control configuration the pages, and then tick in modules control the module to hide

Link to comment
Share on other sites

Link to comment
Share on other sites

  • 1 year later...

@Omar_one, this add-on has not been updated for PHP 7.2. There will be probably more errors.

I also found some limitations regarding the quantity of controlled pages and modules due to wrong coding ($_GET versus $_POST).

Please be patient until I find some time to do a complete update and overhaul.

Link to comment
Share on other sites

  • 6 months later...

Hello @Omar_one,

I found some time to update the module. I tried, but could not reproduce this error:

On 11/8/2018 at 11:34 AM, Omar_one said:

under php7.2  I get warring


PHP Warning:  implode(): Invalid arguments passed in /home/shop/includes/classes/osc_template.php on line 87

 

Can you please explain the exact situation when you got it.

EDIT: I just compared and this line of code is identical to the unmodified core.

Best regards
Rainer

Edited by raiwa
Link to comment
Share on other sites

New Version 1.0.1 uploaded.

Modules Control

Change-Log Version 1.0.2:
- added missing language definitions for success messages
- changed button labels to be more comprehensive and logical
- changed $_GET to $_POST variable for virtually unlimited page/module combinations
- tested under PHP 7.2

 

Link to comment
Share on other sites

New Version 1.0.3 uploaded. 

Modules Control

Changes Version 1.0.3:
- added script to admin/modules_control.php to scroll back to top after update to show success message.

 

Link to comment
Share on other sites

On 5/27/2019 at 8:20 PM, raiwa said:

Hello @Omar_one,

I found some time to update the module. I tried, but could not reproduce this error:

Can you please explain the exact situation when you got it.

EDIT: I just compared and this line of code is identical to the unmodified core.

Best regards
Rainer

Thank you @raiwa .
I got this error when I when chose which module to be hidden  and then click update on the Module Control page and visiting the shop side,  but its working with the error...

BTW in the installation.txt

- copy and replace "osc_template.php" from "Modified File" folder.
  if your template_top.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".

  you mean osc_template.php not template_top.php when you typed  "if your template_top.php is already modified"

BR
Omar

Get the latest Responsive osCommerce CE (community edition) here .

Link to comment
Share on other sites

@Omar_one,

Thanks for the report, I’ll fix it in the next update.

I’ll give it another try to reproduce your error, but I’m pretty sure I did the same and didn’t see it.,

Link to comment
Share on other sites

@raiwa
Error Message :implode(): Invalid arguments passed  is type of error message occur when implode function do not get any array with string to implode.

I fixed and now there is no error anymore by adding an array
 change this (line 87)

 

  return implode("\n", $this->_blocks[$group]);

to this
 

  return implode("\n", (array)$this->_blocks[$group]);


BR
Omar

Get the latest Responsive osCommerce CE (community edition) here .

Link to comment
Share on other sites

thanks, but this error may also occur in core. This line of code is unmodified and identical in core. Anyway I’ll test and include it in the next update.

Is this stable? Shouldn’t there be a condition if empty or similar. Otherwise what happens if the group is not empty? Array on an array?

Could it be better to put this line in a condition  which checks if it’s an array.

Edited by raiwa
Link to comment
Share on other sites

41 minutes ago, raiwa said:

thanks, but this error may also occur in core. This line of code is unmodified and identical in core. Anyway I’ll test and include it in the next update.

it can be.. I remember that I have same kind issue with another add-on

41 minutes ago, raiwa said:

Could it be better to put this line in a condition  which checks if it’s an array.

you are right ..  it was just fast fix... I am not coder  :)

Edited by Omar_one

Get the latest Responsive osCommerce CE (community edition) here .

Link to comment
Share on other sites

@Omar_one,

I tried again and impossible to get the warning message.

I switched off all footer modules, echoed the following:

      if ( $group == 'footer_scripts' ) {
        echo '<br><br>$this->_blocks[$group])' . print_r($this->_blocks[$group]);
        die;
      }

And get displayed:

Array ( [0] => [1] => ) 

without error message.

My error settings are:

  error_reporting(E_ALL);
  ini_set('display_errors','1'); 

So I can only guess that you have some additional modifications or specific settings which produce it on your site.

Do you have added any group which is not core like a second navbar with it's group? Which group you have empty? On which page the error shows up?

Link to comment
Share on other sites

Link to comment
Share on other sites

26 minutes ago, Omar_one said:

@raiwa it show on the error_log file but it now shown on any page .. and its new installation without any add-on,

sorry it not show on any page just on error_log file

Get the latest Responsive osCommerce CE (community edition) here .

Link to comment
Share on other sites

Hello @Omar_one,

I got it finally to show the error. It only is produced for the navbar modules. If one of the navbar groups is empty the error shows together with another notice error. I tested before with all module groups except the navbar, thats why I couldn't reproduce it until now 😉. Your fix only solves the warning error you posted, but not the notice error.

Anyway I found by the way that the module controle doesn't work with navbar modules. Even they are ticked to be hidden, they still show up. It seems to be related to the fact that navbar modules are a subgroup of the navbar content module.

I believe this bug is the underlaying reason for the error messages. Once the navbar modules will work properly, the errors should also disappear.

I'll dive back into the code to find a fix when I find some time. For now, just leave the navbar modules unticked. (I believe the error shows only if one navbar group is empty which should not be the case in a real store).

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