Results 1 to 4 of 4
  1. #1

    Default Help with Encapsulated Plugins

    I am in the process of migrating some plug-ins to 2.1 and I'd like to move some of the simpler ones to zc_plugin as well as trying to learn.
    Using this guide: https://docs.zen-cart.com/dev/plugin...ins/converting
    as well as this section: https://docs.zen-cart.com/dev/plugin...lated_plugins/ and the directory structure section.

    My plug ins template override is in:
    ./zc_plugins/MyPlugin/2025.6.4/catalog/includes/templates/default/templates/tpl_account_default.php but for some reason it is not loading.

    I am using ZCA Bootstrap-4 as a template if that matters.

    Thanks!
    Last edited by Techiant; 5 Jun 2025 at 06:41 AM.
    Case Badges by Techiant

  2. #2

    Default Re: Help with Encapsulated Plugins

    Digging a little further, I can obviously override by putting my template files under the Bootstrap folder. The question is, how does the encapsulated plugin system override the custom folder templates?
    Case Badges by Techiant

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,413
    Plugin Contributions
    94

    Default Re: Help with Encapsulated Plugins

    An encapsulated plugin can provide the default template for any added page, but cannot (currently) override the template for any base Zen Cart page (e.g. account, in your example).

    Dealing with those base pages' additions by encapsulated plugins depend on the presence of notifications within those template modules (and there aren't man7!). You could use what I did with the How Did You Hear About Us (https://www.zen-cart.com/downloads.php?do=file&id=90) plugin, which provided a combination of a default template for its added page and the use of jQuery/javascript to inject any changes to built-in pages' templates.

  4. #4

    Default Re: Help with Encapsulated Plugins

    Quote Originally Posted by lat9 View Post
    An encapsulated plugin can provide the default template for any added page, but cannot (currently) override the template for any base Zen Cart page (e.g. account, in your example).

    Dealing with those base pages' additions by encapsulated plugins depend on the presence of notifications within those template modules (and there aren't man7!). You could use what I did with the How Did You Hear About Us (https://www.zen-cart.com/downloads.php?do=file&id=90) plugin, which provided a combination of a default template for its added page and the use of jQuery/javascript to inject any changes to built-in pages' templates.
    That's smart, thanks for the tip - will look into how I can make it work for my plugin.

    Does that mean that zc_plugins only works on the default template for template overrides? That's a serious drawback for the whole encapsulated plugin move. Would encapsulating the bootstrap template itself make this work, or will it still have to be overridden at the template level when using a non-default template?
    Case Badges by Techiant

 

 

Similar Threads

  1. v210 Encapsulated Plugins
    By Congerman in forum General Questions
    Replies: 5
    Last Post: 7 Apr 2025, 08:41 PM
  2. v158 Help regarding Encapsulated Plugins Mod for zc158
    By njcyx in forum General Questions
    Replies: 4
    Last Post: 18 Mar 2025, 05:16 PM
  3. Encapsulated Plugins - Payment modules
    By niccol in forum Code Collaboration
    Replies: 2
    Last Post: 2 Feb 2022, 09:47 PM
  4. v157 Encapsulated Plugins
    By niccol in forum Bug Reports
    Replies: 6
    Last Post: 22 Jul 2021, 05:53 PM
  5. v157 encapsulated plugins require question....
    By carlwhat in forum All Other Contributions/Addons
    Replies: 19
    Last Post: 13 Oct 2020, 12:22 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