#include <shoppingCart.hpp>


Public Member Functions | |
| uiShoppingCart (cgiScript &in) | |
| virtual | ~uiShoppingCart () |
| void | stats (void) |
| bool | UpdateProduct (string productId, string productCount="1", string productOptions="", string productData="", int node=0) |
| bool | AlwaysAddProduct (string productId, string productCount="1", string productOptions="", string productData="", int stock=1) |
| bool | AddProduct (string productId, string productCount="1", string productOptions="", string productData="", int stock=1) |
| bool | RemoveProduct (string productId) |
| bool | CheckOut (void) |
| bool | CancelOrder (void) |
| uiShoppingCart (cgiScript &in) | |
| virtual | ~uiShoppingCart () |
| void | stats (void) |
| bool | UpdateProduct (string productId, string productCount="1", string productOptions="", string productData="", int node=0) |
| bool | AlwaysAddProduct (string productId, string productCount="1", string productOptions="", string productData="", int stock=1) |
| bool | AddProduct (string productId, string productCount="1", string productOptions="", string productData="", int stock=1) |
| bool | RemoveProduct (string productId) |
| bool | CheckOut (void) |
| bool | CancelOrder (void) |
Public Attributes | |
| cgiScript & | script |
| cgiCookie | cookie |
| int | items |
| cgiScript & | script |
Private Member Functions | |
| bool | addNewCart (void) |
| bool | addNewCart (void) |
Definition at line 78 of file shoppingCart.hpp.
| uiShoppingCart::uiShoppingCart | ( | cgiScript & | in | ) | [inline] |
Definition at line 103 of file shoppingCart.hpp.
References addNewCart(), ShoppingCart::Checked_Out, cgiEnvironment::ClientArguments(), cookie, cgiCookie::get(), read_write_base::get_data(), read_write_base::key(), script, cgiCookie::set(), and cgiCookie::setPath().
| virtual uiShoppingCart::~uiShoppingCart | ( | ) | [inline, virtual] |
Definition at line 136 of file shoppingCart.hpp.
| uiShoppingCart::uiShoppingCart | ( | cgiScript & | in | ) | [inline] |
Definition at line 103 of file shoppingCart.hpp.
References addNewCart(), ShoppingCart::Checked_Out, cgiEnvironment::ClientArguments(), cookie, cgiCookie::get(), read_write_base::get_data(), read_write_base::key(), script, cgiCookie::set(), and cgiCookie::setPath().
| virtual uiShoppingCart::~uiShoppingCart | ( | ) | [inline, virtual] |
Definition at line 136 of file shoppingCart.hpp.
| bool uiShoppingCart::addNewCart | ( | void | ) | [inline, private] |
Definition at line 81 of file shoppingCart.hpp.
References ocString::append(), ShoppingCart::chMap, cookie, read_write_base::db_action(), ShoppingCart::Id, cgiCookie::set(), and cgiCookie::setPath().
Referenced by uiShoppingCart().
| void uiShoppingCart::stats | ( | void | ) | [inline] |
Definition at line 142 of file shoppingCart.hpp.
References xmlNode::attr, items, xmlNode::name, xmlParser::nodeList(), ocGenericParser::parse(), and ShoppingCart::XML.
Referenced by main().
| bool uiShoppingCart::UpdateProduct | ( | string | productId, | |
| string | productCount = "1", |
|||
| string | productOptions = "", |
|||
| string | productData = "", |
|||
| int | node = 0 | |||
| ) | [inline] |
Definition at line 174 of file shoppingCart.hpp.
References ocString::append(), xmlNode::attr, ShoppingCart::chMap, read_write_base::db_action(), ShoppingCart::Id, ShoppingCart::Last_Access, time_date::now(), and ShoppingCart::XML.
Referenced by main().
| bool uiShoppingCart::AlwaysAddProduct | ( | string | productId, | |
| string | productCount = "1", |
|||
| string | productOptions = "", |
|||
| string | productData = "", |
|||
| int | stock = 1 | |||
| ) | [inline] |
Definition at line 246 of file shoppingCart.hpp.
References ocString::append(), xmlNode::attr, ShoppingCart::chMap, cgiEnvironment::ClientArguments(), cgiInput::count(), xmlNode::data, read_write_base::db_action(), ShoppingCart::Id, ShoppingCart::Last_Access, xmlNode::monopole, xmlNode::name, time_date::now(), script, and ShoppingCart::XML.
Referenced by AddProduct(), and main().
| bool uiShoppingCart::AddProduct | ( | string | productId, | |
| string | productCount = "1", |
|||
| string | productOptions = "", |
|||
| string | productData = "", |
|||
| int | stock = 1 | |||
| ) | [inline] |
AddProduct() this version of add product, will look for an existing product id and increment the stock count. It will also overwrite options and data, if there are any passed. 0 length options or data will not null existing data. You can effectively null by passing a space character. The far end should interpret a space as nothing to be concerned about. If no such product by the given productId exists, this method will add it. returns true if update to cart succeeded
Definition at line 308 of file shoppingCart.hpp.
References AlwaysAddProduct(), ocString::append(), ShoppingCart::chMap, cgiEnvironment::ClientArguments(), cgiInput::count(), read_write_base::db_action(), xmlParser::emit(), xmlParser::findFirstNodeByAttribute(), ShoppingCart::Id, ShoppingCart::Last_Access, xmlParser::nodeList(), time_date::now(), ocGenericParser::parse(), script, and ShoppingCart::XML.
Referenced by main().
| bool uiShoppingCart::RemoveProduct | ( | string | productId | ) | [inline] |
Definition at line 375 of file shoppingCart.hpp.
References ocString::append(), ShoppingCart::chMap, read_write_base::db_action(), xmlParser::emit(), xmlParser::findFirstNodeByAttribute(), ShoppingCart::Id, ShoppingCart::Last_Access, xmlParser::nodeList(), time_date::now(), ocGenericParser::parse(), script, and ShoppingCart::XML.
Referenced by main().
| bool uiShoppingCart::CheckOut | ( | void | ) | [inline] |
Definition at line 414 of file shoppingCart.hpp.
References ShoppingCart::Checked_Out, ShoppingCart::chMap, and read_write_base::db_action().
Referenced by virtualCheckout::createOrderPanel().
| bool uiShoppingCart::CancelOrder | ( | void | ) | [inline] |
Definition at line 421 of file shoppingCart.hpp.
References ShoppingCart::chMap, read_write_base::db_action(), and ShoppingCart::XML.
| bool uiShoppingCart::addNewCart | ( | void | ) | [inline, private] |
Definition at line 81 of file shoppingCart.hpp.
References ocString::append(), ShoppingCart::chMap, cookie, read_write_base::db_action(), ShoppingCart::Id, cgiCookie::set(), and cgiCookie::setPath().
| void uiShoppingCart::stats | ( | void | ) | [inline] |
Definition at line 142 of file shoppingCart.hpp.
References xmlNode::attr, items, xmlNode::name, xmlParser::nodeList(), ocGenericParser::parse(), and ShoppingCart::XML.
| bool uiShoppingCart::UpdateProduct | ( | string | productId, | |
| string | productCount = "1", |
|||
| string | productOptions = "", |
|||
| string | productData = "", |
|||
| int | node = 0 | |||
| ) | [inline] |
Definition at line 174 of file shoppingCart.hpp.
References ocString::append(), xmlNode::attr, ShoppingCart::chMap, read_write_base::db_action(), ShoppingCart::Id, ShoppingCart::Last_Access, time_date::now(), and ShoppingCart::XML.
| bool uiShoppingCart::AlwaysAddProduct | ( | string | productId, | |
| string | productCount = "1", |
|||
| string | productOptions = "", |
|||
| string | productData = "", |
|||
| int | stock = 1 | |||
| ) | [inline] |
Definition at line 246 of file shoppingCart.hpp.
References ocString::append(), xmlNode::attr, ShoppingCart::chMap, cgiEnvironment::ClientArguments(), cgiInput::count(), xmlNode::data, read_write_base::db_action(), ShoppingCart::Id, ShoppingCart::Last_Access, xmlNode::monopole, xmlNode::name, time_date::now(), script, and ShoppingCart::XML.
| bool uiShoppingCart::AddProduct | ( | string | productId, | |
| string | productCount = "1", |
|||
| string | productOptions = "", |
|||
| string | productData = "", |
|||
| int | stock = 1 | |||
| ) | [inline] |
AddProduct() this version of add product, will look for an existing product id and increment the stock count. It will also overwrite options and data, if there are any passed. 0 length options or data will not null existing data. You can effectively null by passing a space character. The far end should interpret a space as nothing to be concerned about. If no such product by the given productId exists, this method will add it. returns true if update to cart succeeded
Definition at line 308 of file shoppingCart.hpp.
References AlwaysAddProduct(), ocString::append(), ShoppingCart::chMap, cgiEnvironment::ClientArguments(), cgiInput::count(), read_write_base::db_action(), xmlParser::emit(), xmlParser::findFirstNodeByAttribute(), ShoppingCart::Id, ShoppingCart::Last_Access, xmlParser::nodeList(), time_date::now(), ocGenericParser::parse(), script, and ShoppingCart::XML.
| bool uiShoppingCart::RemoveProduct | ( | string | productId | ) | [inline] |
Definition at line 375 of file shoppingCart.hpp.
References ocString::append(), ShoppingCart::chMap, read_write_base::db_action(), xmlParser::emit(), xmlParser::findFirstNodeByAttribute(), ShoppingCart::Id, ShoppingCart::Last_Access, xmlParser::nodeList(), time_date::now(), ocGenericParser::parse(), script, and ShoppingCart::XML.
| bool uiShoppingCart::CheckOut | ( | void | ) | [inline] |
Definition at line 414 of file shoppingCart.hpp.
References ShoppingCart::Checked_Out, ShoppingCart::chMap, and read_write_base::db_action().
| bool uiShoppingCart::CancelOrder | ( | void | ) | [inline] |
Definition at line 421 of file shoppingCart.hpp.
References ShoppingCart::chMap, read_write_base::db_action(), and ShoppingCart::XML.
Definition at line 99 of file shoppingCart.hpp.
Referenced by AddProduct(), AlwaysAddProduct(), RemoveProduct(), and uiShoppingCart().
Definition at line 99 of file shoppingCart.hpp.
1.5.5