Main > Programming > Libraries >

Webforce Cart 1.6

Webforce Cart 1.6

Sponsored Links

Webforce Cart 1.6 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.003 MB
Platform: Any Platform
License: LGPL (GNU Lesser General Public License)
Price:
Downloads: 942
Date added: 2007-04-06
Publisher: Webforce Ltd

Webforce Cart 1.6 description

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.
Enhancements:
- The empty cart function was fixed.

Webforce Cart 1.6 Screenshot

Advertisements

Webforce Cart 1.6 Keywords

Bookmark Webforce Cart 1.6

Hyperlink code:
Link for forum:

Webforce Cart 1.6 Copyright

WareSeeker periodically updates pricing and software information of Webforce Cart 1.6 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Webforce Cart 1.6 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Zen Cart truly is the art of e-commerce; a free, user-friendly, open source shopping cart system. Free Download
OpenCrypt is the most flexible, customizable, powerful, secure and of course easy to use membership/user management software. Free Download
Web Site Robot is an easy to use Web site builder with a blog tool. Free Download
IdeaCart is an Open Source shopping cart based on PHP and MySQL Free Download
DB_cart Class is a MySQL shopping cart script that can be used with third party product catalogues and membership systems. Free Download
AFCommerce is a full and complete online store with both a storefront and administration area, which can be easily installed, configured, and maintained over a web-based interface. The source code is Free Download
Quick.Cart is a freeware and simple e-commerce solution designed for your own web shop administration. Free Download
Freeblisket provides a set of tools for creating e-commerce Web sites. Free Download