Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Encapsulated Plugins - Payment modules

    So, this is just a clarification or best-practices question.

    Imagine a payment module that has all the normal stuff and then its own admin page. So, if the user uploads both the includes and the zc_plugins folders, they will immediately see the payment plugin appearing in the modules>>payment page of admin. They will have the opportunity to 'install' the module on that page.

    They will also have the option to install the plugin in the plugin manager. (In order to get the admin page to show etc.)

    In fact they have to do both.

    This seems confusing to me. Does anyone have thoughts about how best to manage it?

    (On a different note, it means that the developer gets to agonise about where is best to put db table creation. Should I put it in the module like the old days? Should I put it in the installer? Does it matter? Aaaaaa!)

    On a code suggestion it would be nice if there was a flag in admin/modules.php that disabled the module from showing unless it had been enabled in the plugin manager. So, it could be a method in the payment module class itself such as requires_plugin_activation() which defaults to false if that method does not exist and only is true if the developer makes it so. So, somewhere around ln206 of modules.php you check if you need to check that the module is installed. If it requires installation and is not installed then don't display it.


    Actually, the problem is sort of worse on uninstall. If I uninstall in plugins manager then I guess I would expect that the module was 'removed' in the modules page.

    As you can tell, I am a bit confused about best practice.

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,694
    Plugin Contributions
    123

    Default Re: Encapsulated Plugins - Payment modules

    It's a good question but I think the short term answer is that you don't want to do modules (payment, shipping or order total) this way, at least yet.
    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.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Encapsulated Plugins - Payment modules

    Quote Originally Posted by swguy View Post
    It's a good question but I think the short term answer is that you don't want to do modules (payment, shipping or order total) this way, at least yet.
    Thanks Scott.

    Yup, I came to that conclusion too. In particular, 'disable' in the plugin manager won't actually disable the payment module which could be bad.

    Maybe if and when encapsulation extends to store front, it will work better.

 

 

Similar Threads

  1. v157 Encapsulated Plugins
    By niccol in forum Bug Reports
    Replies: 6
    Last Post: 22 Jul 2021, 05:53 PM
  2. v157 encapsulated plugins require question....
    By carlwhat in forum All Other Contributions/Addons
    Replies: 19
    Last Post: 13 Oct 2020, 12:22 AM
  3. v155 Payment Modules Missing from Modules/Payment Modules When I Upgrade
    By greenftechn in forum Built-in Shipping and Payment Modules
    Replies: 12
    Last Post: 23 Dec 2018, 10:57 PM
  4. v155 linkpointapi.php, causing issues with payment configuration in Admin/Modules/Payment
    By wsworx in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 12 Jun 2018, 02:52 AM
  5. v155 Admin payment modules page not showing all modules
    By Kennith69 in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 23 Jul 2017, 02:59 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