Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. class Namespace_Module_Block_Onepage extends Mage_Checkout_Block_Onepage
  2. {
  3. public function getSteps()
  4. {
  5. $steps = array();
  6. $stepCodes = $this->_getStepCodes();
  7.  
  8. if ($this->isCustomerLoggedIn()) {
  9. $stepCodes = array_diff($stepCodes, array('login'));
  10. }
  11.  
  12. foreach ($stepCodes as $step) {
  13. $steps[$step] = $this->getCheckout()->getStepData($step);
  14. }
  15.  
  16. return $steps;
  17. }
  18.  
  19. /**
  20. * Get active step
  21. *
  22. * @return string
  23. */
  24. public function getActiveStep()
  25. {
  26. return $this->isCustomerLoggedIn() ? 'billing' : 'login';
  27. }
  28.  
  29. protected function _getStepCodes()
  30. {
  31. // Remove shipping from array
  32. return array('login', 'shipping', 'shipping_method', 'payment','billing');
  33. }
  34.  
  35. }
  36.  
  37. <global>
  38. <blocks>
  39. <checkout>
  40. <rewrite>
  41. <onepage>Namespace_Module_Block_Onepage</onepage>
  42. </rewrite>
  43. </checkout>
  44. </blocks>
  45. </global>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement