Post by jeya » Wed Mar 23, 2011 8:32 pm

Hi I am new to opencart system here
kinda lost with the file structures and which set of files to be modified

I have basic to intermediary knowledge in php and have a lot of patience to try & learn :)

As the topic states, i would like to sort & search my clients by telephone number within my customer list

I assume the files to edit are,

customer_list.tpl - to add extra column

Code: Select all

<td class="left"><?php if ($sort == 'c.telephone') { ?>
              <a href="<?php echo $sort_telephone; ?>" class="<?php echo strtolower($order); ?>"><?php echo $column_telephone; ?></a>
              <?php } else { ?>
              <a href="<?php echo $sort_telephone; ?>"><?php echo $column_telephone; ?></a>
              <?php } ?></td>
\admin\language\english\sale\customer.php

Code: Select all

//column
$_['column_telephone']		  = 'Telephone No';
\admin\view\template\sale\customer_form.tpl

Code: Select all

<tr>
              <td><span class="required">*</span> <?php echo $entry_telephone; ?></td>
              <td><input type="text" name="telephone" value="<?php echo $telephone; ?>" />
                <?php if ($error_telephone) { ?>
                <span class="error"><?php echo $error_telephone; ?></span>
                <?php  } ?></td>
</tr>
\admin\model\sale\customer.php

Code: Select all

(within public function)
if (isset($data['telephone']) && !is_null($data['telephone'])) {
			$implode[] = "c.telephone = '" . $this->db->escape($data['telephone']) . "'";
		}


so what did I do wrong?

error msg

Notice: Undefined variable: column_telephone in /public_html/shop/admin/view/template/sale/customer_list.tpl on line 29


please do enlighten me

thank you in advance

jeya
Last edited by jeya on Fri Mar 25, 2011 4:58 pm, edited 1 time in total.

Newbie

Posts

Joined
Wed Mar 23, 2011 7:16 pm

Post by jeya » Wed Mar 23, 2011 8:33 pm

where do I execute or place the sql query to?, kinda lost here
i think thats what I am doing wrong after all

Newbie

Posts

Joined
Wed Mar 23, 2011 7:16 pm

Post by bryanling » Mon Jan 27, 2014 12:01 pm

pump this up, i need the solutions as well, thanks !

Newbie

Posts

Joined
Tue Feb 14, 2012 10:22 am
Who is online

Users browsing this forum: No registered users and 74 guests