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

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

Serving Software Downloads in 976 Categories, Downloaded 30.067.929 Times

Webforce Cart 1.6

  Date Added: November 16, 2010  |  Visits: 4.094

Webforce Cart

Report Broken Link
Printer Friendly Version


Product Homepage
Download (128 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
WEBFORCE CART RELATED
Productivity  -  GoShop Free 1.0.0.0
The application which makes your life easier, you do not need any more paper and pen, the phone is always with you and so is the shopping list. "GoShop Free" is an application that helps you organize and manage your shopping lists using...
2 MB  
Lifestyle  -  MensaSpeiseplan 1.0.0.0
Display directly Menu of Mensa HU Sud in Berlin. After running this program, the Menu for today will be shown. Users can click on next or previous to see menu on other days. There also a "Search" button for removing any item you do not like to see...
1024 KB  
Network & Internet  -  Image Create for PHP 1.1.1
Image Create for PHP is a project which allows you to render text into an image on the fly. Image Create for PHP is a stand-alone script that allows you to create dynamic text images easily.. Get PHP Development tools at SourceForge.net. Fast,...
5.12 KB  
Web Site Promotion  -  ApPHP DataForm 1.0.1
PHP DataForm script is a simple tool for creating HTML Forms with ease. It was especially designed for web developers, who do not want to spend excessive time on creating Forms in HTML or through PHP, but want to use a first-class OOP backend....
352.11 KB  
Productivity  -  Everything Lite 1.3
Keep EVERYTHING in one place. Do everything with ONE TAP. ? Everything is a fast, simple and colorful list manager for to-dos, groceries and everything else. That includes wish, trip, cook, shopping, homework, meeting, book, movie,...
3.1 MB  
Network & Internet  -  SADTEC 0.7 Alpha
SADTEC is a kernel for Web applications. This means that you can build a template with TAL. You do not need to know anything about PHP just to create the XHTML template. The only thing you need to know from PHP is how to fill out variables. All...
102.4 KB  
Lifestyle  -  Closetaki (Free) 1.0.0.8
Your closet. Anywhere. Anytime. How many times: - have you been out shopping but you are not sure if the shirt you just found matches the color of the pants you have at home? - have you bought something but forgot to wear it because...
2 MB  
Social Networking  -  CHURCH REFORM AND REVITALIZATION 1.0.0.0
Mobile private network for CHURCH REFORM AND REVITALIZATION. The app is dynamically configurable and offers multiple modules such as Events, Meetings, Services, News, Chats, Contacts and a Member Directory. If you do not yet have a user name and...
1024 KB  
Social Networking  -  A BETTER WAY MINISTRIES INC 1.0.0.0
Mobile private network for A BETTER WAY MINISTRIES INC. The app is dynamically configurable and offers multiple modules such as Events, Meetings, Services, News, Chats, Contacts and a Member Directory. If you do not yet have a user name and...
1024 KB  
Social Networking  -  ABIDING IN THE VINE 1.0.0.0
Mobile private network for ABIDING IN THE VINE. The app is dynamically configurable and offers multiple modules such as Events, Meetings, Services, News, Chats, Contacts and a Member Directory. If you do not yet have a user name and password to...
1024 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.12.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...
2.73 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