L
L
Lana2020-05-23 11:39:34
opencart
Lana, 2020-05-23 11:39:34

Items in the shopping cart are not updated, how to solve?

Hello.
The problem with the basket (or rather with the cache) in o cStore 3.0.2.0.
Buyers add goods to the cart, it is immediately displayed on the main page, but when they go to the cart, there are no goods, they appear only when the browser is updated.
The same garbage when ordering, the buyer placed an order, shipped, everything is OK, the basket is reset, but with another order, the previous products appear.
Also, to remove an item from the cart, you must first click on the delete button, then I click on the update button on the product, only then it will be deleted.
This problem appeared recently, cnc, seo, cache are disabled in the admin panel. Cleared the cache.
Without refreshing the browser or the items in the cart, nothing changes.
I also noticed a glitch in the admin panel. For example, I created a product, saved it, and the message "Everything is OK, saved" appeared. but this message does not go away, only reboot helps.

There is also an error in System => Maintenance => Error Log
5ec8e04c01dc6625522211.png
I watched similar topics on the forums here and here
Well, I attach the site itself

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lazuren, 2020-05-24
@lazuren

1. Cart data is stored in the session, so it is unlikely to be cache related.
2. Look in the file catalog/controller/checkout/success.phpfor these lines:

Session cleanup code

if (isset($this->session->data['order_id'])) {
      $this->cart->clear();

      unset($this->session->data['shipping_method']);
      unset($this->session->data['shipping_methods']);
      unset($this->session->data['payment_method']);
      unset($this->session->data['payment_methods']);
      unset($this->session->data['guest']);
      unset($this->session->data['comment']);
      unset($this->session->data['order_id']);
      unset($this->session->data['coupon']);
      unset($this->session->data['reward']);
      unset($this->session->data['voucher']);
      unset($this->session->data['vouchers']);
      unset($this->session->data['totals']);
    }


3. And in general, I think when creating the functionality of your site, the engine controller files were significantly changed, not always fully understanding what is responsible for what. Look through the original files, maybe you missed something.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question