Magento Themes and Magento Extensions

Add gift message to Magento’s PDF packingslip

Share
Posted on July 12th, 2011 | Posted by admin

To be honest, I have never been working with gift messages in Magento, so I got very surprised once I saw that there is no output for it in any
document that customer recieves. This time I got request from client to write gift message on PDF packingslip.
Actually this is somewhat easy and goes like this…

1) Rewrite this class: Mage_Sales_Model_Order_Pdf_Shipment
Put this in your config.xml

1
2
3
4
5
6
7
8
9
10
11
12
13
<config>
<global>
<models>
<sales>
<rewrite>
<order_pdf_shipment>
Yourfirm_Yourmodulename_Model_Order_Pdf_Shipment
</order_pdf_shipment>
</rewrite>
</sales>
</models>
</global>
</config>

Zend framework coding style standard

Share
Posted on July 12th, 2011 | Posted by admin

Hello again! Today I’ll discuss some of the basic coding rules if your’re using Zend framework (or even Magento, which is written over Zend framework). Some might think that this is an redundant topic, but I strongly disagree – if you work in a team.

Latin introduction

Well, the story about style standards is quite like goes pretty much like old Latin saying “De gustibus non est disputandum” which means “There is no disputing about tastes”. But same things apply to it as well, if you have a big corporate meeting, you won’t go dressed in diving suit, but in a regular one. If you take an parallel look at the coding styles, its pretty much the same. If you’re going to work with a team on new Zend project, some things must be applied. Otherwise you’ll end up in quite a mess.

USPS fix for Magento CE 1.4.x

Share
Posted on July 12th, 2011 | Posted by admin

If you are a Magento store owner or Magento developer, you probably already noticed that USPS shipping method instantly stopped working few days ago. There was no clear announcement or whatsoever to prepare us for this outcome.

Reason

The reason for this sudden malfunction is that USPS updated (probably) their API in a manner not compatible to the previous version and all relying applications, as Magento, had to be updated also.

Magento Commerce took care of this for Magento CE 1.4.2 for which patch has been created along with instructions to guide you through the patching process.

The problem is that there is a number of stores still on Magento CE 1.4.x for which, by my recent experience, the patch doesn’t work and crashes the store.

Solution

Here’s a quick fix I made just for these situations. It could be done better, but it’l serve the purpose and allow you’re store (or your client’s) to function properly. All you have to do is unpack contents of the zip file to Magento store root folder and that’s it :)

Source: http://inchoo.net/ecommerce/magento/usps-fix-for-magento-ce-1-4-x/

Adding extra security to the Magento’s admin “Forgot your password?”

Share
Posted on July 12th, 2011 | Posted by admin

For those of you interested in adding a little extra security to your Magento’s admin “Forgot your password?” feature, you might find this module useful. The thing about current Magento (1.4.2.0) “Forgot your password?” feature is that it immediately resets your password and sends it to you in an email. Unlike many other systems, Magento won’t send you a “Password change confirmation” email first with some randomly generated key/url which you need to visit in order to actually change your password. It will reset you password immediately.

Although useful this can soon turn into stressful behaviour if you got someone trying to mess with you. Where that someone, just by knowing your email can initiate password reset each time he wishes just by visiting http://magento-demo.ajzele.net/index.php/admin/index/forgotpassword/ url and writing down your email address.

To pass by this, I wrote a little Magento extension that sends you a sort of “Forgotten password confirmation email” before changing the password.

“Remember Me” checkbox extension in Magento

Share
Posted on July 11th, 2011 | Posted by admin

Hello everyone! I’ve created a small and simple module that creates “Remember Me” functionality to any Magento website. Its currently in testing phase, so I’d say it’s an alpha release.

Never mind the alpha release (v 0.1.0), if someone is willing to try it and trace possible bugs, I’ll do my best to fix them. :D

Module doesn’t have any admin functionality. Though it can be disabled through admin at any time. There’s a small change on customer/form/login.phtml file (added checkbox with input name set), and besides that, only thing is that this module will save hashed and salted Magento customer’s password hash in a cookie, so it is safe as it can be (if I’m wrong, I’m opened for suggestions).

There’s nothing else to say besides it’s placed on login form for Magento customers. It looks like this: