• Register
Plug-in Tutorial Build an EC-CUBE plug-in

Top Commentators

114

1

EC Mike

SHOGUNSHOGUN

32

2

hrbabu

SAMURAISAMURAI

29

3

Sumant Jha

SAMURAISAMURAI

29

4

justcubed

SAMURAISAMURAI

21

5

Ashok Kafle

SAMURAISAMURAI

21

6

shahith

SAMURAISAMURAI

14

7

Jeemusu

KABUKIKABUKI

14

8

Yangsin

KABUKIKABUKI

9

9

Zaw Hlaing Bwar

GEISYAGEISYA

8

10

Fei Liu

GEISYAGEISYA

Ranking Key

  • FUJISANFUJISAN1,000+ posts
  • SAKURASAKURA500+ posts
  • SHOGUNSHOGUN100+ posts
  • NINJYANINJYA50+ posts
  • SAMURAISAMURAI20+ posts
  • KABUKIKABUKI10+ posts
  • GEISYAGEISYALess than 10 posts

Remove session value in cart

+4 votes
Will you please tell me how to remove session value in cart by clicking logout button.

For example, when i click logout button then unset session value of  item in cart and total amount.

Thanks in advance.
asked 2013-05-28 by shahith (850 points) SAMURAISAMURAI

1 Answer

+2 votes

You can clear the carts session from the SC_Customer.php files EndSession()method. This can be done as follows:

SC_Customer.php (line 167)

  function EndSession() {

    $customer_id = $_SESSION['customer']['customer_id'];
          unset($_SESSION['customer']);

    // Add this line to clear cart session
    unset($_SESSION['cart']);

 
answered 2013-05-29 by Jeemusu (690 points) KABUKIKABUKI
edited 2013-05-29 by Jeemusu
James,
  Thank you very much for your answer.
...