PATCH SUPEE 9767 Can’t be applied

The question:

When I apply the above patch it is getting stuck at app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml at line 120. I have looked at the patch file and the code is

diff --git 
app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml 
app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
index 4ee6d76..47c3a79 100644
--- app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
+++ app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
@@ -120,6 +120,7 @@
                 <span><span><?php echo $this->__('Update Total') ?></span></span>
             </button>
         </div>
+            <?php echo $this->getBlockHtml('formkey') ?>
     </form>
     <?php endif; ?>
     <script type="text/javascript">

Why is the error appearing?

Edit: Question is asking in the case of identical files.

The Solutions:

Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.

Method 1

When applying patch, make sure you did not change the magento core code, if there is an error for a specific file, try to download the original Magento file and replace the error file. If you are migrating from windows to Unix/Linux machine, some of the core code will have end of line issue, therefore you need to reformat it to unix format, for this case i install dos2unix to fix the end of line problem.

Method 2

Because that file is not as Magento is expecting it to be. It appears that it has been modified to put the formkey in it. If you have a look at Security Patch SUPEE-9767 – Possible issues? you’ll see what you need to do


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Comment