Skip to content

Instantly share code, notes, and snippets.

Created October 16, 2022 15:55
What would you like to do?
global $cookie;
include '../../config/';
include '../../config/';
include '../../config/';
include 'init.php';
// Id de producto
$id_product = 13;
$sql = Db::getInstance()->ExecuteS('SELECT p.id_product,
cl.link_rewrite as crewrite, pl.link_rewrite as prewrite, p.id_product
FROM '._DB_PREFIX_.'product p
INNER JOIN `'._DB_PREFIX_.'product_lang` pl ON
p.`id_product` = pl.`id_product`
INNER JOIN `'._DB_PREFIX_.'category_lang` cl ON
p.`id_category_default` = cl.`id_category`
WHERE p.`id_product` = '.$id_producto.'');
foreach($sql as $row){
echo "/".$row['crewrite']."/".$row['id_product']."-".$row['prewrite'].".html";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment