Send to friend fix
I noticed on the latest version of the smart urls i used printed the dynamic url in the email body, but when clicked loaded the smart url version of the address.
This looked weird to me so I created a simple mode to change how the url is passed to the send to friend action.
This mod will store the current url via php and store it as a smarty variable. Then it creates an additional hidden form variable to store the url variable and pass it to the send2friend mail template, where you will be able to print the actual url as the text and url.
----------------
Send to Friend XC SEO Mod
tested on X-cart v4.1.
product.php
Add:
// find out the domain:
$domain = $_SERVER['HTTP_HOST'];
// find out the path to the current file:
$path = $_SERVER['SCRIPT_NAME'];
// find out the QueryString:
$queryString = $_SERVER['QUERY_STRING'];
$current_url = "http://" . $domain . $_SERVER['REQUEST_URI'];
$smarty->assign("url",$current_url);
Before:
func_display("customer/home.tpl",$smarty);
skin1/customer/main/send_to_friend.tpl
Add:
<input type="hidden" name="productlink" value="{$url}" />
After:
<input type="hidden" name="productid" value="{$product.productid}" />
send_to_friend.php
Add:
$mail_smarty->assign ("url", $productlink);
After:
$mail_smarty->assign ("name", $name);
Skin1/mail/html/send2friend.tpl
Add:
<a href="{$url}">{$url}</a><br />
__________________
v4.1.8 GOLD
|