Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
I found this solution in the open spaces:
So, the problem is in your session in system/library/cart/cart.php
After logging in, the client class is initiated and the __construct
.
on the file you can see how it works:line 22
system/library/cart/cart.php
// this code queries the current cart of your session id. so before you were logged int, your cart was saved to the database under a session id.
$cart_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "cart WHERE api_id = '0' AND customer_id = '0' AND session_id = '" . $this->db->escape($this->session->getId()) . "'");
//after it finds your card products, it adds them to your CUSTOMER id.
foreach ($cart_query->rows as $cart) {
$this->db->query("DELETE FROM " . DB_PREFIX . "cart WHERE cart_id = '" . (int)$cart['cart_id'] . "'");
// The advantage of using $this->add is that it will check if the products already exist and increaser the quantity if necessary.
$this->add($cart['product_id'], $cart['quantity'], json_decode($cart['option']), $cart['recurring_id']);
}
$ this-> session-> getId ()
, so the script can't find the products in the cart. //print out the session id.
print_r($this->session->getId());
$cart_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "cart WHERE api_id = '0' AND customer_id = '0' AND session_id = '" . $this->db->escape($this->session->getId()) . "'");
//print out the result of the query
print_r($cart_query->rows);
foreach ($cart_query->rows as $cart) {
$this->db->query("DELETE FROM " . DB_PREFIX . "cart WHERE cart_id = '" . (int)$cart['cart_id'] . "'");
// The advantage of using $this->add is that it will check if the products already exist and increaser the quantity if necessary.
$this->add($cart['product_id'], $cart['quantity'], json_decode($cart['option']), $cart['recurring_id']);
}
session_id=$this->session->getId()
https://www
and configured редирект с www.site.com, на https://www.site.com
in .htaccess and it all worked!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question