Guest Posted March 20, 2007 Posted March 20, 2007 I am doing some modifications to my site & keep seeing this when working w/RMA & Ordering system. What exactly does this code below do? I think it might have to do with if the item is taxable or not, but not sure... if (sizeof($order->info['tax_groups']) > 1) { }else { }
vasttech Posted March 20, 2007 Posted March 20, 2007 I am unfamiliar with the RMA contribution, but the code you have below does nothing unless there is something between the {} before and after the else statements. Now if there is something there and you left it out of your post I can't tell you exactly what the code does, but the if statement is determining the size of the order->info[tax_groups] array to see if more then 1 tax group was charged on that particular order. To me it looks like someone had some debugging code put in the code and then took it out but left bits and pieces if that is all you are seeing on the line. There would never be more then one tax group for an order so the statement should always be false. osCommerce Knowledge Base osCommerce Documentation Contributions
Guest Posted March 21, 2007 Posted March 21, 2007 I am unfamiliar with the RMA contribution, but the code you have below does nothing unless there is something between the {} before and after the else statements. Now if there is something there and you left it out of your post I can't tell you exactly what the code does, but the if statement is determining the size of the order->info[tax_groups] array to see if more then 1 tax group was charged on that particular order. To me it looks like someone had some debugging code put in the code and then took it out but left bits and pieces if that is all you are seeing on the line. There would never be more then one tax group for an order so the statement should always be false. This code is in several stock oscommerce files & I took out the code between the {}'s since it isn't necessary to find out what that array is for. I know php & know that it is determining the size of the order->info[tax_groups] array, but what is that array used for?
Guest Posted March 21, 2007 Posted March 21, 2007 This code is in several stock oscommerce files & I took out the code between the {}'s since it isn't necessary to find out what that array is for. I know php & know that it is determining the size of the order->info[tax_groups] array, but what is that array used for? The array is used for the products tax groups because e-stores may group products some with different tax than others. So in the end the customer sees the proper tax percentage for each product. Why you think it isn't necessary?
vasttech Posted March 21, 2007 Posted March 21, 2007 This code is in several stock oscommerce files & I took out the code between the {}'s since it isn't necessary to find out what that array is for. I know php & know that it is determining the size of the order->info[tax_groups] array, but what is that array used for? Okay I am confused now (not hard to do this week). If "it isn't necessary to find out what that array is for" then why are you asking "what is that array used for?" And secondly, why remove the code in between the {} and leave the if statement? The if statement is not doing anything then anyway so why not just remove the whole thing? Trying to help, but just lost in what you are asking or what you are trying to do? osCommerce Knowledge Base osCommerce Documentation Contributions
Recommended Posts
Archived
This topic is now archived and is closed to further replies.