Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [CodeIgniter] usuwanie produktu klasa cart
rutek1308
post
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 2.11.2014

Ostrzeżenie: (0%)
-----


Mam problem z tym kodem

  1.  
  2. public function del_item()
  3. [indent]{
  4.  
  5. [indent]$this->session->unset_userdata($this->uri->segment(3));
  6.  
  7.  
  8. redirect('cart/');[/indent]
  9. }[/indent]
  10.  
  11.  


z segmentu jest pobierana wartosc rowid, tablica produktu którego chcę usunać, próbowalem sie dobrać do niej na różne sposoby i naprawdę już nie mam pomysłu
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
aniolekx
post
Post #2





Grupa: Zarejestrowani
Postów: 340
Pomógł: 46
Dołączył: 31.07.2009
Skąd: A

Ostrzeżenie: (0%)
-----


w zasadzie tutaj masz wszystko opisane: https://ellislab.com/codeigniter/user-guide...aries/cart.html

aby usunac produkt z koszyka musisz użyć metody "update" (zobacz rodzial Updating The Cart), każdy przedmiot w koszyku ma swój unikalny row_id.

If the quantity is set to zero, the item will be removed from the cart.

W rozdziale Displaying the Cart jest nawet odpowiedni przykład
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 7.10.2025 - 09:24