Page 1 of 1

[REQUEST] How to add Product Id in Admin

Posted: Tue Jan 11, 2011 11:49 pm
by OnNets
I am using version 1.4.9.3

How do I add product id from the sql to the product in admin?

Thank you.

Re: [REQUEST] How to add Product Id in Admin

Posted: Wed Jan 12, 2011 12:52 am
by afwollis
please more detailed.
where in admin section you want to add product id?
or where you want it to be displayed.

Re: [REQUEST] How to add Product Id in Admin

Posted: Wed Jan 12, 2011 7:32 pm
by Marco75
Hi,

To display the ID in the list of products.

In admin/controller/catalog/product.php

Find:

Code: Select all

		$this->data['column_image'] = $this->language->get('column_image');
Add below:

Code: Select all

		$this->data['column_id'] = $this->language->get('column_id');
In admin/language/english/catalog/product.php

Find:

Code: Select all

// Column
Add below:

Code: Select all

$_['column_id']				 = 'ID';
In admin/view/template/catalog/product_list.tpl

Find:

Code: Select all

            <td class="center"><?php echo $column_image; ?></td>
Add below:

Code: Select all

			<td class="center"><?php echo $column_id; ?></td>
Find:

Code: Select all

          <tr class="filter">
            <td></td>
            <td></td>
Add below:

Code: Select all

            <td></td>
Find:

Code: Select all

            <td class="center"><img src="<?php echo $product['image']; ?>" alt="<?php echo $product['name']; ?>" style="padding: 1px; border: 1px solid #DDDDDD;" /></td>
Add below:

Code: Select all

            <td class="center"><?php echo $product['product_id']; ?></td>

Re: [REQUEST] How to add Product Id in Admin

Posted: Wed Jan 12, 2011 8:58 pm
by OnNets
This works perfectly. Thank you very much for your help. :)

Re: [REQUEST] How to add Product Id in Admin

Posted: Thu Jan 13, 2011 3:36 am
by Lao
I started using it today also, but in the form of a VQmod. If anyone wants the XML file he/she can download it bellow.

Re: [REQUEST] How to add Product Id in Admin

Posted: Sun Oct 16, 2011 5:18 pm
by bedo02
Hi. I would like to note - it works also with 1.4.8.
you can play with it further and find and duplicate all sort,filter,pd. "name" strings - rename it to "id" and you can create also fiter and sort options. It is preaty extensive so I can forward my files if someones interested :)

Re: [REQUEST] How to add Product Id in Admin

Posted: Thu Oct 27, 2011 4:52 am
by sparkz
would love to know more about sorting by ID as per the other original columns or as as im only selling '1 offs' im thinking it may just be easier to modify the Qty's column to display ID's?

Re: [REQUEST] How to add Product Id in Admin

Posted: Fri Dec 16, 2011 6:12 am
by teszine
Hi,
Can you show me how to make the ID column click-able like the Product name or Model column (click to sort ascending/descending) ?
Thank you.

Re: [REQUEST] How to add Product Id in Admin

Posted: Sat Jul 27, 2013 10:36 am
by byens
This is very good mods. I use it with add to cart via url. We need to know product id,

Further question, how to add product date added to this mod?

Thanks

Re: [REQUEST] How to add Product Id in Admin

Posted: Sun Jan 12, 2014 3:22 am
by naderbissani
bedo02 wrote:Hi. I would like to note - it works also with 1.4.8.
you can play with it further and find and duplicate all sort,filter,pd. "name" strings - rename it to "id" and you can create also fiter and sort options. It is preaty extensive so I can forward my files if someones interested :)
Can you please post how to add filtering to the product id column. Thanks !

Re: [REQUEST] How to add Product Id in Admin

Posted: Wed Jan 22, 2014 7:15 am
by nvedia
Just curious, why would someone want to see product ID(which is more for DB purpose) in admin?

Re: [REQUEST] How to add Product Id in Admin

Posted: Wed Jul 09, 2014 2:13 pm
by xlam
teszine wrote:Hi,
Can you show me how to make the ID column click-able like the Product name or Model column (click to sort ascending/descending) ?
Thank you.
I'm not programmer mybe i can help you. In admin/view/template/catalog/product_list.tpl
use this code

Code: Select all

<td class="center"><?php if ($sort == 'p.product_id') { ?>
<a href="<?php echo $sort_id; ?>" class="<?php echo strtolower($order); ?>"><?php echo $column_id; ?></a>
                <?php } else { ?>
                <a href="<?php echo $sort_id; ?>"><?php echo $column_id; ?></a>
                <?php } ?></td>
in admin/view/template/catalog/product_list.tpl
before

Code: Select all

$this->data['sort_name'] = $this->url->link('catalog/product', 'token=' . $this->session->data['token'] . '&sort=pd.name' . $url, 'SSL');
add this

Code: Select all

$this->data['sort_id'] = $this->url->link('catalog/product', 'token=' . $this->session->data['token'] . '&sort=p.product_id' . $url, 'SSL');	
works on oc 1.5.51

Re: [REQUEST] How to add Product Id in Admin

Posted: Sun Dec 25, 2016 7:04 pm
by odjiri
Marco75 wrote:Hi,
Thank you very much, Marco75! Works fine in 1.5.5.