Jump to content

how to get product link


Recommended Posts

  • 3 months later...

you mean that you want to generate this link somehow from php? or what?

 

Yes, how to generate a link on product with some attribute (like http://localhost/prestashop02/index.php?id_product=1&controller=product&id_lang=1#/disk_space-16gb/color-yellow) in php module or in template file.

Link to comment
Share on other sites

  • 1 month later...

Hi this is exactly what I'm trying to.

 

We could copy this code from prestashop but it would be easier if there was a "getproductcombinatinlink in the prestashop API ?

 

 

 
for (var i in attributesCombinations)
        for (var a in tab_attributes)
            if (attributesCombinations[i]['id_attribute'] === tab_attributes[a])
                request += '/'+attributesCombinations[i]['group'] + '-' + attributesCombinations[i]['attribute'];
    request = request.replace(request.substring(0, 1), '#/');
Edited by ekimia (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...