Created
August 18, 2015 12:05
-
-
Save iledcom/33bbb91ce933c74b9915 to your computer and use it in GitHub Desktop.
Drupal7 get product_id
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
<?php | |
foreach ($node->field_product['und'] as $key => $product_array) { | |
if ( !empty($product_array) ) { | |
$product = commerce_product_load($product_array['product_id']); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment