As Ajax Smarty fetch to fix it?

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
Ajax script basket in simpla cms.
-Ajax'om sent a quantity of goods
-Put everything in php to change the session basket
-In response to the return pieces need to be replaced in the html

And all is good, but take using tpl which gives fetch is not correct.
The answer comes always, all the pieces correctly, but fetch(cart_purchases.tpl) moments from previous queries. As if not refreshed. The feeling that this template does not have time to now contain and odesabrody version. Reset the variable in which box the template did not help.

Changed server hosting did not help. On one everything worked properly only increased the delay of the script execution.

If you do the delay after the call to the template works properly.

How to make php or Smarty accurately loaded current, updated tpl?
by | 25 views

1 Answer

0 like 0 dislike
Put clean simply with the same template - issue resolved.
Let me remind you ajax -> php -> smarty fetch cart_purchases.tpl
Some interesting observations on different servers hosting:

1. The script runs instantly, but fetch cart_purchases.tpl produces not correct result often from a previous run.
2. The script is slow, rusalochku, one query, and exactly as needed.

Simple was modified, what exactly did bug do not understand.

Related questions

0 like 0 dislike
1 answer
asked Sep 3, 2019 by viktorross
0 like 0 dislike
1 answer
asked Aug 14, 2019 by viktorross
0 like 0 dislike
1 answer
asked Jul 13, 2019 by viktorross
0 like 0 dislike
1 answer
asked Mar 28, 2019 by Zante
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
35,533 users