Magento checkout agreements missing

Magento I had to work on a Magento template that was bought and assumed to be in a “fully functional and anatomically correct form” (cit), except that it was not able to show the checkout agreements in the checkout process even if the standard procedures are all done correctly.

The problem was (of course) in the XML layout of the checkout page (checkout.xml) where the block that was supposed to output the agreements, here below:

<block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>

Was positioned in the wrong place, in my case it was inside the “Review” element of the checkout:

<block type="checkout/onepage_review" name="checkout.onepage.review" as="review" template="checkout/onepage/review.phtml">
  -- stuffs --
</block>

That is pretty wrong! This error will make impossible for customers to complete the checkout process as the system will spam pop “Hey you did not accept the agreements!”. That block is supposed to stay inside the info block of the review:

<block type="checkout/onepage_review_info" name="root" output="toHtml" template="checkout/onepage/review/info.phtml">
  -- many stuffs --
  <block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
</block>

At this point a simple cache refresh fixed the issue and get the checkout agreements in the checkout page.

Enjoy!

Advertisements

Your opinion is important!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s