jacograaff Posted July 31, 2015 Share Posted July 31, 2015 (edited) The default behavior after successful purchase is 1. see order confirmation page with link to order history 2. click on order history 3. order history page opens showing list of orders 4. click on detail button 5. ajax opens order detail 6. now you can download the purchased virtual product ------- how can I make the download available on the Order confirmation page - immediately on successful purchase?? second question: can I alternative show the product name in the order-history page as opposed to the ARCHAIC order number the controller accesses the order-list and not the products related to the order-list - thus I do not have access to the actual product name or download link from the history page - This is to archaic and many steps for end-user Do I have to write my own php-SQL code or module to give the end-user a list of actual purchases and not just a list of order numbers? Thanks Edited July 31, 2015 by jacograaff (see edit history) Link to comment Share on other sites More sharing options...
jacograaff Posted July 31, 2015 Author Share Posted July 31, 2015 (edited) I see this part of this question has been asked previously (see actual product in history and not a record of the invoices or order numbers) users remember purchase by what they purchased not the archaic order number - it does not help at all this way https://www.prestashop.com/forums/topic/445610-add-column-products-purchased-on-order-list/?hl=%2Blist+%2Bpurchased+%2Bproducts Edited July 31, 2015 by jacograaff (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted July 31, 2015 Share Posted July 31, 2015 Do I have to write my own php-SQL code or module to give the end-user a list of actual purchases and not just a list of order numbers? yes Link to comment Share on other sites More sharing options...
jacograaff Posted August 5, 2015 Author Share Posted August 5, 2015 Ok - so this is what I tried: I tested whether I can simply override the standard getCustomerOrders function using ShopV1.6\override\classes\order\Order.php To try and get a list like this: --order 1 -----product 1 -----product 2 --order 2 -----product 3 --order 3 -----product 4 in ShopV1.6\override\controllers\front\HistoryController.php I call if ($orders = Order::getCustomerOrdersAndProducts($this->context->customer->id)) { then in ShopV1.6\override\classes\order\Order.php public static function getCustomerOrdersAndProducts($id_customer, $showHiddenStatus = true, Context $context = null) { if (!$context) $context = Context::getContext(); /* add a custom $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' with innerjoin on order details*/ the returned result stays the same now forget about the sql statement - the result value does not change so I try to debug remotely by using FirePHP even if I completely delete the sql public static function getCustomerOrdersAndProducts($id_customer, $showHiddenStatus = true, Context $context = null) { if (!$context) $context = Context::getContext(); //no sql statement //this does execute require_once(..'/FirePHPCore/fb.php'); //for debugging FB::log("this works in FirePHP"); $res = null; //I try and break this function by not even returning anything for some reason I still get the original result returned even if the getCustomerOrdersAndProducts is completely empty of any return value I would appreciate any ideas My next step is now try and set up a debug environment to try and step through the php execution to see where the result comes from Link to comment Share on other sites More sharing options...
bellini13 Posted August 5, 2015 Share Posted August 5, 2015 sounds like the class index is not being updated after you install the override. review /cache/class_index.php and confirm Link to comment Share on other sites More sharing options...
jacograaff Posted August 5, 2015 Author Share Posted August 5, 2015 I deleted all the cache including class_index.php Link to comment Share on other sites More sharing options...
bellini13 Posted August 5, 2015 Share Posted August 5, 2015 ok, and after the class_index.php was re-created, does it have the correct entry that uses your override files? Link to comment Share on other sites More sharing options...
vode11 Posted July 25, 2016 Share Posted July 25, 2016 Hello Jacograaff I'm from seeking a solution to the same problem like yours. And I would like to know if you have found a solution. If you have the solution, help me is it you please. Thanks in advance for your reply 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