CMS blocks disappear after version 1.9.2.2 upgrade or SUPEE-6788 patch

Magento veresion 1.9.2.2 and patch SUPEE-6788 both introduce a new security featuer to Magento. Blocks on the front-end have to be enabled or whitelisted before it will work.

Blocks can be added via a new Admin Panel section under Permissions > Blocks. Adding or allowing a new block is pretty streight forward:

  1. Navigate to System > Permissions > Blocks
  2. Click “Add New Block”
  3. Enter the block name: e.g. cms/block*
  4. Set “Is Allowed” to Yes

* Replace this with the name of the block that has disappeared

Checkout problems upgrading to Magento 1.9.3.4+

Magento version 1.9.3.4 include patch SUPEE-9767 V2 which includes security patching for the checkout process.

For your current front-end templates to work with this patch you will need to include a form key value to a number of forms in the checkout process.

<?php echo $this->getBlockHtml('formkey') ?>

Load the templates below from your  app/design/frontend/<package>/<theme> directory and add the Form Key code above between the <form> and </form> tags on each.

The basic templates that will need upgraded:

  • /template/checkout/cart/shipping.phtml
  • /template/checkout/onepage/billing.phtml
  • /template/checkout/onepage/shipping.phtml
  • /template/checkout/onepage/payment.phtml

If persistant checkout is enabled:

  • /template/checkout/onepage/shipping_method.phtml
  • /template/persistent/checkout/onepage/billing.phtml

If you allow shippinng to multiple addresses:

  • /template/checkout/multishipping/billing.phtml
  • /template/checkout/multishipping/shipping.phtml

Magento: What are Sage Pay Orphan Transactions?

This is a regular issue when using Sage Pay with Magento that needs a bit of explaining.

Sage Pay transactions started by the customer are stored in the Magento database. When a transaction is completed successfully this Sage Pay transaction is linked to the completed order in Magento.

When a order does not complete this leaves transactions in the Magento database not connected to a Magento order ID. These are orphaned transactions. The cause can be the customer abandoning the order at some point (e.g. the 3D secure checks), a declined/rejected payment, or caused by an error when Magento Saves the order. Because there is no completed Order ID to connect the transaction to these are considered “orphans”.

Orphaned  transactions are not always bad. If you monitor the list of orphaned transactions in Magneto (Sales > Sage Pay > Orphan Transactions) you can use the details to recover lost sales, for example a telephone or email address may be available to contact customers who have been unable to complete 3D Security checks and enter the order manually.

The most important thing to note is that Sage Pay integration will not tell Magento to save an order unless the payment has been successfully taken. The successful payment response from Sage Pay will create the “processing” order in Magento. This stops issues with inventory and shipping unpaid for orders.

The Sage Pay Suite Orphan Transaction list will not only help you spot issues with customers processing orders, it can also help you recover sales.

Magento Issue: Unable to sort configurable product attribute drop down options

Having encountered this issue a couple of times I though it was time to make a note. This is a fix for an issue in Magento 1.9 whereby the order specified for option attributes in the admin panel are not being applied on the front end.

Jonathon Byrd at Merchant Protocol has published this fix which overrides the core Configurable Attribute Collection class with an updated one which properly sorts the attribute options by the sort value in the Admin panel.

» [Solved] Sort Configurable Product Attribute Options and Dropdowns

Jonathon’s fix works perfectly. I’ve implemented it alongside a simple product pricing module for configurable products also without issue.

Magento Issue: One Page Checkout appearing to jump to the bottom of the page after address is entered

This is a recurring issue with Magento’s standard One Page Checkout. It most often occurs when the template has been updated to include lots of big fonts and padding around field elements (thanks designers).

What happens is that the address stage is a very tall container which then jumps to the much shorter Shipping Method stage and the height of the entire page is updated in the browser, while you user thinks they’re being pushed to the bottom of the page.

The easy fix is to tell prototype.js to jump to the top of the next stage rather than remaining at the fixed position on the page.

In your checkout/onepage.phtml add the following code directly after the var checkout = new Checkout() block.

checkout.gotoSection = function (section, reloadProgressBlock) {
            Checkout.prototype.gotoSection.call(
               this, 
               section, 
               reloadProgressBlock
            );
            $('opc-' + section).scrollTo();
        };

Magento Issue: Subtotal and Grand Total prices double at Cart/Checkout stages

Have recently encountered an issue with prices in Magento Checkout appearing doubled. There are a number of solutions online which seem to (in various combinations) do the trick.

A particular cause of the error seems to be when more than two addresses appear in the sales_flat_quote_address table.

Disable Third Party Checkouts

This seems to be the best solution, the issue predominantly happening when a third party one page checkout extension is in use.

Dave Boyce Solution

This code removes anything other than two addresses being pulled for a quote from the table sales_flat_quote_address. The quick fix goes in Mage\Checkout\Model\Cart.php.

In The Mage_Checkout_Model_Cart class init() function enter the code below the line: $this->getQuote()->setCheckoutMethod('');

$addresses = $this->getQuote()->getAllAddresses();
    
if (count($addresses) > 2) {
  for($i = 2; $i < count($addresses); $i++) {
    $address = $addresses[$i];
    $address->isDeleted(true);
  }
}

Multiple Address Checkout

It should also be check that under System > Configuration > Shipping Settings that “Maximum Qty Allowed for Shipping to Multiple Addresses” is set the value to “0”. The default is 100.

To fix, change “Allow shipping to multiple address” to “Yes” and Save. Then Set Allow Shipping to “No” and set Maximum Addresses to “0”. Click Save.