cubecart / v6

CubeCart Version 6
https://cubecart.com
72 stars 59 forks source link

Hook Request: Invoice Editor #3511

Closed bhsmither closed 5 months ago

bhsmither commented 5 months ago

Requesting a hook, and associated skin template code.

In documents.invoice.inc.php:

Find at line 16:
Admin::getInstance()->permissions('documents', CC_PERM_EDIT, true);

After that, add:
$invoice_types = array(); // to be developed later

## Add hook
foreach ($GLOBALS['hooks']->load('admin.documents.invoice.macros') as $hook) {
    include $hook;
}

Creating and displaying an array of macros usable in the Sales Invoice Editor might be for a later time.

In documents.invoice.php:

Near line 17, find:
  <div class="form_control">

ABOVE that, add:
  {include file='templates/element.hook_form_content.php'}
abrookbanks commented 5 months ago

Handy! Thanks.