Jump to content

Disable caching for order steps


dotcompixel.com

Recommended Posts

Hi,

 

I need your help. I need to disable caching for payment validation page. I add for each payment method custom code which control if customer select some custom input. The problem is when customer doesn't select some value and on payment validation I show him error and hide button for order confirmation then customer select some value but because of caching there is still error even thought this error is not valid because customer already selected some value. When customer refresh page with F5 then error disappear and everything works.

 

So I need to disable caching on payment validation page because I need to show on this page real data not cached data. It is possible to do it? I hope that I describe my problem well if you do not understand please tell me it I will try to describe it again.

 

Thanks for your help.

 

Michal 

Link to comment
Share on other sites

I already disabled caching but if you disable caching in BO presta is still caching. I know that this is problem with cache because I find payment confirmation page in /cache folder. And for example if I add var_dump into bankwire code this var_dump if not showing when I come to payment confirmation page again but when I refresh page with F5 then I see var_dump. 

 

I do not understand why Prestashop is caching page If I have all cache in BO disabled. 

Link to comment
Share on other sites

What payment module do you use? Maybe the module is a little 'rogue' and doesn't look at settings for yes/no caching or so.

 

Maybe check the files in the /modules/<your payment module name> for any caching going on...

 

 

My 2 cents,

pascal.

Link to comment
Share on other sites

It doesn't matter which payment module I am using because the problem is with default bankwire prestashop module and also with default cash on delivery module. Each of these modules are still caching into cache/smarty/compile folder. If I manually delete this folder then I get right var_dump but for example If I delete cache folder add into validation.php payment controller var_dump('true') and go to 

 

/index.php?fc=module&module=cashonpickup&controller=validation

 

I get right var_dump but when I edit var_dump into var_dump('false') and again go to:

 

/index.php?fc=module&module=cashonpickup&controller=validation

 

I get the answer var_dump('true') which is wrong because I edited it. When I refresh page with F5 then is shows var_dump('false') but without F5 refresh payment validation page still show wrong answer. I try to check everything but I am not able to disable caching it is really frustrating because caching system in Prestashop is really bad work I have to say. Because I have second experience with caching and it is that when I enable file caching shop is loading around 5 second slowly then with disabled caching so my question is why Prestashop do this. I like using Prestashop but this is really frustrating.

 

If someone can help my I will by very grateful to him.

 

Thanks

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...