Created
July 15, 2013 10:37
-
-
Save danslo/5999055 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git app/code/local/Danslo/CheckoutDesign/Model/Observer.php app/code/local/Danslo/CheckoutDesign/Model/Observer.php | |
new file mode 100644 | |
index 0000000..1512dab | |
--- /dev/null | |
+++ app/code/local/Danslo/CheckoutDesign/Model/Observer.php | |
@@ -0,0 +1,29 @@ | |
+<?php | |
+ | |
+class Danslo_CheckoutDesign_Model_Observer | |
+{ | |
+ | |
+ /** | |
+ * Package name to set. | |
+ */ | |
+ const PACKAGE_NAME = 'default'; | |
+ | |
+ /** | |
+ * Theme name to set. | |
+ */ | |
+ const THEME_NAME = 'blank'; | |
+ | |
+ /** | |
+ * Changes the design for checkout pages. | |
+ * | |
+ * @param Varien_Event_Observer $observer | |
+ * @return void | |
+ */ | |
+ public function changeDesign($observer) | |
+ { | |
+ $store = Mage::app()->getStore(); | |
+ $store->setConfig('design/package/name', self::PACKAGE_NAME); | |
+ $store->setConfig('design/theme/default', self::THEME_NAME); | |
+ } | |
+ | |
+} | |
\ No newline at end of file | |
diff --git app/code/local/Danslo/CheckoutDesign/etc/config.xml app/code/local/Danslo/CheckoutDesign/etc/config.xml | |
new file mode 100644 | |
index 0000000..0ba6b23 | |
--- /dev/null | |
+++ app/code/local/Danslo/CheckoutDesign/etc/config.xml | |
@@ -0,0 +1,15 @@ | |
+<?xml version="1.0" encoding="UTF-8"?> | |
+<config> | |
+ <frontend> | |
+ <events> | |
+ <controller_action_predispatch_checkout> | |
+ <observers> | |
+ <danslo_checkoutdesign_change_design> | |
+ <method>changeDesign</method> | |
+ <class>Danslo_CheckoutDesign_Model_Observer</class> | |
+ </danslo_checkoutdesign_change_design> | |
+ </observers> | |
+ </controller_action_predispatch_checkout> | |
+ </events> | |
+ </frontend> | |
+</config> | |
diff --git app/etc/modules/Danslo_CheckoutDesign.xml app/etc/modules/Danslo_CheckoutDesign.xml | |
new file mode 100644 | |
index 0000000..7bd6202 | |
--- /dev/null | |
+++ app/etc/modules/Danslo_CheckoutDesign.xml | |
@@ -0,0 +1,9 @@ | |
+<?xml version="1.0" encoding="UTF-8"?> | |
+<config> | |
+ <modules> | |
+ <Danslo_CheckoutDesign> | |
+ <active>true</active> | |
+ <codePool>local</codePool> | |
+ </Danslo_CheckoutDesign> | |
+ </modules> | |
+</config> | |
\ No newline at end of file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment