Jump to content

Remove Payment Step


Recommended Posts

Hi,

 

I want to remove payment step in orderController.php but It is do'nt work. I charged after $this->autoStep(); validateOrder but it is don't work. I want that at the end of the process Prestashop send an email at the end of step.

 

This is my code =>

 

case 3:
   // Check that the conditions (so active) were accepted by the customer
   $cgv = Tools::getValue('cgv') || $this->context->cookie->check_cgv;
   if (Configuration::get('PS_CONDITIONS') && (!Validate::isBool($cgv) || $cgv == false))
 Tools::redirect('index.php?controller=order&step=2');
   Context::getContext()->cookie->check_cgv = true;
   // Check the delivery option is setted
   if (!$this->context->cart->isVirtualCart())
   {
 if (!Tools::getValue('delivery_option') && !Tools::getValue('id_carrier') && !$this->context->cart->delivery_option && !$this->context->cart->id_carrier)
  Tools::redirect('index.php?controller=order&step=2');
 elseif (!Tools::getValue('id_carrier') && !$this->context->cart->id_carrier)
 {
  foreach (Tools::getValue('delivery_option') as $delivery_option)
   if (empty($delivery_option))
    Tools::redirect('index.php?controller=order&step=2');
 }
   }
   $this->autoStep();

   // Bypass payment step if total is 0
   if (($id_order = $this->_checkFreeOrder()) && $id_order)
   {
 if ($this->context->customer->is_guest)
 {
  $order = new Order((int)$id_order);
  $email = $this->context->customer->email;
  $this->context->customer->mylogout(); // If guest we clear the cookie for security reason
  Tools::redirect('index.php?controller=guest-tracking&id_order='.urlencode($order->reference).'&email='.urlencode($email));
 }
 else
  Tools::redirect('index.php?controller=history');
   }
   $this->_assignPayment();
   // assign some informations to display cart
   $this->_assignSummaryInformations();
   $this->setTemplate(_PS_THEME_DIR_.'order-payment.tpl');
  break;

  default:
   $this->_assignSummaryInformations();
   $this->setTemplate(_PS_THEME_DIR_.'shopping-cart.tpl');
  break;
 }

 

Thanks of your help.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

i would be interested in this as well, i would like to skip the carrier step ( i want to set a default one ) and the payement selection as well ( want to set a default one ) , after the customer accepts the terms i would like to have the confirm order button, because we have to call every customer about the orders, and they have to tell us on phone how they want to get the products.

 

thank yous for the help in advance, if i find any method i post it here

Link to comment
Share on other sites

×
×
  • Create New...