If you print_r($products) from the catalog/Shopping_cart.php... that is the array I'm trying to work with... only from the catalog/includes/classes/Shopping_cart.php.
What I'm trying to do is look for a product that is duplicating under two contributions conflicting, and if its already in the cart then dont update the $product_array in catalog/includes/classes/Shopping_cart.php... if it isnt already there, go ahead and add to $products_array.
for some reason, I've tried using $this->contents, $products and $products_array direct in a double nested foreach to place me on the correct layer then check a value is in_array and I'm either recieving errors saying - sucha thing was expecting and array, something is NULL... or my test IF statements return false where the obviously should be returning true and not a lot is happening --- now --- I've tested all the code on a blank php file where I've printed the array and manually included it - an EXACT match from the print_r.. IT ALL WORKS!!!.. put code into oscommerce, and NOTHING..
I have used ints against my variables at various points to test where the problem lies.. It's definately due to me not calling the correct product array properly.
Could somebody please please help! just try print_r($products) on your catalog/Shopping_cart.php.. THATS THE ARRAY I WANT... how do I retrieve THAT data from catalog/includes/classes/Shopping_cart.php? I NEED THE FULL CART CONTENTS to chack if particular values exist... thats it! why is this so difficult?
I hope this isnt complicated
Thanks in advance
Martin









