Skip to content

Commit

Permalink
make sure that the tax details are expanded by default, fixes #290
Browse files Browse the repository at this point in the history
  • Loading branch information
sprankhub committed Oct 15, 2017
1 parent 20dd4aa commit 1221c78
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions modman
Expand Up @@ -28,4 +28,5 @@ src/app/design/frontend/base/default/layout/magesetup.xml app/design/fro
src/app/design/frontend/base/default/template/magesetup/ app/design/frontend/base/default/template/magesetup/
src/app/design/frontend/rwd/default/template/magesetup/ app/design/frontend/rwd/default/template/magesetup/
src/skin/frontend/base/default/css/magesetup/ skin/frontend/base/default/css/magesetup
src/skin/frontend/base/default/js/magesetup/ skin/frontend/base/default/js/magesetup
src/skin/frontend/rwd/default/css/magesetup/ skin/frontend/rwd/default/css/magesetup
4 changes: 4 additions & 0 deletions src/app/design/frontend/base/default/layout/magesetup.xml
Expand Up @@ -498,6 +498,10 @@
<action method="addCss">
<stylesheet>css/magesetup/checkout.css</stylesheet>
</action>
<action method="addItem">
<type>skin_js</type>
<name>js/magesetup/checkout.js</name>
</action>
</reference>
</checkout_onepage_index>

Expand Down
15 changes: 15 additions & 0 deletions src/skin/frontend/base/default/js/magesetup/checkout.js
@@ -0,0 +1,15 @@
document.observe('dom:loaded', function () {
// make sure that the tax details are expanded by default
if (typeof Review !== 'undefined') {
Checkout.prototype.gotoSection = Checkout.prototype.gotoSection.wrap(function (parent, section, reloadProgressBlock) {
parent(section, reloadProgressBlock);
if (section !== 'review') {
return;
}
var summaryTotals = $$('.summary-total');
for (var i = 0; i < summaryTotals.length; i++) {
summaryTotals[i].click();
}
});
}
});

0 comments on commit 1221c78

Please sign in to comment.