last day (14 days later) » 

12:11
hi, thanks a lot for coming here @MurtuzaZabuawala
give me full fetching code
when i used template path hints i got that file
and i pasted full code of that file
please tell how i can find "full fetching code"
I gave you this code
$collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToFilter('customer_id',array('eq'=>$customer_id));
foreach($collection as $product){
echo $product->getId();
}
where you write this code
sorry, it didt worked for me..... i used below code that i pasted in question :
<?php $collections = $this->getCollection(); ?>
<?php foreach ($collections as $key => $product) {
$_product = Mage::getModel('catalog/product')->load($product->getProductId());
echo $product->getId().'<br />';
echo $_product->getName().'<br />';

}
?>
i got below error after i tried your code
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 8388608 bytes) in /var/www/html/sbdev2/lib/Varien/Simplexml/Element.php on line 195
what is $this->getCollection();
12:18
is it not using for fetching collection of products ? sorry , i dont know.... i used some google code
what is the error in this code
$collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToFilter('customer_id',array('eq'=>$customer_id));
foreach($collection as $product){
echo $product->getId();
}
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 8388608 bytes) in /var/www/html/sbdev2/lib/Varien/Simplexml/Element.php on line 195
i got above error
in my code you get this error ??
12:22
yes, please check above image
or mostly i did something wrong....
also i googled for that error
but did't got proper solution, sorry for that......
i guess your code should work, may be its conflicting with some other module that i am using...... i know your solution always works for me......
How many products you have in your site ??
its about 2 lakhs
when i used template path hints i got that file
and i pasted full code of that file , do you want to see any other part of module ? i will post that code
its very big project buddyy with lot of customizations.......
let me do something else
12:36
thanks a lot.....
for 200k product you cannot fetch from collection
oh sorry, i am an idiot......
i should have informed to you before only
yes
If you inform me that thing then I have given you some diff solution
sorry mate, please do something now
ini_set('memory_limit','512M');
12:44
let me check in php.ini file
i added your code by renaming php.ini.sample file to php.ini
but still same issue
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 8388608 bytes) in /var/www/html/sbdev2/lib/Varien/Simplexml/Element.php on line 195
also i deleted this line in php.ini and added your code : memory_limit = 64M
also i tried this : ini_set('memory_limit','5096M');
but no luck
add this line before your code
12:59
okay
seems its displaying blank page after added as below
<?php
ini_set('memory_limit','512M');
$collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToFilter('customer_id',array('eq'=>$customer_id));
foreach($collection as $product){
echo $product->getId();
}

?>
just a minute.....
thanks a lot for your continous support buddy, i got solution.......
13:14
My answer solve your probelm ??
or something else??
i tried solution posted by jamain
now its worked
i really need your support like this in future also
thanks for spending your precious time

last day (14 days later) »