Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2011
    Posts
    121
    Plugin Contributions
    0

    Idea or Suggestion Creating a custom module

    I have written some code which allows orders to be sent to a certain shipping company ready for the labels to be printed off.

    I have currently added the code to the checkout_success page to get processed just before the confirmation emails are sent out.

    I would like to package this up into a module for others to use, however I don't feel comfortable asking users to open files and edit them. Is there another way to add a module which will get processed when an order is made?

    Thanks

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Creating a custom module

    If you have not edited the core files then you can use the ZenCat override system and package it in directory hierarchy using "your_template_name" for your overrides

    https://www.zen-cart.com/content.php...verride-system
    https://www.zen-cart.com/content.php...late-overrides
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Aug 2011
    Posts
    121
    Plugin Contributions
    0

    Default Re: Creating a custom module

    I did have to edit some files. But only because I wasn't too familiar with the overrides. I will look into this. Thanks.

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,154
    Plugin Contributions
    11

    Default Re: Creating a custom module

    Another helpful item can be found in the Plugins. https://www.zen-cart.com/downloads.php?do=file&id=1393

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

    Default Re: Creating a custom module

    Quote Originally Posted by joecooper View Post
    I would like to package this up into a module for others to use, however I don't feel comfortable asking users to open files and edit them.
    Thanks

    This is really not such a bad thing to do. Telling people "edit includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_success_default.php" and add <this code> under <this block of code>" is sometimes easier for people to process than providing a new template file which has to be merged with their template file.

    You might also investigate Zen Cart Notifiers, which allow code fragments to be called in various places with no modification of core or override files.
    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.

  6. #6
    Join Date
    Aug 2011
    Posts
    121
    Plugin Contributions
    0

    Default Re: Creating a custom module

    Many thanks. I will look into this.

  7. #7
    Join Date
    Aug 2011
    Posts
    121
    Plugin Contributions
    0

    Default Re: Creating a custom module

    I checked the file I edited, the code I have added is directly after "NOTIFY_CHECKOUT_PROCESS_AFTER_SEND_ORDER_EMAIL"

    I did read up about the notifiers, but unsure where this code should be placed.

    Thanks

    Joe

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

    Default Re: Creating a custom module

    Study the code for SMS on Sale. It uses this very notifier.

    https://www.zen-cart.com/downloads.php?do=file&id=291
    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.

 

 

Similar Threads

  1. Creating a custom template
    By davebeing in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 11 Oct 2011, 12:56 PM
  2. Creating custom template
    By kyllle in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 26 Oct 2010, 08:32 AM
  3. Creating a custom order total module.
    By bcyde in forum General Questions
    Replies: 5
    Last Post: 25 Aug 2007, 06:07 AM
  4. Creating Custom Templates
    By Mac 30 UK in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 30 May 2007, 10:20 AM
  5. Creating Custom Shipping Module
    By beasleybub in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 5 Nov 2006, 01:50 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