Post by emre.alan » Tue Jul 24, 2018 4:19 pm

OC Version: 3.0.2.0
Theme: eMarket - Multi-purpose MarketPlace
Extension/Mods: iyzico payment module installed but not active

Hi,
First of all sory for my bad english,
Everything was fine until i try functionality of cart, adding to cart works well, adds products to cart but it doesnt refresh minicart window. When i reload page minicart shows all product that i added before. its same for deleting product from minicart.

when i disable htppcache on browser everything works fine, you can see the network tab on added picture.

i found why this happening but cant find solution for that, please help me about that problem, is that problem releated to my theme, server or opencart? and how i can solve that problem.

Plesk-apache+nginx-php 7.0.30
my site: https://v3.parapet.com.tr

Attachments

hatadurumu.jpg

hatadurumu.jpg (314.84 KiB) Viewed 633 times


Newbie

Posts

Joined
Mon Mar 13, 2017 4:21 pm

Post by emre.alan » Tue Jul 24, 2018 6:07 pm

I found the solution, xhr results was keeping caching and i added headers to results.
i added 2 lines of code to info function inside "catalog/controller/common/cart.php" file
"
$this->response->addHeader('Cache-Control: no-cache, must-revalidate');
$this->response->addHeader('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
"
my new info function looks like that,
public function info() {
$this->response->addHeader('Cache-Control: no-cache, must-revalidate');
$this->response->addHeader('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
$this->response->setOutput($this->index());
}

also my custom theme have same function inside soo i changed it too

Newbie

Posts

Joined
Mon Mar 13, 2017 4:21 pm
Who is online

Users browsing this forum: No registered users and 317 guests