Killersites.com Homepage Welcome Guest   |   Register  |  Login
Login Name Password
  Search  
  Index  | Recent Threads  | Unanswered Threads  | Who's Online  | User List  | Help



Quick Go »

No member browsing this thread
Thread Status: Active
Total posts in this thread: 2
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 2202 times and has 1 reply Next Thread
Male dmp
Stranger




Joined: Oct 23, 2008
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Question for Jon Lebensold re Paypal Shopping Cart video 6.

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.

[Oct 23, 2008 2:18:55 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male Jonathan
Stranger




Joined: Mar 19, 2007
Post Count: 14
Status: Offline
Reply to this Post  Reply with Quote 
Re: Question for Jon Lebensold re Paypal Shopping Cart video 6.

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/
[Nov 17, 2008 8:29:20 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread