Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Authentication problem
 
honeyharish
Member
 
Total Posts:  60
Joined:  2008-07-10
 

how can i manage my product only for logged in user
example

when some one logged in than only they see my products,
othewise they only see some of my products which are available for every one

can some one tell me????

 
Magento Community Magento Community
Magento Community
Magento Community
 
honeyharish
Member
 
Total Posts:  60
Joined:  2008-07-10
 

if some one know please answer

 
Magento Community Magento Community
Magento Community
Magento Community
 
mzentrale1
Guru
 
Total Posts:  731
Joined:  2007-12-06
Stuttgart, Germany
 

Hi,

this will be very tricky. First i would create a new product attribute f.e. called only_user, this should be a general attribute.
Than you have to customize all phtml files which lists the products. For example list.phtml of module catalog in the grid mode:

if($_product->getOnlyUser() && $this->helper('customer')->isLoggedIn() )

//Show the product

But theres a problem in grid layout of list.phtml. The whole sum of products is count

<?php $_collectionSize $_productCollection->count() ?>
If you use above code you have to customize some more code of this function.

Hope you understand my bad english.

Cheers

Stefan

 
Magento Community Magento Community
Magento Community
Magento Community
 
honeyharish
Member
 
Total Posts:  60
Joined:  2008-07-10
 

thanks Stefan
now i m using ur code smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
honeyharish
Member
 
Total Posts:  60
Joined:  2008-07-10
 

its working fine smile
thanks stefan

 
Magento Community Magento Community
Magento Community
Magento Community
 
honeyharish
Member
 
Total Posts:  60
Joined:  2008-07-10
 

but $_product->getOnlyUser() is not a funtion how can i define it????

 
Magento Community Magento Community
Magento Community
Magento Community
 
mzentrale1
Guru
 
Total Posts:  731
Joined:  2007-12-06
Stuttgart, Germany
 

Hi,

you have to create a attribute named only_user under ->catalog->attributs->manage attributes. Then it is available
in the view.

cheeers

stefan

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top