Archive for 'Cart & Checkout'

PCI DSS Compliant Payment Gateways Available Through Magento Connect

Having a PCI DSS compliant payment gateway is essential for most businesses, especially for enterprise solutions. Even some of the better known gateways are not PCI compliant, the most notable example in the UK is RBS WorldPay, who were recently dropped from Visa’s list of compliant payment providers.

What follows is a list of gateways that use a PCI compliant service provider based upon the VISA list and gateways available through Magento Connect. I do not endorse or guarantee the functionality of any of these modules, although I have had positive experiences with the SagePay integration.

  • SagePay, formerly Protx
  • ChronoPay
  • CyberSource
  • FastTransact
  • PaySimple
  • ACH Payment (Commercial: $175)
  • Amazon FPS (Commercial: $275)
  • BeanStream (2 Available, Commercial: $175 and $299)
  • eProcessing Network (Commercial: $175)
  • FirstData, formerly LinkPoint (Commercial: $175)
  • Optimal Payments (Commercial: $75)
  • PayJunction (Commercial: $175)
  • PSIGate (Commercial: $175)
  • Plug & Pay (Commercial: $175)
  • TransFirst (Commercial: $125)
  • TrustCommerce (Commercial: $175)
  • USA ePay (Commercial: $175)
  • YourPay.com (Commercial: $175)

If I’ve missed anything, please let me know, will try and keep this list updated! :)

Adding Multiple Products To The Cart Simultaneously

In a previous post I looked at creating a product on the fly and adding it to the cart automatically. However, if you are using Magento without the catalog then when you transfer customers from your catalog to the cart and checkout you may need to create and add multiple products to the cart.

Creating multiple products is fairly straightforward if you use my methodology for creating a single product from the previous post. To add multiple products to the cart, create the products and add the product objects to an array, here I have named it $products.

To then add all of these products to the cart simultaneously use the following code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require_once ('app/Mage.php');
Mage::app();
$session = Mage:getModel('core/session', array('name' => 'frontend');
 
// create products here and add the objects to the array $products
$ids = array();
 
foreach ($products as $product)
{
 
     $ids[] = $product->getID();
 
}
 
$cart = Mage::getModel('checkout/cart');
$cart->addProductsByIDs($ids);
$cart->save();
 
// change to relevant URL for your store!
header("location: http://localhost/magento/checkout/cart/");

Tracking One Page Checkout Abandonment with Google Analytics, Properly!

Abandonment rates are key in eCommerce but the Magento integration with Google Analytics isn’t ideal, in that there is no funnel that tracks the progress (and therefore the actual point of abandonment) in the onepage checkout process. To remedy this, edit the one page checkout javascript file, located here: /skin/frontend/default/_your_theme_name/js/

As indicated below the edit starts at line 88 (v1.2), replace the whole of the gotoSection function.

88
89
90
91
92
93
94
95
96
97
gotoSection: function(section)
    {
        try {
            pageTracker._trackPageview('/checkout/' + section + '/');
        } catch(err) {}
 
        section = $('opc-'+section);
        section.addClassName('allow');
        this.accordion.openSection(section);
    },

Happy Hunting!

Using Magento as a Checkout, Payment and Admin System

So, you want to use the Checkout, Payment and Admin facilities but not the catalog? Well here’s a quick and painless solution.

If you have a set list of products then build the product list in the Magento back office, a previous post covers creating Magento products dynamically.

Once you have the products, all that is required is to add the products to the cart. The simplest way to do this is to feed two variables into the cart, SKU and Quantity:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
include_once '../app/Mage.php';
Mage::app();
 
Mage::getSingleton('core/session', array('name' => 'frontend'));
 
$sku = $_POST['sku'];
if (!isset($_POST['qty']) || (!is_int($_POST['qty']))) 
    { 
        $qty = 1; 
    } 
    else 
    {
        $qty = $_POST['qty']; 
    }
 
$productid = Mage::getModel('catalog/product')->getIdBySku($sku);
 
header("Location: /checkout/cart/add/product/".$productid."/qty/".$qty."/");

Your customer has then bypassed a Magento catalog but still checkouts using the Magento system and the admin can still make use of the excellent backoffice system.

Any comments or queries welcome.