Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ecomteck committed Aug 4, 2019
1 parent d3af9e4 commit 3ebaccc
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Controller/Adminhtml/Templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct(
public function initPage($resultPage)
{
$resultPage->setActiveMenu('Ecomteck_Pdfgenerator::template_list')
->addBreadcrumb(__('ecomteck PDF Generator Templates'), __('ecomteck PDF Generator Templates'));
->addBreadcrumb(__('Ecomteck PDF Generator Templates'), __('Ecomteck PDF Generator Templates'));

return $resultPage;
}
Expand Down
2 changes: 1 addition & 1 deletion Controller/Adminhtml/Templates/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function execute()
{
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
$resultPage = $this->resultPageFactory->create();
$this->initPage($resultPage)->getConfig()->getTitle()->prepend(__('ecomteck PDF Generator Templates'));
$this->initPage($resultPage)->getConfig()->getTitle()->prepend(__('Ecomteck PDF Generator Templates'));
return $resultPage;
}
}
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,23 @@ php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean
```

## 4. TO DO

### Short Term
- Fix bugs variables on backend
- Style sample PDF Template
- Support frontend generate PDF invoice file

### Long Term
- Support Ecomteck Order Comment Data
- Support Ecomteck Custom Order Attribute Data
- PRINT IN MASS - Both store admins and customers are able to print all documents by one single click.
- Setup paper sizes in configuration easily, support Letter, A4, A5, etc.
- Create 12 premade templates to be used with the highest applicability (on commerce version).
- Using barcode / QR code for Order, Invoice, Shipment number. (on commerce version)
- Add more variables for PDF Template (on commerce version)
- Barcode (EAN13, UPC etc) for product items. (on commerce version)

## Conclusion

The extension will allow you to harness all the power of the email template system and more. You can add phtml files to your template for very advanced configurations ({Error in template processing} and {Error in template processing}). You can add your own item processing layout so you can output taxes item prices as you want ({{layout area="frontend" handle="sales_email_order_invoice_items" invoice=$invoice order=$order}}).
Expand Down
4 changes: 2 additions & 2 deletions Setup/InstallData.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
'template_css' => '
@font-face { font-family: Arial;}.clearfix:after { content: ""; display: table; clear: both;}a { color: #000; text-decoration: none;}table { width: 100%; border-collapse: collapse; border-spacing: 0; margin-bottom: 20px;}table th, table td{ background: #EEEEEE; text-align: center; border-bottom: 1px solid #FFFFFF;}table thead th{font-weight: normal;text-transform: uppercase;padding-top: 5px;padding-bottom: 5px;}table thead th.item-info, table thead th.item-subtotal { border: none; background: #ff8b00; color: #fff;}table thead th.item-info{text-align: left;padding-left: 10px;}table thead th.item-qty{padding-left: 10px;padding-right: 10px;}table thead th.item-subtotal{text-align: right;padding-right: 10px;}table tfoot {background: #FFFFFF;text-align: right;}table tfoot td, table tfoot th { padding: 10px 20px; background: #FFFFFF; border-bottom: none; font-size: 1em; white-space: nowrap; border-top: 1px solid #AAAAAA; text-align: right; text-transform: uppercase; font-weight: normal;}table tbody tr td:nth-child(1) { text-align: left; background: #ff8b00; color: #000; padding-left: 10px; border-top: 1px solid #AAAAAA; padding-top: 5px; padding-bottom: 5px;}table tbody tr td:nth-child(3) { text-align: right; background: #ff8b00; color: #fff; padding-right: 10px; border-top: 1px solid #AAAAAA; padding-top: 5px; padding-bottom: 5px;}
',
'template_file_name' => 'invoice {{var ea_invoice_id}} {{var ea_invoice_date}} {{var ea_invoice_status}} ',
'template_file_name' => 'invoice {{var ec_invoice_id}} {{var ec_invoice_date}} {{var ec_invoice_status}} ',
// @codingStandardsIgnoreEnd
'template_paper_form' => TemplatePaperForm::TEMAPLATE_PAPER_FORM_A4,
'template_custom_form' => 0,
Expand Down Expand Up @@ -172,7 +172,7 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
,
'template_css' => '
@font-face { font-family: Arial;}.clearfix:after { content: ""; display: table; clear: both;}a { color: #000; text-decoration: none;}table { width: 100%; border-collapse: collapse; border-spacing: 0; margin-bottom: 20px;}table th, table td{ background: #EEEEEE; text-align: center; border-bottom: 1px solid #FFFFFF;}table thead th{font-weight: normal;text-transform: uppercase;padding-top: 5px;padding-bottom: 5px;}table thead th.item-info, table thead th.item-subtotal { border: none; background: #ff8b00; color: #fff;}table thead th.item-info{text-align: left;padding-left: 10px;}table thead th.item-subtotal{text-align: right;padding-right: 10px;}table tfoot {background: #FFFFFF;text-align: right;}table tfoot td, table tfoot th { padding: 10px 20px; background: #FFFFFF; border-bottom: none; font-size: 1em; white-space: nowrap; border-top: 1px solid #AAAAAA; text-align: right; text-transform: uppercase; font-weight: normal;}table tbody tr td:nth-child(1) { text-align: left; background: #ff8b00; color: #000; padding-left: 10px; border-top: 1px solid #AAAAAA; padding-top: 5px; padding-bottom: 5px;}table tbody tr td:nth-child(3) { text-align: right; background: #ff8b00; color: #fff; padding-right: 10px; border-top: 1px solid #AAAAAA; padding-top: 5px; padding-bottom: 5px;}',
'template_file_name' => 'invoice {{var ea_invoice_id}} {{var ea_invoice_date}} {{var ea_invoice_status}} ',
'template_file_name' => 'invoice {{var ec_invoice_id}} {{var ec_invoice_date}} {{var ec_invoice_status}} ',
// @codingStandardsIgnoreEnd
'template_paper_form' => 2,
'template_custom_form' => 0,
Expand Down
5 changes: 1 addition & 4 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<tab id="ecomteck_extensions" translate="label" sortOrder="1">
<label>ecomteck Settings</label>
</tab>
<section id="ecomteck_pdfgenerator" translate="label" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Invoice PDF Generator</label>
<tab>ecomteck_extensions</tab>
<tab>ecomteck</tab>
<resource>Ecomteck_Pdfgenerator::config_system</resource>
<group id="general" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
<label>General</label>
Expand Down

0 comments on commit 3ebaccc

Please sign in to comment.