Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.255.917 Times

Webforce Cart 1.6

  Date Added: November 16, 2010  |  Visits: 5.155

Webforce Cart

Report Broken Link
Printer Friendly Version


Product Homepage
Download (169 downloads)



Webforce Cart (wfCart) is a free PHP shopping cart class you can use a component of a PHP based online store. Its designed as a component for PHP developers who would rather write their own store rather than a complete solution. Instructions and examples for the free PHP Shopping Cart To use the cart in an existing script: Rename wfcart.php.txt to wfcart.php and upload to your server. Then include the file: include("wfcart.php"); Start the session, and assign the cart to it. NOTE: You must include the file wfcart.php before you start the session, its just the way PHP works. session_start(); $cart =& $_SESSION[cart]; if(!is_object($cart)) $cart = new wfCart(); Then you can use the functions like $cart->get_contents();, these functions are documented below. Adding an Item - $cart->add_item( code , quantity , price , info ) If you have a widget with code AB313 and a price of $40.11, you can add it to the cart with : $cart->add_item(AB313,1,40.11,Widget AB313 Standard); If the item AB313 is alreay in the cart, then the quantity of it will be increased by the quantity supplied to the function, in this case 1. The itemid must be unique, and can be letters and/or numbers. Deleting an Item - $cart->del_item( itemid ); E.g. to delete the item ID 123 $cart->del_item(123); Changing the quantity of an item - $cart->edit_item( itemid, new_quantity ); For example : $cart->edit_item(HA2,3); If you set the quanitity to zero, the item is deleted. Getting the number of items in a cart echo $cart->itemcount; Getting the total value of the cart. echo $cart->total; Emptying the cart $cart->empty_cart(); Getting the cart contents $items = $cart->get_contents(); $items is an array, so the following code displays the items. foreach($items as $item) { echo "Code/ID :".$item[id]." "; echo "Quantity:".$item[qty]." "; echo "Price :".$item[price]." "; echo "Info :".$item[info]." "; echo "Subtotal".$item[subtotal]." "; } Note, subtotal is quantity X price for that item, not a running total.. Extending Webforce Cart There are 2 functions you can create that will enable more flexability. One is wf_get_price( itemid, qty ). If you need to do pricing based on Quantity ( e.g. bulk discounts ) then you can create a function called wf_get_price to do what you need itto do. If you do not pass a price to add_item, then the wf_ get_price function will be called. If you use this functionality, AND your price is quantity dependant, then you must uncomment the line in the edit_item function. The other is wf_get_info, again, if you do not pass info to add_item then get_info will be called. TIP: you do not have to pass a string to add_item(), you could use an array of infomation instead. e.g. add_item( AS2112,5,19.95,array(size=>large,color=>red)); then when you use get_contents, you echo $item[info][color] etc. Whats New in This Release: - The empty cart function was fixed.. Webforce Cart ( aka wfCart ) is a free Shopping Cart class for PHP.

Requirements: No special requirements
Platforms: Linux
Keyword: Cart Echo Item Php Shopping Php Shopping Cart Php Shopping Cart Class Price Quantity Shopping Cart Use A Webforce Webforce Cart You Do Not
Users rating: 0/10

License: Freeware Size: 3.07 KB
USER REVIEWS
More Reviews or Write Review


WEBFORCE CART RELATED
Chat  -  PHP IRC Connection Class for Scripts 1.0
This script was written to provide PHP access to the IRC protocol.
10 KB  
Miscellaneous  -  PHP Typo Generation Class for Scripts 1.0
The Typo Generator Class is a php class that generates lists of common typos.Types of typos that can be produced with this are:- striking the wrong key thats near your intended key- missing a character when you type- a single transposition error-...
10 KB  
Programming  -  PHP Based SQL class 101
PHP base Sql class for any PHP project, simple to implement and use, wiki, docs, demo and help aval.
47.03 KB  
Database Tools  -  PHP MySQL Database Class 1.0
PHP MySQL Database Class can establish connections to a MySQL server and execute arbitrary SQL queries.Key Features of PHP MySQL Database Class:- Fetch query results into an array- Execute SELECT, INSERT, UPDATE and DELETE queries from parameters...
10 KB  
Database Tools  -  AJAX data listings engine 1.0
The system is written in PHP and can be used to list data in any mySQL table, all you do is specify the mySQL database details and the engine will automatically generate a data listings table as per the configuration. The system supports AJAX...
 
Database Tools  -  SQL class alfars 1.0
This PHP script SQL class alfars is designed to implement a very simple MySQL database access wrapper. A connection was established to a given MySQL server with this script, and then select the database to access, execute queries, return the...
10 KB  
Miscellaneous  -  Soraxdesign PHP Guestbook 3.2.5
The Soraxdesign PHP Guestbook is a simple PHP Guestbook with no MySQL database required, which offers a sophisticated administration to help you customize the PHP Guestbook completely with your needs, even though you are equipped with no knowledge...
389.12 KB  
Chat  -  PHP IRC Connection Class 1.1
This script was written to provide PHP access to the IRC protocol.
10 KB  
Database Tools  -  PHP MySQL Connection Class 1.0
This PHP class can access MySQL databases from PHP code. It features a very simple and easy to understand PHP syntax, allowing it to easily be called from any PHP application.Here are some Key Features of PHP MySQL Connection Class:-Establish...
143.36 KB  
Miscellaneous  -  phpDbObject 0.1
phpDbObject is a class to map an object to a database, written in PHP. It allows object relational mapping (ORM).
 
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB