Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are some mistakes which I have found literally. Please correct those mistakes:-</p> <p>All the file structures, which you have mentioned in the question within the "<code>local</code>" code pool, have a missing folder name "<code>code</code>" inside the "<code>app</code>" folder. So every file structure of your local module must be like: <strong>"<code>app/code/local/[namespace]/Sales/...</code>"</strong>.</p> <p>If this folder structure is wrong, then also your <strong><code>[namespace]_Sales</code></strong> module may not work as expected.</p> <p>Secondly, The contents of the file "<code>config.xml</code>" is a bit wrong. The correct one will be:-</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;config&gt; &lt;modules&gt; &lt;[namespace]_Sales&gt; &lt;version&gt;0.1.0&lt;/version&gt; &lt;/[namespace]_Sales&gt; &lt;/modules&gt; &lt;global&gt; &lt;helpers&gt; &lt;!-- This node will be the unique identifier of your module, and it will be used every time your code requires referencing your own module. This shouldn't clash with other unique identifiers used in your Magento system. Normally all the characters are kept in small case for this, however, I haven't tried with the upper case. But it will be best to keep your unique identifier in small case only. --&gt; &lt;[namespace]sales&gt; &lt;class&gt;[namespace]_Sales_Helper&lt;/class&gt; &lt;/[namespace]sales&gt; &lt;/helpers&gt; &lt;models&gt; &lt;!-- If this is not provided, then Magento will not know your module's starting part of Model Class Names. --&gt; &lt;[namespace]sales&gt; &lt;class&gt;[namespace]_Sales_Model&lt;/class&gt; &lt;/[namespace]sales&gt; &lt;sales&gt; &lt;rewrite&gt; &lt;order_pdf_invoice&gt;[namespace]_Sales_Model_Order_Pdf_Invoice&lt;/order_pdf_invoice&gt; &lt;/rewrite&gt; &lt;/sales&gt; &lt;/models&gt; &lt;/global&gt; &lt;/config&gt; </code></pre> <p>Also I don't think you will require adding different classes here (which you have done in "<code>[namespace]_Sales_Model_Order_Pdf_Invoice</code>" class PHP page). This is because Magento loads all the definitions of related libraries automatically (some examples of library classes are of "<code>Varien</code>" and "<code>Zend</code>"). You will just need to make an object of those library classes and you will be able to use the methods fully.</p> <p>Hope it helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload