I may not have been clear in my previous post but I am stuck on this. Here is the code I am trying to get going.
Code:
function flat_option_valid() {
global $order, $db;
// for admin always true if installed
if (strstr($PHP_SELF, FILENAME_MODULES)) {
return true;
}
$products = $_SESSION['cart']->get_products();
$check_flag = true;
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
if ($products[$i]['STS_WillCallOnly'] == 1) {
$check_flag = false;
break;
}
}
return $check_flag;
}
I have a new column called STS_WillCallOnly in product_description. I added that column to the get_products() function but cannot get the value in the loop.
This function simply returns false if product in the cart has this flag set to true.
I have tried getting $products[$i]['id'] but that does not bring back anything. The loop works - I go through once for each item in the shopping cart so I beleive I am on the right track.
Bookmarks