Originally Posted by
kuroi
Had a quick look at the includes/classes/orders class and in particular at the get_products() function in there (about line 1050).
It does look as though the column you want is being extracted from the database at the beginning of the function, but not added to the products_array at the end.
You could try adding it and see if that makes it available to you.
I only have 1039 lines in my includes/classes/order.php file. Are you up-to-date?
Anyways, I looked at the line (427) and that's basically what I'm doing:
Code:
$products_array = $_SESSION['cart']->get_products();
for ($i=0; $i<count($products_array); $i++)
if (zen_get_product_is_always_free_shipping($products_array[$i]['id']) == false){
$this->_addItem ($products_array[$i][quantity],
$products_array[$i][final_price],
$products_array[$i][weight],
$products_array[$i][length],
$products_array[$i][width],
$products_array[$i][height],
$products_array[$i][model]."/".$products_array[$i][name],
$products_array[$i][ready_to_ship],
$products_array[$i][dim_type],
$products_array[$i][weight_type]); . . .
and then later I'm making a SOAP array
Code:
$params2 = array(
"Shipment"=>array(
"PackageInformation" =>array(
"PiecesInformation"=> array(
"Pieces[$i]"=>array(
"Weight"=>array(
"Value"=>$products_array[$i][weight] * SOMETHING_THAT_GETS_MY_MINIMUM_VALUE,
"WeightUnit"=>SOMETHING_FOR_WEIGHT_TYPE, . . .
stuff like that. But It will calculate the weight, but not for each box.
Does that help?
Bookmarks