How do i cycle through shopping cart item ids?
Hello All,
I've been using eCart for a while now and have finally come across the need to count how many times a specific id (or array of ids) exists in the shopping cart.
I think i know what i need to do, i just do know how to cycle through the item id's in the shopping cart.
I plan to use something along the lines of
$sausage_ids = array("1001","1002",1003",1004");
$prepaid_sausage = $customer_account['prepaid_sausages'];
$sausage_count = 0;
do{
if($shopping_cart_item in_array($sausage_ids)) $sausage_count ++;
}while(I DON'T KNOW WHAT TO PUT HERE TO CYCLE THROUGH SHOPPING CART ITEMS);
if($sausage_count <= $prepaid_sausage){
//do something
}
else{
//do something else
}
I tried to search the board to find the answer, but did not succeed.
Thank you to whoever can provide me the answer!
-Sam