Created
August 9, 2015 08:46
-
-
Save iledcom/c4caa0911058c2a26869 to your computer and use it in GitHub Desktop.
Drupal7 Commerce_product_load_multiple
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$product_array = array(); | |
foreach ($vars['field_product'] as $product) { | |
$product_array[] = $product['product_id']; | |
} | |
$products = commerce_product_load_multiple( | |
$product_array, | |
array("status"=>1) | |
); | |
// testing... | |
echo "<pre>"; | |
print_r($products); exit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment