ruchit.devil Posted June 5, 2013 Share Posted June 5, 2013 Right now i am not able to include the Order ID on the order confirmation page in the Cash On Delivery Module. Can someone help me find the solution for this Link to comment Share on other sites More sharing options...
vekia Posted June 5, 2013 Share Posted June 5, 2013 it's easy to achieve, but in this case you have to give us information about version of prestashop that you use. everything depends on it regards Link to comment Share on other sites More sharing options...
ruchit.devil Posted June 10, 2013 Author Share Posted June 10, 2013 my prestashop version is 1.5.4.0 Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 you can use this method: {Tools::getValue('id_order')} Link to comment Share on other sites More sharing options...
ruchit.devil Posted June 12, 2013 Author Share Posted June 12, 2013 you can use this method: {Tools::getValue('id_order')} Where shall i put this?? Link to comment Share on other sites More sharing options...
vekia Posted June 13, 2013 Share Posted June 13, 2013 to the Cash On Delivery confirmation page template file, where you want to display it exactly? Link to comment Share on other sites More sharing options...
ruchit.devil Posted July 5, 2013 Author Share Posted July 5, 2013 to the Cash On Delivery confirmation page template file, where you want to display it exactly? i want to display the order id exactly after the customer add the product to the cart and choose the payment option as Cash On Delivery. can you explain exactly where shall i put {Tools::getValue('id_order')} Link to comment Share on other sites More sharing options...
vekia Posted July 5, 2013 Share Posted July 5, 2013 put it into the modules/cashondelivery/views/templates/hook/confirmation.tpl file and into the modules/cashondelivery/views/templates/front/validation.tpl Link to comment Share on other sites More sharing options...
mentalspot Posted July 12, 2013 Share Posted July 12, 2013 (edited) Hello, I got 2 questions: 1. how can I get id_order value on cashondelivery/views/templates/hook/confirmation.tpl ? 2. my order_conf.html email does not get the id_order number (it shows {id_order}) How can i pass the id_order to email template ? //edit ok point 2 was simple i added '{id_order}' => $order->id, to cashondelivery.php PS 1.5.2 Edited July 12, 2013 by mentalspot (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 12, 2013 Share Posted July 12, 2013 1. how can I get id_order value on cashondelivery/views/templates/hook/confirmation.tpl ? what about method that i suggested above? Link to comment Share on other sites More sharing options...
mentalspot Posted July 12, 2013 Share Posted July 12, 2013 nope it does not work, shows nothing. Link to comment Share on other sites More sharing options...
ruchit.devil Posted July 13, 2013 Author Share Posted July 13, 2013 nope it does not work, shows nothing. can you tell me the exact locaiton where to put in the cashondelivery.php file Link to comment Share on other sites More sharing options...
mentalspot Posted July 13, 2013 Share Posted July 13, 2013 can you tell me the exact locaiton where to put in the cashondelivery.php file find this in document, and put it under this line '{order_name}' => $order->getUniqReference(), Link to comment Share on other sites More sharing options...
ruchit.devil Posted August 14, 2013 Author Share Posted August 14, 2013 (edited) i couldn't find the '{order_name}'=> $order->getUniqReference(), in the cashondelivery.php file. please help me sort it out. Edited August 14, 2013 by ruchit.devil (see edit history) Link to comment Share on other sites More sharing options...
mentalspot Posted August 14, 2013 Share Posted August 14, 2013 this should look like this: it`s all around line 692 '{invoice_phone}' => ($invoice->phone) ? $invoice->phone : $invoice->phone_mobile, '{invoice_other}' => $invoice->other, '{order_name}' => $order->getUniqReference(), '{id_order}' => $order->id, '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), (int)$order->id_lang, 1), '{carrier}' => $virtual_product ? Tools::displayError('No carrier') : $carrier->name, '{payment}' => Tools::substr($order->payment, 0, 32), eventually find cashondeliveryplus module on google Link to comment Share on other sites More sharing options...
ruchit.devil Posted August 17, 2013 Author Share Posted August 17, 2013 hi mentalspot, i checked my cashondelivery.php file but my file has only few lines. if (!defined('_PS_VERSION_')) exit; class CashOnDelivery extends PaymentModule { public function __construct() { $this->name = 'cashondelivery'; $this->tab = 'payments_gateways'; $this->version = '0.4'; $this->author = 'PrestaShop'; $this->need_instance = 1; $this->currencies = false; parent::__construct(); $this->displayName = $this->l('Cash on delivery (COD)'); $this->description = $this->l('Accept cash on delivery payments'); /* For 1.4.3 and less compatibility */ $updateConfig = array('PS_OS_CHEQUE', 'PS_OS_PAYMENT', 'PS_OS_PREPARATION', 'PS_OS_SHIPPING', 'PS_OS_CANCELED', 'PS_OS_REFUND', 'PS_OS_ERROR', 'PS_OS_OUTOFSTOCK', 'PS_OS_BANKWIRE', 'PS_OS_PAYPAL', 'PS_OS_WS_PAYMENT'); if (!Configuration::get('PS_OS_PAYMENT')) foreach ($updateConfig as $u) if (!Configuration::get($u) && defined('_'.$u.'_')) Configuration::updateValue($u, constant('_'.$u.'_')); } public function install() { if (!parent::install() OR !$this->registerHook('payment') OR !$this->registerHook('paymentReturn')) return false; return true; } public function hookPayment($params) { if (!$this->active) return ; global $smarty; // Check if cart has product download foreach ($params['cart']->getProducts() AS $product) { $pd = ProductDownload::getIdFromIdProduct((int)($product['id_product'])); if ($pd AND Validate::isUnsignedInt($pd)) return false; } $smarty->assign(array( 'this_path' => $this->_path, 'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/' )); return $this->display(__FILE__, 'payment.tpl'); } public function hookPaymentReturn($params) { if (!$this->active) return ; return $this->display(__FILE__, 'confirmation.tpl'); } } i couldn't find the codes which you mentioned. Link to comment Share on other sites More sharing options...
mentalspot Posted September 2, 2013 Share Posted September 2, 2013 Yes that s why i mentioned also to find cashondeliveryplus module google.pl It`s a foreign language module, but you will manage to customize it and translate:) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now