I am using an open-source shopping cart that uses class objects for the cart functionality. I need to customize the object to add more information to the item selected.
My question isnt really about changing the class object (at least I hope I can go through the code to make the changes) but about generating the additional data.
on my product details page I have an anchor tag that will pass the product id. Also on the page I have inputed information about personalizing the product.
What I need is help taking the inputed information and adding it to an array variable that will be passed with the product_id when the anchor tag is clicked.
<a href="add_cart.php?id=<?=$prod->id?>?personalize=(the array variable)>.....
Is there away to create the array possibly in a function that is called when the anchor tag is clicked. Also do arrays accept null values? If I write a conditional statement will this work to handle null values.
if(!$variable == null){
array[]=$variable;
}
thx in advance,
Alex