Hi there, this is my URL:
http://www.tweewielersite.nl/tweewielersite/sendtoafriend-form.php?id_product=http://www.tweewielersite.nl/tweewielersite/102-sparta-e-motion-damesfiets.html
function hookExtraLeft($params)
{
global $cookie, $link, $smarty;
/* Product informations */
$product = new Product(intval(Tools::getValue('id_product')), false, intval($cookie->id_lang));
$productLink = $link->getProductLink($product->id, $product->link_rewrite);
$smarty->assign('productLink', parse_url($productLink,PHP_URL_QUERY));
// $productLink = preg_replace("/[^\/]*$/","",$productLink);
$productLink = preg_replace("/http://www.tweewielersite.nl/tweewielersite/$","",$productLink);
print_r($productLink);
$smarty->assign(array(
'this_path' => $this_path,
'product' => $product,
'productLink' => $productLink
));
<li><a href="{$this_path}sendtoafriend-form.php?id_product={$productLink}"><IMG SRC="{$img_dir}zoom04.png" ALIGN="middle" WIDTH="25" HEIGHT="25" BORDER="0" ALT="Email dit artikel aan vriend(in)"><span class="discount" style="font-size:11px;"> {l s='Email dit artikel aan vriend(in)' mod='sendtoafriend'}</a></li>
How can I remove the second URL part from my URL:
http://www.tweewielersite.nl/tweewielersite/sendtoafriend-form.php?id_product=http://www.tweewielersite.nl/tweewielersite/102-sparta-e-motion-damesfiets.html
Can someone help me to fix the code for me please....
THX from the Netherlands...