wiseprt Posted December 7, 2016 Share Posted December 7, 2016 Hello, I'm developing a custom module for csv creation and i want to get the exaclty url of the product with its combination (e.g domain.com/product/158#/37-size-small/46-color-blue) in order when someone copy/paste this url to go to the specific product with the right combinations and not in the default one. How i can do something like that? Please help guys. Thank you all. Best Regards 1 Link to comment Share on other sites More sharing options...
delmed Posted April 27, 2017 Share Posted April 27, 2017 Hi. Did you find a solution please? Thanks Link to comment Share on other sites More sharing options...
danirub Posted August 13, 2019 Share Posted August 13, 2019 Any solution?? Link to comment Share on other sites More sharing options...
danirub Posted August 20, 2019 Share Posted August 20, 2019 Wow. I’m in a shock that this is the he Response that people get here. this is a good Question and no one can Respond? Link to comment Share on other sites More sharing options...
carlos.batista Posted July 23, 2020 Share Posted July 23, 2020 Hola, tambien yo estaba buscando una solucion este caso particular para un modulo personalizado y como no encontre informacion al respecto cree una pequeña funcion que permite obtener el url de una Combinacion utilizando la funcion original de prestashop para crear el link de un producto yo la ubique al final de la clase Link para hacer la prueba pero lo ideal es hacer un override y ponerla en su respectiva carpeta. si la van a utilizar fuera de la classe Link bastaria con llamar $this->context->link->getProductLink($id_product,null,null,null,null,null,$id_product_attribute,false,false,true); en mi caso la puse dentro de la clase Link porque me permite llamarla directamente desde un template .tpl de la siguiente forma {$link->getCombinationLink($product->id,$attr_id)} public function getCombinationLink($id_product, $id_product_attribute){ return $this->getProductLink($id_product,null,null,null,null,null,$id_product_attribute,false,false,true); } espero sea de ayuda 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