Day: March 4, 2010

  • If you missed anything after customising all email templates in Magento

    To double check if you missed anything after customising all email templates in Magento, you can do a File Search on Selected resources (app/locale/(locale_code)/template/email in eclipse with these keywords:

    • (555) 555-0123
    • magento
    • demo

    By the way, eclipse can do Replace on Selected resources, which is an equivalent tool of File & Replace in Folder using Notepad++. I am sure a single linux command can also do the job but I can’t remember the syntax. Let’s just use eclipse, straight forward.

  • Add a section in Magento system configuration

    Want to add a section in Magento system configuration? It seems very easy as mentioned by others. No coding but editing xml files. Magento takes care of the rest. However, it still took me two hours to find the way out. So I think I need tell the world the caveats.

    • A section will not be shown if it is empty (no fields inside). Ditto tab or group.
    • acl must be defined per section in config.xml, otherwise you get Access Denied message.
    • Re-login is required, otherwise you still get Access Denied message.
  • Wysiwyg on individual page basis

    Html wysiwyg editing is good, but the html wysiwyg editors do not always format text as I wish. Sometimes they transforms some characters which I want to keep them intact.

    For example, I wanted to rewrite some of my posts on this blog by hand coding the post. But I must turn off wysiwyg editing in WordPress globally before I can save my post. Another “but” is I do not want to turn it off globally because it is a handy tool for writing some other posts. So I want wysiwyg on and off on individual page basis.

    For another example, Magento 1.4 now has wysiwyg editor built-in. However, it can’t recognise Magento’s mark-up tags for CMS block or CMS page. It wasted me an hour’s work by stripping these tags in a second after I clicked “Save”.

    In short, for people like me enjoying hand coding, I think a wysiwyg on-off attribute for each page basis would give me the best of both worlds.

  • Magento order fulfilment templates

    I said Magento was week at backend, that might be wrong. Of course compared with any accounting or ERP software, Magento is lack of some facilities to control the work flow of order fulfilment. When I dive into Magento backend, I think it should be sufficient for most of business. Most of business do not need an extension to fulfil orders, only need to customise the templates involved.

    Supprisingly, the templates are separated. I mean, Magento does not offer an overall template to generate different but related documents. For example, I must go through all the areas in the following table to change what to show up as order items detail.

      Frontend Backend
      Screen Print Email Screen Pdf
    Order thead          
    tbody          
    tfoot          
    totals          
    Invoice thead          
    tbody          
    tfoot          
    totals          
    Credit Memo thead          
    tbody          
    tfoot          
    totals          
    Shipment thead          
    tbody          
    tfoot          
    totals          

    Separating those templates make the programming less hassle, and the template changer can understand them easily. However, if I am that template changer, I hate copy & paste. As a programmer, I do my best to avoid delivering a program which require people to copy & paste.

    More importantly, if a template changer forgets to go through the above checklist to make a simple change in the order items detail, admin and customer get different view of the same order on screen, in email, or print-out when ordered, invoiced, credited, or shipped. I do not think this approach is acceptable. It is on my agenda to write an extension to make these documents under control.