|
| Index | Recent Threads | Unanswered Threads | Who's Online | User List | Help |
|
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 2
|
|
| Author |
|
|
Stranger Joined: Oct 23, 2008 Post Count: 1 Status: Offline |
Hi Jon I've been going thru your Paypal Shopping Cart video tutorial and I have a beginner's question re: video 6. In ShoppingCart.php you start at the top of the class ShoppingCart with protected $items - array(); As most of the functions are based on $product_id or $product, what role does introducing $items to the class have? Where does $items gain/reference its values? If those values come from the other side of the equation i.e. array(), where does array() get its values from? Please excuse painful ignorance ... Kind regards and thanks for helpful guidance. |
||
|
|
Stranger Joined: Mar 19, 2007 Post Count: 14 Status: Offline |
Hi dmp, we store all the items that a user has added to their cart in the $items array. So once we get to the checkout page, we use that variable to print out the line items before sending our user off to PayPal. Best Regards, - Jon ---------------------------------------- ---- Need a hand with a PHP Shopping Cart? Check out my PHP video tutorials - http://www.killerphp.com/tutorials/shopping-cart-tutorial/ |
||
|
|
|
|
|
Current timezone is GMT Mar 20, 2010 4:55:26 PM |