Hi,
I've implemented this mod with little hiccup... the order bit works but not the product bit. When I enter in my sku, my url gets translated to:-
https://www.womansworld.com.au/dev/xcart/admin/product_modify.php?search_id=D1429&search_types=1
I can see the url is wrong and the word admin should be the word provider. My code in include/product_modify.php is this:-
ini_set("memory_limit", "32M");
function get_productid($product_code) {
$category_query = db_query("SELECT productid FROM xcart_products WHERE productcode = '" . (int)$product_code . "'");
$category = mysql_fetch_array($category_query, MYSQL_ASSOC);
return $category['productid'];
}
if ($HTTP_POST_VARS['search_types'] == 1){
?>
<script type="text/javascript" language="JavaScript"><!--
setTimeout('Redirect()',500);
function Redirect()
{
location.href = '../provider/product_modify.php?productid=<?PHP echo get_productid($HTTP_POST_VARS['search_id']) ?>';
}
// --></script>
<?PHP
}elseif ($HTTP_POST_VARS['search_types'] == 2){
?>
<script type="text/javascript" language="JavaScript"><!--
setTimeout('Redirect()',500);
function Redirect()
{
location.href = '../provider/product_modify.php?productid=<?PHP echo $HTTP_POST_VARS['search_id'] ?>';
}
// --></script>
<?PHP
}
The code in my admin_head.tpl for the order bit is:-
{if $login ne ''}
<form action="product_modify.php"> Item ID:<input type="text" name="search_id"><input type="submit" value="find">
<input type="radio" id="search_types" name="search_types" value="1" checked="checked" />{$lng.lbl_sku}
<input type="radio" id="search_types" name="search_types" value="2" />PID
</form>
{/if}
I am not sure why I am getting a different url and how to fix it?