qdssoftware Posted March 17, 2010 Share Posted March 17, 2010 Hi to all, I have installed "Cashondeliverywithfee" with PrestaShop 1.3.x but I have detected a important bug... clients cannot finish their orders because it stops with message "HACK (Order -> total_products_wt is empty)" anybody has solved this problem ?thanks!regards Link to comment Share on other sites More sharing options...
corint1 Posted April 10, 2010 Share Posted April 10, 2010 i have same problem ...any ? Link to comment Share on other sites More sharing options...
Antonio Romero Posted May 7, 2010 Share Posted May 7, 2010 I also I have this problem, anyone knows the solution?Thanks Link to comment Share on other sites More sharing options...
zac Posted May 14, 2010 Share Posted May 14, 2010 Same problem. I guess it is just an incompatibility issue with 1.3.x, but I haven't figured it out yet. Link to comment Share on other sites More sharing options...
eltitos Posted June 13, 2010 Share Posted June 13, 2010 I modified two modules :-Cash on delivery with fee aural (see serfer2 post under)-Cash on delivery /depositI modified in the file cashondelivery.php( and cashondeliverywithfeeaural.php) the "// Copying data from cart" section. I copied the section from /classes/PaymentModules.php then i add the fee modification.I changed a little the Cashondeliverywithfeeaural tpl files.Maybe these modules need more modifications but i'm not a professional. But for now both of them are working with the 1.3.1.1 . cashondelivery-deposit.zip Link to comment Share on other sites More sharing options...
raulibi Posted July 13, 2010 Share Posted July 13, 2010 thank you very much for sharing it with everyone. Regards Link to comment Share on other sites More sharing options...
serfer2 Posted July 16, 2010 Share Posted July 16, 2010 Warning !!!this cashondeliverywithfeeaural-1.3.zip module has important bugs:MonDeveloper's modification has a bug in function validateOrderCOD().When new order is complete, order_detail DataBase insertions are incorrect. Product quantity value, in order details, has the value of product stock in place of the customer's product quantity selection.Maybe a Mistake between: $product['quantity'] ---> the current product stock.and: $product['cart_quantity'] ---> number of units of a product that the customer wants to buyPlease, take a look to the attached file code, see the fix comments and report any suggestion.regards cashondeliverywithfeeaural.php Link to comment Share on other sites More sharing options...
D-fox Posted July 23, 2010 Share Posted July 23, 2010 Sorrry when trying ton confirm an order I get a "date invalide" error, can you pls help ?I applied patch Link to comment Share on other sites More sharing options...
serfer2 Posted July 23, 2010 Share Posted July 23, 2010 Sorry but I didn't get a “date invalide” error.Please check your Prestashop version. This file/module is only compatible with 1.3.x versionsBy the way, whenever you ask for help, you must provide most data as you can. “Date invalide” is not enough info, don't you think so?You have to provide us info like:- Which version of Prestashop are you using?- Did you modified anything more?- Can you attach your "cashondeliverywithfeeaural.php" source code file?... Link to comment Share on other sites More sharing options...
D-fox Posted July 23, 2010 Share Posted July 23, 2010 I have ver 1.3 recently installed and on testing I realized that module "cashondeliverywith fee" will not work, I therefore tried module Cash on delivery with fee aural (see serfer2 post under), and modified file cashondeliverywithfeeaural.php Still on last step of payment I confirm and get this french message (my shop is in french) "date invalide". But order is validated.I have not (yet) modified any other files except translations as I have lang EN, DE and FR in my shop. Link to comment Share on other sites More sharing options...
serfer2 Posted July 23, 2010 Share Posted July 23, 2010 Hi Sarahd,please, zip your "Cash on delivery with fee aural" complete module and post it here.Let me see the code and test it. If I can I'll help you to find the bug.Regards Link to comment Share on other sites More sharing options...
D-fox Posted July 23, 2010 Share Posted July 23, 2010 sure thank you for your helpsee attached cashondeliverywithfeeaural.zip Link to comment Share on other sites More sharing options...
Maria_M Posted August 15, 2010 Share Posted August 15, 2010 I get a 'date invalid' too Link to comment Share on other sites More sharing options...
wicker Posted August 31, 2010 Share Posted August 31, 2010 I get 'invalid date' too on PS1.3.1 after confirming order.Strange because it works in my test instalation in a local PC with xampp but it does not when I try to move it live at my server Link to comment Share on other sites More sharing options...
cockpitinferno Posted October 12, 2010 Share Posted October 12, 2010 i tried the cashondelivery-deposit proposed by eltito. it works fine but i have a little problem. i would like to allow my customers to pay yhe account (30%) by credit cart (paypal)and when you click on "confirm the order" the customer go directly to the summary of all orders. and the command has the status "the commend is preparing" (don't know the translation in english)i would like it to be in attempt of accountdon't know if you see what i mean. Link to comment Share on other sites More sharing options...
cockpitinferno Posted October 14, 2010 Share Posted October 14, 2010 nobody to help? Link to comment Share on other sites More sharing options...
Giulio Posted October 18, 2010 Share Posted October 18, 2010 Brutally you could comment out the offending validation lines:in classes/Tools.php around line 284, changeif (!Validate::isDate($date) OR !Validate::isBool($full)) die (self::displayError('Invalid date'));into://if (!Validate::isDate($date) OR !Validate::isBool($full))// die (self::displayError('Invalid date'));Please note that it's not a very good idea to comment out validation lines for security reasons.HTH,-- Giulio - http://pilv.it/ Link to comment Share on other sites More sharing options...
cockpitinferno Posted October 18, 2010 Share Posted October 18, 2010 thank you.i found an other way with cheques but i see that the module doesnt work with my production version wich is 1.2.5.so i'll wait to see if i update my version (i already have modules that doesnt work with the new version so...) Link to comment Share on other sites More sharing options...
Dano Pogac Posted December 6, 2010 Share Posted December 6, 2010 I have installed Aural COD w fee on 1.3.2.3 and i have one question. Normal COD and other payment methods after validation of order (/modules/payment-method/validation.php) jump to page order-confirmation.php. But Aural COD w fee after validation jump to history.php. Is that normal or something is wrong ??? Link to comment Share on other sites More sharing options...
netuz Posted June 1, 2011 Share Posted June 1, 2011 Hi,cashondeliverywithfeeaural is compatible with Prestashop 1.4?anyone know?thanks! Link to comment Share on other sites More sharing options...
vertix Posted September 12, 2011 Share Posted September 12, 2011 Unfortunately it's not Link to comment Share on other sites More sharing options...
E_MuNcH Posted November 28, 2011 Share Posted November 28, 2011 hi everyone. I'm sorry I wrote this post in spanish but i don't have time to translated. I made few changes in the original module which i were ussing in 1.3. and is running in 1.4. here are the changes. Regards, Yo he conseguido que el cashondeliverywithfeeaural funcione en 1.4.5 haciendo lo siguiente: En primer lugar fue el problema con la ruta en el fichero validation.php que envia a validation.tpl y daba un error de que no encontraba la pagina. Modifique en validation.php echo Module::display(__FILE__, 'validation.tpl'); por echo Module::display(__PS_BASE_URI__.'modules/cashondeliverywithfeeaural', 'validation.tpl'); Yo lo tengo en el raiz, pero si lo tengo montado en la carpeta tienda lo pondria antes de modules. echo Module::display(__PS_BASE_URI__.'tienda/modules/cashondeliverywithfeeaural', 'validation.tpl'); En segundo lugar copie de classes/paymentmodule.php la parte de //copying data from cart en el fichero de cashondelivery...php y modifiqué algunas partes. El codigo final es: /* Copying data from cart */ $order = new Order(); $order->id_carrier = (int)($cart->id_carrier); $order->id_customer = (int)($cart->id_customer); $order->id_address_invoice = (int)($cart->id_address_invoice); $order->id_address_delivery = (int)($cart->id_address_delivery); $vat_address = new Address((int)($order->{Configuration::get('PS_TAX_ADDRESS_TYPE')})); $order->id_currency = ($currency_special ? (int)($currency_special) : (int)($cart- >id_currency)); $order->id_lang = (int)($cart->id_lang); $order->id_cart = (int)($cart->id); $customer = new Customer((int)($order->id_customer)); $order->secure_key = ($secure_key ? pSQL($secure_key) : pSQL($customer->secure_key)); $order->payment = Tools::substr($paymentMethod, 0, 32); if (isset($this->name)) $order->module = $this->name; $order->recyclable = $cart->recyclable; $order->gift = (int)($cart->gift); $order->gift_message = $cart->gift_message. "BLA:".$CODfee; $currency = new Currency($order->id_currency); $order->conversion_rate = $currency->conversion_rate; $amountPaid = !$dont_touch_amount ? Tools::ps_round((float)($amountPaid)+$CODfee, 2) : $amountPaid; $order->total_paid_real = $amountPaid; $order->total_products = (float)($cart->getOrderTotal(false, Cart::ONLY_PRODUCTS)); $order->total_products_wt = (float)($cart->getOrderTotal(true, Cart::ONLY_PRODUCTS)); $order->total_discounts = (float)(abs($cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS))); $order->total_shipping = (float)($cart->getOrderShippingCost()+$CODfee); $order->carrier_tax_rate = (float)Tax::getCarrierTaxRate($cart->id_carrier, (int)$cart ->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); $order->total_wrapping = (float)(abs($cart->getOrderTotal(true, Cart::ONLY_WRAPPING))); $order->total_paid = (float)(Tools::ps_round((float)($cart->getOrderTotal(true, Cart::BOTH)), 2)+$CODfee); $order->invoice_date = '0000-00-00 00:00:00'; $order->delivery_date = '0000-00-00 00:00:00'; El codigo Original /* Copying data from cart */ $order = new Order(); $order->id_carrier = intval($cart->id_carrier); $order->id_customer = intval($cart->id_customer); $order->id_address_invoice = intval($cart->id_address_invoice); $order->id_address_delivery = intval($cart->id_address_delivery); $vat_address = new Address(intval($order->id_address_delivery)); $id_zone = Address::getZoneById(intval($vat_address->id)); $order->id_currency = ($currency_special ? intval($currency_special) : intval($cart- >id_currency)); $order->id_lang = intval($cart->id_lang); $order->id_cart = intval($cart->id); $customer = new Customer(intval($order->id_customer)); $order->secure_key = pSQL($customer->secure_key); $order->payment = Tools::substr($paymentMethod, 0, 32); if (isset($this->name)) $order->module = $this->name; $order->recyclable = $cart->recyclable; $order->gift = intval($cart->gift); $order->gift_message = $cart->gift_message. "BLA:".$CODfee; $currency = new Currency($order->id_currency); $amountPaid = !$dont_touch_amount ? Tools::ps_round(floatval($amountPaid)+$CODfee, 2) : $amountPaid; $order->total_paid_real = $amountPaid; $order->total_products = floatval($cart->getOrderTotal(false, 1)); $order->total_products_wt = floatval($cart->getOrderTotal(true, 1)); $order->total_discounts = floatval(abs($cart->getOrderTotal(true, 2))); $order->total_shipping = floatval($cart->getOrderShippingCost()+$CODfee); $order->total_wrapping = floatval(abs($cart->getOrderTotal(true, 6))); $order->total_paid = floatval(Tools::ps_round(floatval($cart->getOrderTotal(true, 3) +$CODfee), 2)); $order->invoice_date = '0000-00-00 00:00:00'; $order->delivery_date = '0000-00-00 00:00:00'; Link to comment Share on other sites More sharing options...
pepocero Posted March 24, 2012 Share Posted March 24, 2012 Hola!! Probe el modulo cashondeliverywithfeeaural, con la modificacion de E_MuNcH, pero no me funcionó. Tengo prestashop 1.4.7 y al seleccionar esta forma de pago me sale el error: No hay se encuentra plantilla para el módulo validation I tested the module cashondeliverywithfeeaural with E_MuNcH modification, butdid not work. I have prestashop 1.4.7 and selecting this payment method I get the error: There isa template for the validation module Link to comment Share on other sites More sharing options...
fxstudio Posted March 27, 2012 Share Posted March 27, 2012 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'); ?> Link to comment Share on other sites More sharing options...
fxstudio Posted March 27, 2012 Share Posted March 27, 2012 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 Link to comment Share on other sites More sharing options...
big babol Posted March 30, 2012 Share Posted March 30, 2012 I do not work well ... at the end gives me the total price and not the deposit!!! 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