Tag Archives: Magento

Unit Testing & Magento’s Autoloader

If code written for Magento is executed outside of Magento—as occurs when running unit tests—Magento’s normal startup process (which registers its autoload functionality) is not run. Without the autoloader in place, the first time PHP encounters a request to initialize … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Programmatically Setting a Magento Item’s Price When Adding It to Cart

Using code, how would we give a Magento item a one-time special price then add that item to the shopping cart? The process is simple: Create an instance of the Magento product, give it a custom price by calling setSpecialPrice, … Continue reading

Posted in Programming | Tagged , | 4 Comments

New Feature: Make the Store Address’s First Line Stand Out on Magento PDF Invoices

Want to make your store name stand out on your PDF invoice (example to the right)? By default, Magento’s PDF invoice displays your entire store address/information block using the same font/font size. Now, Ben Gribaudo’s Customizable PDF Invoice Module gives … Continue reading

Posted in Programming | Tagged , | Leave a comment

New Feature: Display Coupon Code on Magento PDF Invoice

This new feature replaces Magento’s PDF invoice’s default “Discount” line with “Coupon (code)” when a coupon has been used on the associated order.

Posted in Programming | Tagged , , | Leave a comment

Released: Customizable PDF Invoice Module for Magento

It’s released! Use Ben Gribaudo’s Customizable PDF Invoice Module to style your Magento PDF invoices. Choose the font/font size for each component on the invoice. Use one font for store info, another for item details, make the totals section larger…. … Continue reading

Posted in Programming | Tagged , | Leave a comment

New Module Feature: Customize Magento PDF Invoice Item Columns

New feature—the forthcoming PDF invoice customization module now allows item columns (item name, SKU, price each, tax, etc.) to be customized in three ways: Show/Hide: Selectively remove item columns from the invoice. Perhaps your products are sales tax exempt—use this … Continue reading

Posted in Programming | Tagged , | Leave a comment

Wiring Up a Custom Select Control Options List for the Magento Admin Interface

Yesterday, while building the admin interface for a Magento module, I wanted to populate a select control (a.k.a. combobox or drop-down list) with a custom list of options. Inserting the select control was simple. Building the custom options class also was easy. However, … Continue reading

Posted in Programming | Tagged , | 4 Comments

Magento PDF Invoice Customization

Over the past month or so, I’ve been building a Magento eCommerce module allowing PDF invoices to be customized in four areas: Page Size: By default, Magento PDF invoices are rendered as A4 pages. Most of us in the US … Continue reading

Posted in Programming | Tagged , | Leave a comment