Jump to content

Халтурка для программиста


Recommended Posts

контроллер поправить чтобы сразу заказ создавал без проверки...

если содержимое public function postProcess() сунуть в public function initContent()

предварительно очистив public function initContent() то получится то что нужно.

это навскидку, под рукой нет престы

Link to comment
Share on other sites

примерно так

public function initContent()
{
$this->display_column_left = false;
parent::initContent();
$customer = new Customer((int)$this->context->cart->id_customer);
$total = $this->context->cart->getOrderTotal(true, Cart::BOTH);
$this->module->validateOrder((int)$this->context->cart->id, Configuration::get('PS_OS_PREPARATION'), $total, $this->module->displayName, null, array(), null, false, $customer->secure_key);
Tools::redirectLink(__PS_BASE_URI__.'order-confirmation.php?key='.$customer->secure_key.'&id_cart='.(int)$this->context->cart->id.'&id_module='.(int)$this->module->id.'&id_order='.(int)$this->module->currentOrder);
} 
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...