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

Asign customers to products through admin
 
Bostwicksurya
Jr. Member
 
Total Posts:  10
Joined:  2013-04-25
 

Hi all,

I want to create a custom module but i am new in this.

My requirement is:
Admin can assign customers to products from product edit page.
Create a page in front end to display that product.
Customer able to access that page after login and able to see that product which are assign to him.

Is this possible without creating custom module OR explain it.

Please if some one have solution share with me.

Thank You

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bostwicksurya
Jr. Member
 
Total Posts:  10
Joined:  2013-04-25
 

Hi anyone, please replay.

Is there is no solution for

My requirement is:
Admin can assign customers to products from product edit page.
Create a page in front end to display that product.
Customer able to access that page after login and able to see that product which are assign to him

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bostwicksurya
Jr. Member
 
Total Posts:  10
Joined:  2013-04-25
 

Thanks for replay,

I have try to write code(module) for product edit tab, Now i am able to display all customers in product edit page.
Now any one please help me to save the selected customer in database, so that i can get products on front-end by customer.

My code is at app\\design\\adminhtml\\default\\default\\template\\catalog\\product

<?php 
 $collection 
Mage::getModel(\'customer/customer\')
                  ->
getCollection()
                 ->
addAttributeToSelect(\'*\');
                 
                
$result = array();
                foreach (
$collection as $customer{
                    $result[] 
$customer->toArray();
                
}
         
        
                 
// echo \'<pre>\';
                 // print_r($result);
                 // echo \'</pre>\';
?>
<div class=\"entry-edit\">
    <
div class=\"entry-edit-head\">
        <
h4 class=\"icon-head head-edit-form fieldset-legend\"><?php echo Mage::helper(\'catalog\')->__(\'Customers\'?></h4>
    </
div>
    <
fieldset id=\"grop_fields\">
        <
input type=\"hidden\" name=\"cutomer_ids\" id=\"product_cutomers\" value=\"<?php echo $this->getIdsString() ?>\">
        <
div id=\"product-cutomers\" class=\"tree\">
            
            
            <
ul id=\"ext-gen6\" class=\"x-tree-root-ct x-tree-lines\">
                <
div class=\"x-tree-root-node\">
                    <
li class=\"x-tree-node\">
                        <
div class=\"x-tree-node-el folder active-category x-tree-node-expanded\">
                            <
span class=\"x-tree-node-indent\"></span>
                            <
div id=\"ext-gen14\" class=\"x-tree-ec-icon x-tree-elbow-end-minus\" ></div>
                            <
div id=\"ext-gen11\" class=\"x-tree-node-icon\" unselectable=\"on\" style=\"float: left;\"></div>
                            <
input id=\"ext-gen15\" class=\"l-tcb\" type=\"checkbox\">
                            <
a id=\"ext-gen8\" href=\"#\" hidefocus=\"on\">
                                <
span unselectable=\"on\">Customers</span>
                            </
a>
                        </
div>
                        <
ul class=\"x-tree-node-ct\" style=\"\">
                        
<?php 
                            
foreach ($result as $customer1{
                                
                        ?>
                        
                            
<li class=\"x-tree-node\">
                                <
div class=\"x-tree-node-el folder active-category x-tree-node-leaf\">
                                    <
span class=\"x-tree-node-indent\">
                                    <
div id=\"ext-gen22\" class=\"x-tree-ec-icon x-tree-elbow-end\" style=\"float: left;\" ></div>
                                    <
div id=\"ext-gen19\" class=\"x-tree-node-icon\" unselectable=\"on\" style=\"float: left;\"></div>
                                    <
input id=\"ext-gen<?php echo $customer1[\'entity_id\'] ;?>\" class=\"l-tcb\" type=\"checkbox\">
                                    <
a id=\"ext-gene<?php echo $customer1[\'entity_id\'] ;?>\" href=\"#\" hidefocus=\"on\">
                                    <
span unselectable=\"on\"><?php echo $customer1[firstname].\' \'$customer1[middlename].\' \'$customer1[lastname]?></span>
                                    </
a>
                                </
div>
                                <
ul class=\"x-tree-node-ct\" style=\"display:none;\"></ul>
                            </
li>
                        
<?php
                            }
                        ?>
                        
</ul>
                </
li>
            </
div>
        </
ul>
            
        
        </
div>
    </
fieldset>
</
div>

Any can help me.?

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