Jump to content

fxstudio

Members
  • Posts

    3
  • Joined

  • Last visited

Contact Methods

Profile Information

  • Activity
    Project Owner

fxstudio's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. but the problem is that when confirming the order, I am redirected to history page, where I can track orders... Is there way how to redirect to correct page? In my case, it would be the page, where customer could select method to pay deposit. (my settings are 50% on delivery, 50% of price as deposit - this should be possible to pay by credit card or bank wire transfer) Thanks
  2. Pepocero: there may be problem with validation.php module: this is mine (updated to pass this problem): <?php include(dirname(__FILE__).'/../../config/config.inc.php'); include(dirname(__FILE__).'/../../header.php'); include(dirname(__FILE__).'/cashondelivery.php'); $cashOnDelivery = new CashOnDelivery(); if ($cart->id_customer == 0 OR $cart->id_address_delivery == 0 OR $cart->id_address_invoice == 0 OR !$cashOnDelivery->active) Tools::redirectLink(__PS_BASE_URI__.'order.php?step=1'); /* Validate order */ if (Tools::getValue('confirm')) { $customer = new Customer((int)($cart->id_customer)); $total = floatval(number_format($cart->getOrderTotal(true, 3), 2, '.', '')); $cashOnDelivery->validateOrderCOD((int)($cart->id), _PS_OS_PREPARATION_, $total, $cashOnDelivery->displayName); $order = new Order((int)($cashOnDelivery->currentOrder)); Tools::redirectLink(__PS_BASE_URI__.'order-confirmation.php?key='.$customer->secure_key.'&id_cart='.(int)($cart->id).'&id_module='.(int)($cashOnDelivery->id).'&id_order='.(int)($cashOnDelivery->currentOrder)); } else { /* or ask for confirmation */ $CODfee = $cashOnDelivery->getCostValidated($cart); $CODdeposit = $cashOnDelivery->getDepositValidated($cart); $cartcost = $cart->getOrderTotal(true, 3); $deposit = $CODdeposit; $total = $CODfee + $cartcost; $smarty->assign(array( 'currency' => new Currency((int)($cart->id_currency)), 'deposit' => number_format((float)( $deposit ), 2, '.', ''), 'total' => number_format((float)( $total ), 2, '.', ''), 'this_path_ssl' => (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://').htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'modules/cashondelivery/' )); $smarty->assign('this_path', __PS_BASE_URI__.'modules/cashondelivery/'); $template = 'validation.tpl'; echo Module::display('cashondelivery', $template); } include(dirname(__FILE__).'/../../footer.php'); ?>
×
×
  • Create New...