Magento World

As a Magento parner, we are very honoured to offer you the best Magento Extensions, Magento Modules, Magento Themes and Magento Templates. You will get full support until you feel satisfied! View our Magento page to find what you need!

Thứ Bảy, 24 tháng 3, 2012

Simple Payment Module Extended: With Information

A couple of months back I wrote a basic payment module for capturing an order, which allows users to pay over the phone. This was all well and good, but perhaps some additional information needs to go along with this payment method? In my case I needed a BACS payment option, which comes with instructions (such as who to pay!). This module was easy to make because it’s is virtually identical to the check/money order method.

I’m going to miss out a lot of the instructions for creating this module and just pick out the key points, because large parts of it are the same as my last post about this. The files are all available to download here:

DOWNLOAD bacs-payment-module.zip (33KB)

Here are the module files required:

Block/Form/Bacs.phpBlock/Info/Bacs.phpetc/config.xmletc/system.xmlModel/Method/Bacs.php

Frontend files required:

payment/form/bacs.phtmlpayment/info/bacs.phtml

Admin files required:

Below is an overview of some of the important aspects of some of the files:

Creare_Bacs_Block 1 bacs/method_bacs pending BACS Payment Transfer

We need to add a new field to the form in the configuration which sets up this payment method. In this example I will call it ‘instructions’. This simply gets added to the existing fields in system.xml. I add it as a textarea.

textarea 2 1 1  1

This will result in an admin interface similar to the one below:

BACS Config

The model file has been moved into a ‘Method’ file to properly define it as an extension of the ‘Model_Method’ class.

class Creare_Bacs_Model_Method_Bacs extends Mage_Payment_Model_Method_Abstract{ protected $_code = 'bacs'; protected $_formBlockType = 'bacs/form_bacs'; protected $_infoBlockType = 'bacs/info_bacs'; protected $_isInitializeNeeded = true; protected $_canUseInternal = false; protected $_canUseForMultishipping = false; public function assignData($data) { $details = array(); if ($this->getInstructions()) { $details['instructions'] = $this->getInstructions(); } if (!empty($details)) { $this->getInfoInstance()->setAdditionalData(serialize($details)); } return $this; } public function getInstructions() { return $this->getConfigData('instructions'); }}

A getInstructions() function will be used to return the user-configured instructions to the Form and Info pages. The final result will mean that the instructions appear when a user select this payment method during checkout. The instructions will also be present on the order email as well as in the admin area.

BACS Payment

If you’d like to download the module and contribute any ideas/improvements, please let me know. Thanks for reading the Magento Blog at Ecommerce Web Design.

Adam Moss Author Page


View the original article here

Performing Admin Function outside Magento

For those of you who wish to use a script or otherwise to delete a product or perhaps perform another “admin only” function outside of the Magento installation you need to do the following, which will obviously boot up Magento for you to start using.

require_once('app/Mage.php'); //Path to Magentoumask(0);Mage:app();

To delete a product you would normally then perform the following:

$product = Mage::getModel('catalog/product')->load($id);$product->delete();

However you may notice that on some versions of Magento you will be slapped in the face with the following message:

Fatal error: Uncaught exception ‘Mage_Core_Exception’ with message ‘Cannot complete this operation from non-admin area.’

This means that some functions within the Magento arsenal can only be performed via the admin side of the site. To do this outside of Magento you will need to change:

// Mage:app();// ToMage::app("default")->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

This will boot up the admin side of you Magento store – and will allow you to delete your products! Thanks for visiting the Magento Blog here at E-commerce Web Design, home of the Magento Fox!

Robert Kent Author Page


View the original article here

Magento Extension: Optimised Contacts

One thing has always bothered me about a fresh Magento install, and that’s knowing that there’s a sorry-looking contacts page pre-installed with no meta data and no other company details. Just a form which is plain as arsecheeks.

I developed this simple extension with two objectives:

Allow users to set the Page Title and Meta Data of their contacts pageAllow users to display standard other company details on this page (phone number, Twitter, address etc…)

The extension is now available on Magento connect: http://www.magentocommerce.com/magento-connect/optimised-contacts-1068.html

Verssion 0.1.0 can also be downloaded here: Creare_Optimisedcontacts.zip

This module has been successfully tested on Magento 1.4 & 1.5It should work no problem on 1.6 too, but hasn’t been tested yet (let me know)

The module makes use of the company details that you have already set in your Magento configuration, and it adds a few more. You can now enter your Twitter name, Fax number and display email address. This is located in Configuration > General > Store Information

On the frontend it is displayed underneath the contact form. It wasn’t possible to put it above the contact form and under the

tag without overwriting the entire file, which I wanted to avoid.

The next feature is the ability to set page title, meta description and meta keywords values. Your contact us page should be treated as a very important page when it comes to SEO – Google often likes to add pagelinks to contact pages due to their popularity with web surfers.

This can all be set in Configuration > Contacts > Contact Page SEO

Couldn’t be much simpler really eh? This is only version 0.1.0, so there’ll be plenty of updates and improvements coming out in the future, and it will be available on Magento Connect very soon.

Thanks for reading the Magento Blog at Ecommerce Web Design – I look forward to any feedback.

Adam Moss Author Page


View the original article here

Our Extensions Page on Magento Connect

Look out for our extensions page on the Magento Commerce website! You can find us here:

http://www.magentocommerce.com/magento-connect/developer/EcommerceWD

We’ve got plenty planned but if you are after a specific extension do let us know!

Here’s a little taste of the kind of extensions we are thinking up:

Buy now Pay Later checkout extensionGet A Quote featureAuto-Email Order Summary

Just leave a comment if you wish for us to create an extension for you – odd’s are that it’ll be free if we believe it will benefit us and our customers too!

Thanks for visiting the Magento Blog here at E-commerce Web Design, home of the Magento Fox.

Robert Kent Author Page


View the original article here

Meet Magento UK Review

I’ll be honest and say that it’s been a long, long time since I’ve seen the hour of 4.30am. I’m sure most would agree that leaving Rugby train station for a 6am train to London is not the best way to start what’s going to be a very long and absorbing day. However that’s what myself, Rob and James had to do in order to attend the first ever annual Meet Magento conference in the UK. When your arrival photo of Big Ben is still in the dark, you know you’re there too early…

We arrived at the QE2 venue at around 8.30am following a great bacon and egg roll from a nearby cafe, which was much needed following 2 hours of travelling. Upon arriving on the 5th floor the room seemed quite empty and a number of the stalls were still being set up. Many familiar companies were present, the likes of Sage Pay, Aheadworks, Rackspace, Webshopapps and Sweet Tooth among them.

As we entered the room first, our seats could not have been much better (2nd row, middle) – this certainly helped my pretty poor eyesight! The first conference kicked off slightly behind schedule with Bob Schwartz and Roy Rubin providing a nice insight into the history of Magento and what’s happening right now with the company. The Enterprise Premium edition was announced by Roy during the second presentation (but no mention of cost), which promises to offer unprecedented levels of support and better licensing with multiple installations – released next month.

The next gentleman to take to the stage was John Lunn of X.Commerce, who presented very well the benefits and opportunities that X.Commerce is bringing. Standing confidently in jeans & T-Shirt he brought a welcome less-formal feel to proceedings which seemed to go down well. There’s a lot here to cover so I’ll be posting next week about my thoughts on X.Commerce.

Following a swift refreshments break the second round of presentations had begun, starting with the cross border customer panel. They weren’t the most captivating part of the event, but I enjoyed the creative slideshow used by the Mothercare/Radical team. Neil Hamilton’s presentation about the future of predictive ecommerce was very interesting, worthy in fact of a separate post. The audience breathed a sigh of relief at the end when he reassured us about potential cookie legal issues.

The Rackspace showing was completely focused on their cloud hosting offerings and went into a lot of detail. Perhaps some of the specialist ‘server-talk’ went over other people’s heads as it did mine? Nonetheless they got their point across nicely.

The lunch break was a great chance for us to speak to a number of the stands about their products and make a few connections. I was particularly impressed with Josh from Webshopapps, Jenny from Sage Pay and the folks at Campaign Commander. In fact we were so busy that we missed the start of the third round of presentations. As a side-note, the view from the conference centre was awesome! (see my pic below)

London

We joined half way through Sweet Tooth’s talk on how to reward your customers properly through loyalty schemes. I think these guys are the only ones doing something like this so it must’ve been a great plug for business.

After the final refreshment break we were treated to a very entertaining and informative talk from Roger Willcocks with his 50 tips for increasing sales. Many of the points were common sense and some where fairly straightforward SEO standards, but they were all valid and very well explained.

The next two presentations were decent, I found it difficult to concentrate on the high amount of data being thrown at me during the abandoned cart presentation. Serves me right for getting up at 4.30am.

With everyone’s thoughts drifting towards the aftershow party, the wrap-up by Bob and Roy was nicely delivered, though the question and answer session never really got going. There was quite an unsual video played from a musical Magento fan who decided to write a Magento-inspired cover of Bon Jovi’s Dead or Alive. To be fair it was pretty awesome.

We were treated to a surprising moment when Rob’s business card was selected to win a free Magento hoodie at the end of the day. If anyone deserves the title of ‘Mage_Wizz’ it’s Rob.

Meet Magento

So, to the aftershow party – possibly the most surreal part of the event. Expectations weren’t too high as we breezed past McDonalds and the Namco arcade on the Thames riverside, but we were blown away by the event once it got going. We had to leave early due to our railway commitments, but getting to meet Roy at the end was a great highlight to a fantastic day.

In summary, the event was great to be a part of and it has certainly reinforced my passion for Magento as a platform. As accommodating as Virgin trains were, I think next time a hotel is in order so I’m not zombified again the next day. Bring on Meet Magento 2012!

Adam Moss Author Page


View the original article here

Thứ Sáu, 23 tháng 3, 2012

Magento Fraud Prevention

The problem with fraud apart from it being absolutely dispicable is the fact that it’s happening right under people’s noses and they’re not doing the simple things needed to prevent it. It’s the ecommerce equivalent of having a stranger look after your wallet for 5 mins and not checking that the £50 still in there when you get it back.

A fraudulent transaction on your Magento store can instantly leave merchants tens of thousands of pounds out of pocket, which in some cases could leave them in dire straits. It’s something that should be protected against in every way possible. As well as extra vigilance when handling orders there are also some useful tools that you can install into your Magento site to help combat against fraud. Below are a few tips to watch out for…

The most common targets for fraud are your most expensive items. If your AOV is about £40, then you suddenly get a £4,000 order, get it fully checked out first! Another thing to watch out for is large quantities of the same product being ordered. If someone is trying to order 30 bluray home cinema players for delivery to China, alarm bells should be ringing.

This counts double if you don’t normally ship to other countries. If you’re a UK store and the order is carried out in Tokyo and to be delivered to Kansas – you’d be foolish not to find that suspicious.

If you’re contacted before an order is placed you’ll often find the email will be badly written and will mention their availability for payment, which is not something that customers traditionally come forward with.

If the customer has paid a £90 delivery charge for the next day delivery of a hot tub, it’s fair to question why someone would need it so quickly – unless the delivery address is Hugh Hefner’s mansion. Also if your courier finds that the customer is not home when they deliver the item, they usually leave a pickup slip. This is another common methods used by fraudsters because they can collect the goods away from the property in question.

Now that you’re going to be much more vigilant with your orders, why not go a bit further and use the following extensions and payment gateways to get yourself better protected.

What BlockThatProxy does is it monitors the customers checking out on your store. It requires a paid subscription, but you get a lot of tools for your money. Firstly it will email to warn you if someone is ordering from a proxy or a blacklisted IP address. You also have the option to add a separate order confirmation page for suspicious customers – this means that you can force them to confirm their order.

http://www.magentocommerce.com/magento-connect/Wickings/extension/4560/blockthatproxy

Logo

This extension is a simple one, using GeoIP it can block products from being sold in certain countries based on your very own Access Control List. This eliminates one of the biggest causes, as mentioned earlier – international fraud. Got a problem with fraudulent transactions in France? Unlike the England rugby team, you can block France’s access.

http://www.fmeextensions.com/extensions/catalog/geoip-country-lock-products.html

We all like scoring stuff – when I read videogame reviews I go straight to the rating and very rarely read the writeup. Not reading the fine details is probably why I end up with a bunch of games I never complete. Directshop Solutions have come up with an excellent extension which provides each order with a score out of 100. The higher the score, the more issues the order has with fraud and therefore the more your concern should be raised. It allows you to control the risk limits and even to block IP addresses.

You have to sign up for a Maxmind account to use this extension, but the extension itself is relatively cheap.

http://www.magentocommerce.com/magento-connect/Directshop/extension/1394/directshop_fraudscreening_featuring_maxmind

All respectable payment gateway providers will now be signed up with 3D secure, an extra level of security which can be enforced during checkout. Not only does it require a password from customers, but it matches the Postcode and CV2 number. An absolutely essential addition to your checkout.

Ebizmarts and Sage Pay have integrated it into their gateway to perfection.

Sagepay

It’s not as if we’re trying to prevent the events of Die Hard 4.0, it’s just a few common sense steps that will ensure that your store will never be a victim of fraud. If you follow all the advice listed above you’ll be fine. My personal recommendation is BlockThatProxy combined with 3D Secure – that along with being extra vigilant will be enough (Bruce Willis not required).

If you know of any further solutions to this issue, please let me know in the comments. Hope this has been helpful, thanks for reading the Magento Blog at E-commerce Website Design.

Adam Moss Author Page


View the original article here

Sorting Product List with Integer Attributes

‘Sorting Product List with Integer Attibutes’… bit of a mouthful ain’t it? There’s a bit of a limitation with Magento’s sort feature when it comes to custom attributes. It will normally sort our text strings alphabetically without a problem, but if your value is an integer Magento will still treat it as a string. This means that your numbers will be about as organised as my suitcase after a holiday:

10010002002200300400

Not ideal is it? I’m hoping that Magento will fix this by the next release – it only needs to be an extra attribute option which defines any values as an integer. It is something which could easily be mastered with an extension, but I personally think it’s more of a core requirement. The good news is that there’s a short term solution which works just as well. Simply use the attribute type of ‘Price’ when you’re creating your attribute.

Attribute Price

The next issue is that your echoed attributes will show in currency format: 100.00, but the PHP round function will format it nicely for frontend purposes.

$attribute = $_product->getResource()->getAttribute('attribute_name')->getFrontend()->getValue($_product);echo round($attribute);

Would be nice for Magento if gets this sorted for the next release, in the meantime this will do a job for you. Thanks for reading the Magento Blog at E-commerce Website Design.

Adam Moss Author Page


View the original article here