Order-confirmation page PS 1.6

#1
Hello
We have Litespeed cache 1.2.4 on Prestashop 1.6.1.20 an are facing the issue that after payment of order, you can not return to order confirmation page. URL seems to be correct, but page is blank. If we switch to back-end and disable cache module , and hit F5 in front-end the order confirmation page shows up with no problem.
Error log show the following:
Code:
/modules/litespeedcache/classes/Cache.php(431): LiteSpeedCacheCore->getPurgeTagsByOrder(NULL)
/modules/litespeedcache/classes/Cache.php(379): LiteSpeedCacheCore->getPurgeTagsByHookMethod('hookdisplayOrde...', Array)
/modules/litespeedcache/litespeedcache.php(235): LiteSpeedCacheCore->purgeByCatchAllMethod('hookdisplayOrde...', Array)
/classes/Hook.php(591): LiteSpeedCache->__call('hookdisplayOrde...', Array)
/override/classes/Hook.php(44): HookCore::coreCallHook(Object(LiteSpeedCache), 'hookdisplayOrde...', Array)
/classes/Hook.php(546): Hook::coreCallHook(Object(LiteSpeedCache), 'hookdisplayOrde...', Array)
/controllers/front/OrderConfir in /home/umaxdk/sites/fotoc1.dk/modules/litespeedcache/classes/Cache.php on line 30
Can anyone tell what we are doing wrong?
rgds.
Bjarne
 
Last edited by a moderator:

Lauren

LiteSpeed Staff
Staff member
#2
Bjarne,
This also happened to another client who is using bankwire module. What module do you use to process payment?
You can update the "Cache.php" file listed above:
In line 302, function

PHP:
  private function getPurgeTagsByOrder($order)
    {
        $tags = array();
...
Added 2 lines at beginning like below:

PHP:
 private function getPurgeTagsByOrder($order)
    {
        if ($order == null) { // $order is null, happened in bankwire module
            return;
        }
        $tags = array();
Let me know if this fixed your issue or not.
You are welcome to join our slack and we have a prestashop_cache channel there.
Regards,
Lauren
 
Last edited by a moderator:
#3
Thanks for prompt reply
For creditcards we use "Quickpay" module, but also bankwire and a third module for accounts. It´s same issue on all modules, but we tested on Bankwire module since this is native Prestashop.
If we chance php as you suggest, will this only affect bankwire module, or all modules?
Rgds
Bjarne
website is fotoc.dk
 

Lauren

LiteSpeed Staff
Staff member
#4
please try it, I think should work. That function is trying to check if stock status got updated after an order is placed. but some third party module invoke the event and does not provide order detail, that's why failed. so it may cause the mismatch, that the product is not purged accordingly if it is the last one in stock.
 
Top