Post by montanaflynn » Sun Dec 13, 2009 11:22 am

I am getting this error in my error log. Any ideas on how to troubleshoot and fix this?

2009-12-12 21:17:14 - PHP Notice: Undefined variable: action in /home/expressp/public_html/admin/view/template/catalog/product_form.tpl on line 10

User avatar
New member

Posts

Joined
Fri Oct 09, 2009 5:19 am

Post by Qphoria » Sun Dec 13, 2009 12:08 pm

what did you change?

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by montanaflynn » Sun Dec 13, 2009 12:56 pm

I added another input with the SEO keyword variable echo'ing in PHP. This is because I added a jQuery plugin to hyphenate the SEO phrase so it is easier to enter for staff. This could be avoided if OpenCart did this internally after the form was submitted with a script like this, but I have no idea how to implement it. I also added the import / export contribution, and changed other files in the view, but css, images and inline styles only.

My Changes to /admin/view/template/catalog/product_form.tpl

Code: Select all

 <tr>

<td><?php echo $entry_keyword; ?></td>

<td>	<input name="SEOword" id="SEOword" value="<?php echo $keyword; ?>" />
<input type="text" class="slug" name="keyword" value="<?php echo $keyword; ?>" /></td>

</tr>
Slug PHP function

Code: Select all

function slug($str)
{
	$str = strtolower(trim($str));
	$str = preg_replace('/[^a-z0-9-]/', '-', $str);
	$str = preg_replace('/-+/', "-", $str);
	return $str;
}

User avatar
New member

Posts

Joined
Fri Oct 09, 2009 5:19 am
Who is online

Users browsing this forum: No registered users and 35 guests