Jump to content

getProductLink for combinations' product


Recommended Posts

hi, i'm trying to generate and list url of all combinations of a product....but it doesn't work!

i do this 

$prodottoFeed['link'] = $link->getProductLink($product->id, $product->link_rewrite, null, null, null, null, $combinazione['id_attribute'],Configuration::get('PS_REWRITING_SETTINGS'), false, true);

but generate an url that doesn't work

Link to comment
Share on other sites

it return url of product father and not correct url for every combinations; i have solved this: 

with this for product without combinations:

Context::getContext()->link->getProductLink( $product->id );

and for every combinations:

Context::getContext()->getProductLink($product, null, null, null, null, null, $combination['id_product_attribute']);

 

this work!

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...