Jump to content

Recommended Posts

hi all,


I am using "cash on delivery with fee pay" module for payment method with my prestashop version when i am going to choose this payment method it redirect to next page but it shows the "No template was found for this module" error.i tried slow it but i can't if anyone have idea to solve this problem help me to solve it.


validation.php code:-








$cashOnDelivery = new CashOnDeliveryWithFee();

if ($cart->id_customer == 0 OR $cart->id_address_delivery == 0 OR $cart->id_address_invoice == 0 OR !$cashOnDelivery->active)



/* Validate order */

if (Tools::getValue('confirm'))


$customer = new Customer(intval($cart->id_customer));

$total = floatval(number_format($cart->getOrderTotal(true, 3), 2, '.', ''));

$cashOnDelivery->validateOrderCOD(intval($cart->id), _PS_OS_PREPARATION_, $total, $cashOnDelivery->displayName);

$order = new Order(intval($cashOnDelivery->currentOrder));





/* or ask for confirmation */


$CODfee = $cashOnDelivery->getCostValidated($cart);

$cartcost = $cart->getOrderTotal(true, 3);

$total = $CODfee + $cartcost;



'currency' => new Currency(intval($cart->id_currency)),

'total' => number_format(floatval( $total ), 2, '.', ''),

//'this_path_ssl' => (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://').htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'modules/cashondeliverywithfee/'

'this_path_ssl' => Tools::getHttpHost(true, true).__PS_BASE_URI__.'modules/cashondeliverywithfee/'



$smarty->assign('this_path', __PS_BASE_URI__.'modules/cashondeliverywithfee/');

echo Module::display(__FILE__, 'validation.tpl');





Share this post

Link to post
Share on other sites

does the validation.tpl file exist in the root dir of this module?

Share this post

Link to post
Share on other sites

Set up with the new version of MVC. Validation in root is deprecated as of prestashop 1.5 so put the validation in views/templates/front/ directory. 

Share this post

Link to post
Share on other sites
This topic is now closed to further replies.

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More