OXID Community Forum

> International Forums > Developers > how to get all product list
Login
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Thread: how to get all product list


Reply
 
Thread Tools Display Modes
#Top   #1  
Old 02-27-2012, 07:58 AM
awaisqarni awaisqarni is offline
Member
Join Date: Feb 2012
Posts: 50
awaisqarni is on a distinguished road
Default how to get all product list

Hi All,
Is there a built in function ( I have searched but couldn't be able to find any) that can return all details of all products against a particular language? Because if I have to do this it seems very complicated task to query all tables.
I have gone through article.php, article_list.php, article_main.php but couldn't the stuff. Please guide me how to accomplish this task.
Regards,
Awais Qarni
Reply With Quote
#Top   #2  
Old 02-27-2012, 12:50 PM
Marco Steinhaeuser's Avatar
Marco Steinhaeuser Marco Steinhaeuser is online now
Community Guide @ OXID
Join Date: Oct 2008
Posts: 11,102
Marco Steinhaeuser is on a distinguished road
Default Re: how to get all product list

Hello Awais,

not all information of the article object are available on every page --> lazy loading
Maybe this documentation is helpful for you:
http://docu.oxid-esales.com/CE/sourc...n/4.5.7.41909/

Try to search for getArticle and you'll get a list.

Hope this is helpful.
__________________
Marco
http://about.me/marco.steinhaeuser

Will ignore unsolicited support requests via PM, email or IM.
Reply With Quote
#Top   #3  
Old 02-27-2012, 02:31 PM
awaisqarni awaisqarni is offline
Member
Join Date: Feb 2012
Posts: 50
awaisqarni is on a distinguished road
Default Re: how to get all product list

Quote:
Originally Posted by Marco Steinhaeuser View Post
Hello Awais,

not all information of the article object are available on every page --> lazy loading
Maybe this documentation is helpful for you:
http://docu.oxid-esales.com/CE/sourc...n/4.5.7.41909/

Try to search for getArticle and you'll get a list.

Hope this is helpful.
Macro thanks again dude. I have tried to get the article in my class using the function of aList class like this
Code:
$arttcle_list = new aList();
 $all_products = $arttcle_list->getArticleList();
Bit it returns null. I think this is dude to the fact the aList is a view class and I am accessing it in admin folder (some thing like controller). Can you tell how to access view function to any class in admin folder?
Reply With Quote
#Top   #4  
Old 02-27-2012, 03:31 PM
Marco Steinhaeuser's Avatar
Marco Steinhaeuser Marco Steinhaeuser is online now
Community Guide @ OXID
Join Date: Oct 2008
Posts: 11,102
Marco Steinhaeuser is on a distinguished road
Default Re: how to get all product list

Just call me "El Duderino"
I reckon you have to write a getter module to achieve this.

Regards
__________________
Marco
http://about.me/marco.steinhaeuser

Will ignore unsolicited support requests via PM, email or IM.
Reply With Quote
#Top   #5  
Old 03-22-2012, 12:12 PM
spierala spierala is offline
Member
Join Date: Nov 2011
Posts: 58
spierala is on a distinguished road
Default Re: how to get all product list

Hello,
I also try to get a list of all products.

I have the feeling I will just extend oxarticlelist and add there a function loadAllProducts()...
If that works I will post it here.

Regards,
Florian
Reply With Quote
#Top   #6  
Old 03-22-2012, 03:39 PM
spierala spierala is offline
Member
Join Date: Nov 2011
Posts: 58
spierala is on a distinguished road
Default Re: how to get all product list

hello,
I just extended oxarticlelist.
the function to get all the products looks like this:

PHP Code:
public function loadAllArticles(){
$sSelect "select * from oxarticles ORDER BY oxartnum";
$this->selectString$sSelect );

and then i putted that function in oxubase:
PHP Code:
public function getAllArticles(){
$aArticleList oxNew'oxarticlelist' );
$aArticleList->loadAllArticles();
return 
$aArticleList;

just to have it everywhere available.
unfortunately it´s not possible to extend oxubase.
maybe someone has a suggestion where i could put it instead.

kind regards,
florian
Reply With Quote
Reply

Bookmarks

Tags
list, product

« Previous Thread | Next Thread »
Thread Tools
Display Modes

Nicht Sichtbar
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Product list from category in homepage scrand Installation and configuration 2 05-11-2011 04:40 PM
show the Category of a Product in List JanPaul183 Newbies 2 03-23-2011 08:57 PM
switch between product with images and without as list? scuba303 Templates and Design 4 11-11-2010 04:43 PM
Classes alist / search: Redirect to product when only 1 in list oxal Developers 3 04-17-2010 04:05 PM
Get discounted price value and 3 row product list possible? Kioshin Templates and Design 3 11-18-2009 02:33 PM

All times are GMT +1. The time now is 05:12 PM.