Jump to content

Product feature value output language


soduno

Recommended Posts

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 by soduno (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...