Post by OnNets » Tue Jan 11, 2011 11:49 pm

I am using version 1.4.9.3

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

Thank you.

New member

Posts

Joined
Wed Jan 06, 2010 5:53 pm

Post by afwollis » Wed Jan 12, 2011 12:52 am

please more detailed.
where in admin section you want to add product id?
or where you want it to be displayed.

Русское коммьюнити разработчиков OpenCart - myopencart.ru

some useful mods:
[Released] Orders and Comments AT-A-GLANCE, [Released] Prof. Invoice and Packingslip, [Released] Recently viewed

My commercial modules: [W]ebme Compare Products, [W]ebme Bought With This


Active Member

Posts

Joined
Tue Jan 11, 2011 5:41 am
Location - Ukraine

Post by Marco75 » Wed Jan 12, 2011 7:32 pm

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>

My version > 1.4.9.3


Newbie

Posts

Joined
Thu Oct 28, 2010 6:48 pm

Post by OnNets » Wed Jan 12, 2011 8:58 pm

This works perfectly. Thank you very much for your help. :)

New member

Posts

Joined
Wed Jan 06, 2010 5:53 pm

Post by Lao » Thu Jan 13, 2011 3:36 am

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.

I'm using Open Cart 1.5.4.1 on http://www.importpieseauto.ro


User avatar
Lao
Active Member

Posts

Joined
Tue Nov 23, 2010 3:31 pm
Location - Craiova, Romania

Post by bedo02 » Sun Oct 16, 2011 5:18 pm

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 :)

using oc 1.5.6


Newbie

Posts

Joined
Mon Oct 26, 2009 9:43 pm

Post by sparkz » Thu Oct 27, 2011 4:52 am

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?

Newbie

Posts

Joined
Thu Oct 27, 2011 4:23 am

Post by teszine » Fri Dec 16, 2011 6:12 am

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.

Newbie

Posts

Joined
Fri Dec 16, 2011 6:08 am

Post by byens » Sat Jul 27, 2013 10:36 am

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

Selling Kristik - Jasa Foto Aura - Jual Lingerie - supplier baju anak - jasa seo


Active Member

Posts

Joined
Sat Dec 11, 2010 12:29 pm
Location - Surabaya

Post by naderbissani » Sun Jan 12, 2014 3:22 am

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 !

Newbie

Posts

Joined
Sun Jan 12, 2014 3:21 am

Post by nvedia » Wed Jan 22, 2014 7:15 am

Just curious, why would someone want to see product ID(which is more for DB purpose) in admin?

Donate here to show support if you think I have helped you today!

Opencart Documentation


User avatar
Active Member

Posts

Joined
Sun May 22, 2011 12:54 pm

Post by xlam » Wed Jul 09, 2014 2:13 pm

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

Baju Muslim Baju Pria Baju Anak Baju Korea Sparepart Printer Baju Muslim JNE Surabaya


New member

Posts

Joined
Sun Dec 25, 2011 2:58 pm

Post by odjiri » Sun Dec 25, 2016 7:04 pm

Marco75 wrote:Hi,
Thank you very much, Marco75! Works fine in 1.5.5.

Newbie

Posts

Joined
Sun Dec 25, 2016 6:57 pm
Who is online

Users browsing this forum: No registered users and 13 guests