Post by squeaky » Fri Apr 16, 2010 10:39 pm

OC 1.4.6

I am trying my hardest to add this feature to my admin. I need to have my product list sortable by manufacturer. I am hacking my way thru the code to make this happen. I am fairly new to PHP. I have been working with classic ASP for 15 years.

I am using another similar module as a guide, the mod (admin_product_filter_by_category) sorts the admin's product list by category. I need it by manufacurer (admin_product_filter_by_category http://www.opencart.com/index.php?route ... ion_id=439 )

So I have tried to make the similar changes in related files to get a combo box of the manufactures on the product list page.

I am so close to getting it to work, but my lack of knowledge and understanding of some of the code, keeps me from finishing.

Can someone assist me?

I have one major issue at the moment, if I can figure this out, I think I can finish this off.

file: admin/model/catalog/product.php , approximate line: 377
In the function getList I am trying to get the list of manufacrurers.
Here is the code where I am getting the errors:

Code: Select all

	$this->load->model('catalog/manufacturer');
	$this->data['manufacturer'] = this->model_catalog_manufacturer->getManufacturers();
This is the error:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in D:\Inetpub\wwwroot\2010\opencart_obc\admin\controller\catalog\product.php on line 377
Line 377 is the 2nd line.


Thanks for the help.

User avatar
New member

Posts

Joined
Thu Dec 03, 2009 1:01 am

Post by squeaky » Fri Apr 16, 2010 11:39 pm

fixed that line

Code: Select all

   $this->data['manufacturer'] = this->model_catalog_manufacturer->getManufacturers();


   $this->data['manufacturer'] = $this->model_catalog_manufacturer->getManufacturers();


User avatar
New member

Posts

Joined
Thu Dec 03, 2009 1:01 am

Post by squeaky » Sat Apr 17, 2010 4:24 am

I am happy to report that I have my product list in the admin sorting by manufacturer and/ or category.

wooohooo!

User avatar
New member

Posts

Joined
Thu Dec 03, 2009 1:01 am

Post by sans » Thu Dec 30, 2010 5:12 pm

Can you help me, how to sort Product list by manufacturer for OC 1.4.9?

thanks for advance.
Last edited by sans on Sat Jan 08, 2011 10:41 am, edited 1 time in total.

kaos jersey, jersey bola, baju bola, baju bola terbaru, baju bola murah


Active Member

Posts

Joined
Tue Dec 07, 2010 9:18 am

Post by ambrosite » Sat Jan 08, 2011 5:26 am

squeaky,

I need the exact same thing for one of my clients. Any chance you could share the code you wrote for 1.4.6? If I can get it working, I'll update it for 1.4.9 and release it as a free contribution for anyone else who might need it.

Newbie

Posts

Joined
Sat Jan 08, 2011 5:15 am
Who is online

Users browsing this forum: No registered users and 6 guests