Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,708
    Plugin Contributions
    289

    Default Plugin Manager (in Zen Cart 1.5.7+)

    To learn more about the Plugin Manager (a new 1.5.7 feature), and how to create plugins that work with it, please see

    https://docs.zen-cart.com/dev/plugin...lated_plugins/

    Remember, in v1.5.7 it only supports Admin plugins, not Catalog.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

  2. #2
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,060
    Plugin Contributions
    14

    Default Re: Plugin Manager (Zen Cart 1.5.7+)

    What's the best way to set a file path within the zc_plugins directory pathways!

    This the old path,
    Code:
    $blockmail = DIR_FS_CATALOG . $emailfile;
    New path works but is hard coded,
    Code:
    $blockmail = DIR_FS_CATALOG . '/zc_plugins/BlockEmailManager/v1.2.0/catalog/' . $emailfile;
    The more I look at it, I think soft coding the version folder is all I need to fix...
    Dave
    Always forward thinking... MySite..

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,708
    Plugin Contributions
    289

    Default Re: Plugin Manager (Zen Cart 1.5.7+)

    What happens when you use the old path ?
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

  4. #4
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,060
    Plugin Contributions
    14

    Default Re: Plugin Manager (Zen Cart 1.5.7+)

    Quote Originally Posted by swguy View Post
    What happens when you use the old path ?
    The file was stored at the site root. If I place it there, all works. I was trying to use the catalog of the plugin manager,,, Thinking now of just having the installer move them to the root. The main idea was to have them accessible by bots same as the robot text file.
    Dave
    Always forward thinking... MySite..

  5. #5
    Join Date
    Jan 2004
    Posts
    66,314
    Blog Entries
    7
    Plugin Contributions
    81

    Default Re: Plugin Manager (Zen Cart 1.5.7+)

    Quote Originally Posted by davewest View Post
    The file was stored at the site root. If I place it there, all works. I was trying to use the catalog of the plugin manager,,, Thinking now of just having the installer move them to the root. The main idea was to have them accessible by bots same as the robot text file.
    At this point the catalog-side functionality isn't fully implemented. But your use-case certainly raises an important feature. While rare, there is definitely a need to support files whose purpose is intended to be an actual endpoint for site visitors to hit. It doesn't do that yet. So in the meantime you can put the file there manually by hand or by some script.
    If possible it may be beneficial to make it a .php file that acts as a handler (see other handlers in the webroot of zc core already, although I recommend much briefer, merely a proxy) to call the "actual" script located in the plugin's proper directory, which might be locatable using a global var/constant defined in the bootstrapping process (eg perhaps an extra_datafile for the plugin).
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,708
    Plugin Contributions
    289

    Default Re: Plugin Manager (Zen Cart 1.5.7+)

    Quote Originally Posted by DrByte View Post
    ... While rare, there is definitely a need to support files whose purpose is intended to be an actual endpoint for site visitors to hit. It doesn't do that yet.
    I have never known Ian to back down from a challenge! :)
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

  7. #7
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,881
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: Plugin Manager (Zen Cart 1.5.7+)

    Hi,

    As mentioned already, for v157 there is not that much support for plugins are used catalog side, that will come in v158.

    Note also that code within the zc_plugin directory is protected by an .htaccess file so, can never be run directly anyway.

    That said...

    You can get the path to a plugin using

    Code:
    $path = $pluginManager->getPluginVersionDirectory('myPluginKey', $installedPlugins)
    $pluginManager and $installedPlugins are available in the global scope, so if you want to use them in a function/class method you will need to bring them into scope.

    For v158 (and we have this working already) you will be able to have URI's like
    Code:
    https://mdomain.com/index.php?cmd=someplugincode
    which will resolve to code within the plugin directory

  8. #8
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,060
    Plugin Contributions
    14

    Default Re: Plugin Manager (Zen Cart 1.5.7+)

    Thanks, I figured there would be a easy way to format the path way into the folder. The files in question are simple text files storing spammer email addresses and domains. The text is created/maintained by the mod and placed at the site root for access by others seeking spam lists.
    Dave
    Always forward thinking... MySite..

  9. #9
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,708
    Plugin Contributions
    289

    Default Re: Plugin Manager (Zen Cart 1.5.7+)

    I was hoping we could override include. No such luck.

    https://www.php.net/manual/en/functi...e-function.php
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.

  10. #10
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,060
    Plugin Contributions
    14

    Default Re: Plugin Manager (Zen Cart 1.5.7+)

    Here's another bit... Will the catalog side be fully disabled when the admin side is! Or can we control some of it..

    Disabling the mod in admin plugin manager hides all the admin pages for the mod but leaves it all active on the catalog side!

    As an example, Testimonials manager has a submit page and of course testimonials.. Submit page is still active with no abilities to manage them on the admin side if its disabled. I added on this version a switch to disable the submit process. This also allows for testing admin for a disabled condition turning off the submit process. Leaving testimonials visible while disabling the submitting of new ones is what I was after.

    page header_php.php file;
    Code:
     $tm_plugin = $db->Execute("SELECT status FROM " . TABLE_PLUGIN_CONTROL . " WHERE unique_key = 'TestimonialManager'");
     $tmStatus = ($tm_plugin->fields['status'] == '2') ? 'off' : TM_DISPLAY_SUBMIT;
    Then $tmStatus is acted on if the switch is off or admin is disabled.
    Dave
    Always forward thinking... MySite..

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Zen-Cart Order Manager
    By Zapisto in forum All Other Contributions/Addons
    Replies: 32
    Last Post: 28 Jul 2010, 12:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR