Rhapsody Posted January 4, 2014 Share Posted January 4, 2014 (edited) Edit: The solution for this problem is provided by bellini13 in post #2 I am able to modify /classes/PaymentModule.php so that additional customer fields are passed to emails sent. It works fine if I insert the required code in the core. I've tried to do this as an override under /override/classes/PaymentModule.php but get the error ... Warning: include(/home/content/68/10690368/html/shop/cache/class_index.php) [function.include]: failed to open stream: No such file or directory in /home/content/68/10690368/html/shop/classes/Autoload.php on line 58 Warning: include() [function.include]: Failed opening '/home/content/68/10690368/html/shop/cache/class_index.php' for inclusion (include_path='.:/usr/local/php5_3/lib/php') in /home/content/68/10690368/html/shop/classes/Autoload.php on line 58 Fatal error: Class 'Tools' not found in /home/content/68/10690368/html/shop/config/config.inc.php on line 65 The code is inserted in the public function validateOrder so I assume all that is needed in the override file is: <?php abstract class PaymentModule extends PaymentModuleCore { public function validateOrder($id_cart, $id_order_state, $amount_paid, $payment_method = 'Unknown', $message = null, $extra_vars = array(), $currency_special = null, $dont_touch_amount = false, $secure_key = false, Shop $shop = null) { $this->context->cart = new Cart($id_cart); .... the entire function code with the modification is included here ending with... } // End foreach $order_detail_list // Use the last order as currentOrder $this->currentOrder = (int)$order->id; return true; } else { $error = Tools::displayError('Cart cannot be loaded or an order has already been placed using this cart'); Logger::addLog($error, 4, '0000001', 'Cart', intval($this->context->cart->id)); die($error); } } } Does anyone have ideas on what is needed to make this work as an override? This is PS 1.5.6.1 Edited January 4, 2014 by Rhapsody (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted January 4, 2014 Share Posted January 4, 2014 hey there, long time, hope all is well. Have you tried to delete the following file after you install the override? /shop/cache/class_index.php If not, install the override file, delete the class_index.php file, and then reload the home page and see if that helps. Link to comment Share on other sites More sharing options...
Rhapsody Posted January 4, 2014 Author Share Posted January 4, 2014 Happy New Year! Thanks very much for your help again. That did the trick. I've marked this thread as Solved. 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