Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Namespace_Module_Block_Onepage extends Mage_Checkout_Block_Onepage
- {
- public function getSteps()
- {
- $steps = array();
- $stepCodes = $this->_getStepCodes();
- if ($this->isCustomerLoggedIn()) {
- $stepCodes = array_diff($stepCodes, array('login'));
- }
- foreach ($stepCodes as $step) {
- $steps[$step] = $this->getCheckout()->getStepData($step);
- }
- return $steps;
- }
- /**
- * Get active step
- *
- * @return string
- */
- public function getActiveStep()
- {
- return $this->isCustomerLoggedIn() ? 'billing' : 'login';
- }
- protected function _getStepCodes()
- {
- // Remove shipping from array
- return array('login', 'shipping', 'shipping_method', 'payment','billing');
- }
- }
- <global>
- <blocks>
- <checkout>
- <rewrite>
- <onepage>Namespace_Module_Block_Onepage</onepage>
- </rewrite>
- </checkout>
- </blocks>
- </global>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement