Posted on

Magento Product Audit Extension – Monitor and Record Changes to your Products

I wrote up an article over on MageBase this weekend expanding on a tip I got from the Magento Developers Paradise. In the process of writing it, I went through a worked example and as usual with articles you want to make sure the code actually runs too, so I installed it on my local test Magento. Having done all of this, it occurred to me that the only missing part of what I had done to make it into a usable extension was an implementation of this function:

class Aschroder_ProductAudit_Model_Entity_Attribute_Backend_Audit extends Mage_Eav_Model_Entity_Attribute_Backend_Abstract {
 
    protected function _afterSave() {
		// This is where we would perform the audit (or any other logic we wanted)
		// We could email the changes to a store admin, for example
    }
}

So I went ahead an put a simple little implementation in the custom backend model. The result is Magento Product Audit, a trivial little extension that will let you know when your products change, and who changed them.
Continue reading Magento Product Audit Extension – Monitor and Record Changes to your Products

Posted on

Easily Set a Custom Order Number in Magento With My Free SetStartOrderNumber Extension

Every time I launch a new Magento store I have to go and hack the database to change the order, shipment, invoice and credit memo numbers. This just doesn’t seem right, and seeing as I was about to launch two stores (in one week!) I thought it’d be better to make the order increment ID’s custom from within the Magento admin panel. Now what I didn’t realize before I set about doing this was that someone had already made a very good extension to customize order numberswoops.

So not knowing I could just buy an extension for $60, I went ahead and coded one up on my train ride home Friday afternoon.

This is a blog post about what the extension does (and does not) do and how it’s made. I’m going to release it for free, if you need full order customizing functionality, you should still buy Adjustware’s one, it has some great features.

If you’re just here for the free software, you can get it on Magento Connect, if you’d like to learn more about it and how it’s made, please read on.
Continue reading Easily Set a Custom Order Number in Magento With My Free SetStartOrderNumber Extension

Posted on

Masking Password fields in Magento Extensions

Wow, long time, no post – no excuses really*, just been really busy. This post will give you a quick tip for masking password fields in your Magento extensions. I wanted to mask the password in my Google Apps and Gmail Magento Extension and despite a few Google searches, I couldn’t find a simple answer. There’s also not really any good documentation on the various configuration xml files in Magento, it seems.

Thankfully i960 over at the Magento forums gave me this simple tip, which I think should be shared. Here’s how to mask or hide your admin passwords in the backend of Magento. This is particularly useful when creating your own Magento extensions.

In etc/system.xml add xml like this:

 <password translate="label">
    <label>Password</label>
    <frontend_type>password</frontend_type>
    <sort_order>10</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>1</show_in_website>
    <show_in_store>0</show_in_store>
</password>

The key being the frontend_type of password in case you hadn’t noticed that.

Anyway expect me to be a bit more active with some Magento tips over the next few weeks.

*In a lot of ways you can blame Amazon for creating some of the worst financial reports I have ever had to work with! Parsing those to pull meaningful information has been like pulling teeth. Anyway I’ll add some feedback on those in an upcomming post.