Post by MAD King » Sun Jul 30, 2017 12:15 am

Hi,

does anyone know how to add the SKU's to the admin products header for each product?

Thank you

OC Version 2.3.0.2
SKU.jpg

Admin Product Header - SKU.jpg (17.68 KiB) Viewed 1968 times


New member

Posts

Joined
Wed Nov 19, 2014 10:55 pm

Post by IP_CAM » Sun Jul 30, 2017 3:08 am

Well, only this free Extension seems to exist for OC-2, and it will not function on v.2.3.x Versions,
as it comes by default:
---
Add SKU to Admin Product List
https://www.opencart.com/index.php?rout ... n_id=30412
---
So, I created a VqMod and an OcMod out of it, by comparing SEARCH Anchor/Tag-Lines
with a 2.3.0.2 Version Code. But since I cannot test them, I leave it to you, to find out, if I missed
somewhere or not ! :D
But you don't need to install both of them, :D and if you use VqMod already, it's easier to use the VqMod,
in order to find errors, and/or uninstall it again, if some errors exist, wich cannot be fixed by you. All error
messages are activated, so, it should be easy, to find out, what eventually not yet works.
No further assistance possible, since I have no running Version 2.3.x !
Good Luck ! ;)
Ernie

File fixed according the Comment below:
Last edited by IP_CAM on Mon Jul 31, 2017 5:23 am, edited 3 times in total.

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by MAD King » Sun Jul 30, 2017 3:34 am

Hi Ernie,

thank you so much for your help.
I found the same extension before and tried it. Did not work.
Your modifications:

vqmod wont let me install and ocmod gives me this error:

Attachments

error.jpg

Error - error.jpg (56.08 KiB) Viewed 1945 times


New member

Posts

Joined
Wed Nov 19, 2014 10:55 pm

Post by IP_CAM » Sun Jul 30, 2017 3:45 am

OOOOOPS, sorry forgot to add a ] in two places ! :crazy:
One good reason, to always leave error messages ON.
Download the above ZIP File again and test it!
But ONLY use either one of those files, the VqMod titled File as VqMod
and the OcMod-titled File as OcMod ! And the VqMod has not to be
installed, but only to be uploaded by FTP into the VqMod/XML/... Sub to work.
And then, an OcMod + VqMod Cache Reset needs to be made, to enable
latest File Content Display !
Ernie

PC Will be gone for a few hours, need to take care of my business! :D

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by MAD King » Sun Jul 30, 2017 9:59 pm

Damn, Ernie, it works. Tested the ocmod only.
You should add it to the extensions download list.
I came across a lot requests about that when I searched for a solution.

Vielen Dank für Deine Hilfe. (Spreche Deutsch)

New member

Posts

Joined
Wed Nov 19, 2014 10:55 pm

Post by IP_CAM » Sun Jul 30, 2017 10:12 pm

Good for you ! :D But it was more just an attempt, to find out, since I am not
working with V-2 Versions anymore for some time already, and I removed my
v-2 contributions from the extension Section some time ago. But I informed the
Creator of the Mod I used, that he can add it to it's Version, if he cares.
Viel Glück !
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by IP_CAM » Mon Jul 31, 2017 5:30 am

Well, I just found another glitch, by plain accident ! I swear, never again to write
an extension without beeing able to check on, how it works ! ::)
<<
VqMod Line 48 - OcMod Line 49:

Code: Select all

<search position="replace"><![CDATA[<<td class="text-center" colspan="8"><?php echo $text_no_results; ?></td>]]></search>
instead of:

Code: Select all

<search position="replace"><![CDATA[<td class="text-center" colspan="8"><?php echo $text_no_results; ?></td>]]></search>
I already updated above zipped Extensions!
So, de-install the existing OcMod, then, reset OcMod/VqMod(if exist), install the latest one again,
reset-clear the system a second time, and check again!

An NOT FOUND Error should have been NOTED in the OcMod Log as well, I assume,
better always check there as well, after you installed something by OcMod !
Sorry :'(
blind duck Ernie
---
Image

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by MAD King » Mon Jul 31, 2017 6:19 am

I re-installed it, but I do not see any difference. It looks and functions the same.

New member

Posts

Joined
Wed Nov 19, 2014 10:55 pm

Post by IP_CAM » Mon Jul 31, 2017 7:42 am

it only would have (NOT) appeared under certain conditions ! ;)

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by MAD King » Mon Jul 31, 2017 7:58 am

lol I have these "certain conditions"

New member

Posts

Joined
Wed Nov 19, 2014 10:55 pm

Post by Mountune » Tue Sep 18, 2018 5:07 pm

Hello IP_CAM,

I cant seem to find the download for this which works with OC2.3.0.2 on your GitHub or on this page (unless I am being blind?)

The link to the original states it doesn't work with 2.3.0.2 so I guess it hasn't been updated by the original creator?

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


Active Member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by xxvirusxx » Tue Sep 18, 2018 7:08 pm

Show SKU...without filter :)

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Mountune » Thu Sep 20, 2018 6:08 pm

xxvirusxx wrote:
Tue Sep 18, 2018 7:08 pm
Show SKU...without filter :)
Sadly this didn't work for me on v2.3.0.2

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


Active Member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by IP_CAM » Thu Sep 20, 2018 9:37 pm

try this one: ( v.2.3.0.2, matches default Code, but untested! )

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Show SKU Product List Admin</name>
<code>show_sku_product_list_admin</code>
<version>1.0</version>
<author>xxvirusxx</author>

<file path="admin/controller/catalog/product.php">
<operation error="log">
<search><![CDATA['model'      => $result['model'],]]></search>
<add position="before"><![CDATA[
	'sku'      => $result['sku'],
]]></add>
</operation>

<operation error="log">
<search><![CDATA[$data['column_model'] = $this->language->get('column_model');]]></search>
<add position="before"><![CDATA[
	$data['column_sku'] = $this->language->get('column_sku');
]]></add>
</operation>
</file>

<file path="admin/language/*/catalog/product.php">
<operation error="log">
<search><![CDATA[$_['column_model']]]></search>
<add position="before"><![CDATA[
	$_['column_sku']           = 'SKU';
]]></add>
</operation>
</file>

<file path="admin/view/template/catalog/product_list.tpl">
<operation error="log">
<search><![CDATA[<label class="control-label" for="input-model"><?php echo $entry_model; ?></label>]]></search>
<add position="before"><![CDATA[
	<div class="form-group">
	<label class="control-label" for="input-sku"><?php echo $entry_sku; ?></label>
	<input type="text" name="filter_sku" value="<?php echo $filter_sku; ?>" placeholder="<?php echo $entry_sku; ?>" id="input-sku" class="form-control" />
	</div>
]]></add>
</operation>

<operation error="log">
<search><![CDATA[<td class="text-left"><?php if ($sort == 'p.model') { ?>]]></search>
<add position="before"><![CDATA[
	<td class="text-left"><?php echo $column_sku; ?></td>
]]></add>
</operation>

<operation error="log">
<search><![CDATA[<td class="text-left"><?php echo $product['model']; ?></td>]]></search>
<add position="before"><![CDATA[
	<td class="text-left"><?php echo $product['sku']; ?></td>
]]></add>
</operation>

<operation error="log">
<search><![CDATA[<td class="text-center" colspan="8"><?php echo $text_no_results; ?></td>]]></search>
<add position="replace"><![CDATA[
	<td class="text-center" colspan="9"><?php echo $text_no_results; ?></td>
]]></add>
</operation>
</file>

</modification>

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 206 guests