1

Drupal Commerce on the Review page of the checkout process (e.g. checkout/4/review) by default outputs billing and shipping information above each other in a table, with each line as a different <tr> row containing one table cell:

enter image description here

I'm trying to re-theme this such that it's responsive and has the two addresses side-by-side on wider breakpoints. I know how to code that HTML, my problem is, how to get my HTML into the Commerce page template?

  • There's no corresponding tpl file I can find anywhere in the Commerce module, and other answers linked below seem to confirm there isn't one
  • I can't find a corresponding View to edit
  • I've read theming checkout pages in Drupal commerce, where an answer suggests creating a file page--checkout--review.tpl.php - but no such file exists already, and I don't want to recreate the template from scratch and potentially miss some important subtlety from the logic of the original, I want to read, understand and then edit the original.
  • The answer to Customize drupal commerce checkout page doesn't offer the HTML control I need, likewise How to theme checkout completion page in Drupal Commerce. I know I can edit the form array using hooks, but I can't use hooks to make the fine adjustments to the HTML output that I need, removing them from the table to make them responsive.
  • I wrote the answer to Customize commerce cart form page, which uses a custom module to allow the table to be editted in Views - but this only works for the cart, not checkout

How can I edit (not re-write from scratch) the HTML of the checkout review table?

1 Answer 1

1

At time of writing, this isn't a viable solution, but I'm posting it because it might become one, one day.

Commerce Responsive UI module

There's a massive long 5-year-old issue matching my problems theming Commerce checkout in the Commerce issues queue. The "fix" was the creation of a module, Commerce Responsive UI, that aims to modernise the markup of the checkout (and other) pages and make them themable. It sounds like exactly what I'm looking for.

Problem is, there's no stable release, no release at all since November 2015, and it appears to have some serious unresolved issues, like breaking normal cart/checkout page paths. This might become a good answer to the question, but right now it's an unfinished work in progress.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.