Yeah, the stats in EE aren’t comprehensive enough for you. Google or Mint. On my site, I use slimstat, which I quite like.
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
September 08, 2007 2:55am
Subscribe [7]#16 / Sep 08, 2007 7:06pm
Yeah, the stats in EE aren’t comprehensive enough for you. Google or Mint. On my site, I use slimstat, which I quite like.
#17 / Sep 18, 2007 3:20pm
operamage.com ... newbie
#18 / Sep 18, 2007 3:25pm
spam much?
at least hyperlink it so you get the PR mojo from GoogleBot.
#19 / Sep 19, 2007 12:55am
lol Mike. 😊
I’m sure he’ll get moderated soon enough by one of the moderators.
- sf
#20 / Sep 19, 2007 3:15am
No, no spam. It’s my ugly english….
It is for you. You can make your own e-commerce with CI, in few time. I’m a newbie of CI and… I made it…
really, no spam.
#21 / Sep 19, 2007 8:50am
Its cool daweb. I think some of the objection (mine included) comes from a post including only a link to a website, with no accompanying information or context. Next time, try explaining why you’re linking to a site when you link. Thanks for sharing.
#22 / Sep 19, 2007 9:50am
Sorry about that daweb. Definitely post more information about links - it caught me on a bit of a “downside” as I noticed another spam post in the forums just a few minutes prior. I looked over your past posts and couldn’t believe you were spamming (after contributing some great stuff previously).
Sorry about that, once again.
#23 / Sep 19, 2007 11:05am
I’d like to apologize myself. I thought you were calling us newbies. It’s great to see you’ve accomplished a shopping cart with CI! Good work… 😊
#24 / Sep 19, 2007 3:17pm
One suggestion ... Depending on the cost of the items that will be sale on the website, the fees taken by PayPal or 2Checkout could be quite high. Also, there may be some limits on the size of orders using these services—check the websites for more information. If your father’s store already accepts credit cards via an existing merchant account, it may be better to link directly to that account.
#25 / Jan 04, 2008 7:52pm
Any have source example for one Shopping cart?
Because I am lost on how to do that :red:
Best regards
#26 / Jan 04, 2008 7:56pm
I don’t have anything concrete readily available—but the basic premise of a shopping cart is a rudimentary concept of storing items in a SESSION ID. Ofcourse, ecommerce is a complex beast, and we are far from having the ideal solution available out there as far as I’m concerned.
Your best bet would be to grab an open source solution such as Zen Cart or Magento and take a look at what the experts are doing for ideas.
HTH,
- sf
#27 / Oct 31, 2008 2:33pm
hi all,
this is my basic implementation of shopping cart.. i was inspired from an example that it’s on “professional codeigniter” book (by wrox), but i’ve added some improvements (add more products using only one request, remove only one item of the same product.. etc) and i used the library “db_session” for store all data session into database.. it’s very simple but i hope that can be useful for someone. if you have some ideas for improve this code.. 😉 thank you!
😊
<?php
/*
*
* Author: Valerio Giacomelli
* Email: v.giacomelli at ngi.it
* Web: <a href="http://www.neryo.com">http://www.neryo.com</a>
*
*/
class Cart_model extends Model{
function Cart_model(){
parent::Model();
$this->load->library('db_session');
}
function update_cart($product_id = NULL, $new_product = NULL, $count = 1){
if($product_id != NULL){
if(count($new_product)){
$total_price = 0.00;
$cart = $this->db_session->userdata('cart');
if(isset($cart[$product_id])){ // this product already exists
$old_product_qta = $cart[$product_id]['qta_prodotto'];
$old_product_name_ita = $cart[$product_id]['nome_prodotto_ita'];
$old_product_name_eng = $cart[$product_id]['nome_prodotto_eng'];
$old_product_price = $cart[$product_id]['prezzo_prodotto'];
$cart[$product_id] = array(
'nome_prodotto_ita' => $old_product_name_ita,
'nome_prodotto_eng' => $old_product_name_eng,
'prezzo_prodotto' => $old_product_price,
'qta_prodotto' => $old_product_qta + 1 //add 1 item of this product
);
$this->db_session->set_flashdata('cart_msg', 'Aggiornato qta. prodotto');
}else{
$cart[$product_id] = array(
'nome_prodotto_ita' => $new_product['nome_ita'],
'nome_prodotto_eng' => $new_product['nome_eng'],
'prezzo_prodotto' => $new_product['prezzo'],
'qta_prodotto' => $count // you can add more items of the same product
);
$this->db_session->set_flashdata('cart_msg', 'Aggiunto nuovo prodotto al carrello');
}
foreach($cart as $item){
$total_price += ($item['prezzo_prodotto'] * $item['qta_prodotto']);
}
$this->db_session->set_userdata('total_price', $total_price);
$this->db_session->set_userdata('cart', $cart );
}
}
}
function remove_item($product_id = NULL){
if($product_id != NULL){
$total_price = $this->db_session->userdata('total_price');
$cart = $this->db_session->userdata('cart');
if(isset($cart[$product_id])){
if($cart[$product_id]['qta_prodotto'] == 1){
unset($cart[$product_id]); //remove
$this->db_session->set_flashdata('cart_msg', 'Prodotto rimosso');
}else{
$cart[$product_id]['qta_prodotto'] -= 1; //remove 1 item
$this->db_session->set_flashdata('cart_msg', 'Aggiornata qta. prodotto');
}
$total_price = 0.00;
foreach($cart as $item){
$total_price += ($item['prezzo_prodotto'] * $item['qta_prodotto']);
}
}
$this->db_session->set_flashdata('cart_msg', 'Prodotto non in carrello');
$this->db_session->set_userdata('total_price', $total_price);
$this->db_session->set_userdata('cart', $cart);
}
}
function empty_cart(){
$this->db_session->sess_destroy();
}
}
?>