SiteMinder / Webhosting
The Computer Merchant, Ltd
US-MA-North Quincy

Justtechjobs.com Post A Job | Post A Resume

Comments for: jason_gilmore20080425

Message # 1510921:
Date: 02/19/09 11:04
By: J H
Subject: Try this

It would be more helpfull to format your addtocart by including a quantity desired input like so:

function addToCart($item, $count) {
if(isset($this->cart[$item])) {
$this->cart[$item]+= $count;
} else {
$this->cart[$item] = $count;
}
}

This way you can add 42 items to the array with one function call:

$cart->addToCart(3, 42);

Previous Message | Next Message


Comments:
Try thisJ H02/19/09 11:04
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.