Jump to content

[SOLVED] Cum sarim peste pasul Curier PS 1.4


Recommended Posts

Dupa cateva cautari, am ajuns pana la codul asta:

 

 

/* 4 steps to the order */

switch ((int)$this->step)

{

case -1;

self::$smarty->assign('empty', 1);

break;

case 1:

$this->_assignAddress();

break;

case 2:

if (Tools::isSubmit('processAddress'))

$this->processAddress();

$this->autoStep();

$this->_assignCarrier();

break;

case 3:

//Test that the conditions (so active) were accepted by the customer

$cgv = Tools::getValue('cgv');

if (Configuration::get('PS_CONDITIONS') AND (!Validate::isBool($cgv)))

Tools::redirect('order.php?step=2');

 

if (Tools::isSubmit('processCarrier'))

$this->processCarrier();

$this->autoStep();

/* Bypass payment step if total is 0 */

if (($id_order = $this->_checkFreeOrder()) AND $id_order)

{

if (self::$cookie->is_guest)

{

$email = self::$cookie->email;

self::$cookie->logout(); // If guest we clear the cookie for security reason

Tools::redirect('guest-tracking.php?id_order='.(int)$id_order.'&email='.urlencode($email));

}

else

Tools::redirect('history.php');

}

$this->_assignPayment();

break;

default:

$this->_assignSummaryInformations();

break;

}

}

 

 

 

Banuiesc/sper ca aici trebuie schimbat ceva, dar orice am incercat nu a dat rezultate (nici nu-s un cunoscator de php)

 

Anyone ?

Link to comment
Share on other sites

controllers/OrderController.php

in functia process() sterge fragmentul asta:

 

$this->autoStep();
$this->_assignCarrier();
break;
  case 3:
if(Tools::isSubmit('processCarrier'))

 

in functia displayContent modifici

  case 2:
self::$smarty->display(_PS_THEME_DIR_.'order-payment.tpl');
break;

 

controllers/ParentOrderController.php

in functia processCarrier() modifici

 $id_carrier = Configuration::get('PS_CARRIER_DEFAULT');
 if (Validate::isInt(Tools::getValue('id_carrier')) AND sizeof(Carrier::checkCarrierZone((int)($id_carrier), (int)($id_zone))))
  self::$cart->id_carrier = (int)($id_carrier);

 

 

cam asta e povesta cu saritul.

Link to comment
Share on other sites

  • 1 year later...

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...