Created
October 3, 2016 15:42
-
-
Save Tigatok/6be12a4fdaebd752f7e2f3cf5fa95bac to your computer and use it in GitHub Desktop.
This file contains 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
$test = drupal_lookup_path('source','upgrade'); | |
$upgrade_node_id = explode('/', $test)[1]; | |
$upgrade_node = node_load($upgrade_node_id); | |
$upgrade_node_entity_wrapper = entity_metadata_wrapper('node', $upgrade_node); | |
$upgrade_products = $upgrade_node_entity_wrapper->field_product->value(); | |
$proudct_ids = []; | |
foreach($upgrade_products as $upgrade_product){ | |
$proudct_ids[] = $upgrade_product->sku; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment