soduno Posted November 12, 2015 Share Posted November 12, 2015 (edited) I am using Prestashop Webservice to retrieve all product features for a specific product in a loop. The issue I have is that when I get all the features like for example: id_feature_value, it is only giving me the id of the value not the actually name(obvious reasons in this case). Is there a way to print out the name instead of the ID without having to call all features and then join them together? Some example code: $opt = array('resource' => 'products', 'display' => 'full', 'limit' => 4); if (isset($_GET['id'])) $opt['id'] = $_GET['id']; $xml = $webService->get($opt); $resources = $xml->children()->children(); foreach($resources as $resource){ $associations = $resource->associations->product_features->product_features; $associations->id_feature_value; //Only ID $associations->id_feature_value->language[0]; //Have tried, but with no luck } Best, Simon Edited November 12, 2015 by soduno (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now