Jump to content
Killersites Forums

esreekay

New Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About esreekay

  • Rank
    New member
  1. Create page parts */ /** * Return a string, containing list items for each product in cart * * @access public * @param * @return array */ public function create_cart() { // get products currently in cart $products = $this->get(); $data = ''; $form = ''; $total = 0; $data .= '<li class="header_row"><div class="col1">Product Name:</div><div class="col2">Procarb#:</div><div class="col3">Quantity:</div><div class="col4">Meal Price:</div><div class="col5">Total Price:</div></li
  2. Here are some edits I have been trying if you need a laugh. /** * Adds item to the cart * * @access public * @param int, int,int * @return null */ public function add($id, $num = 1, $pronum = 30) { // setup or retrieve cart $cart = array(); if (isset($_SESSION['cart'])) { $cart = $_SESSION['cart']; } // check to see if item is already in cart if (isset($cart[$id])) { // if item is in cart $cart[$id] = $cart[$id] + $num ; } else { // if item is not in cart $cart[$id] = $num && $pronum;
  3. Thanks very much for responding! I would like to integrate the Procarb# very much the same as the quantity number. I would like it to add to the cart session array, with a value of 30, by default when an item is added. Then, the user can update either value. One difference is that if a user adds the same product to the cart Id like to generate a new cart row so that a user would be able to submit one row of product A x Procarb# 30 x Quantity: 5. and another row of product A x Procarb# 20 x quantity 5. I think if I better understood the whole life cycle of the Quantity val
  4. I have been working with Ben Falk’s PHP shopping cart series and everything works very well. I am trying to slightly customize the cart array so that it includes a second multiplier value. I am planning to use this cart to place meal orders for a fitness and food service. As part of the service, a customer inputs their Procarb# in order to determine the serving size of their meal based on their lean body mass. So the array of numbers in the cart row that determines the total would be unit price x Procarb# x Quantity: I know that this is doable but I am having a hard time making this
×
×
  • Create New...