Once Registered customers click on "Create Product" button present in product view page, we are creating new product in database. now we need to
1)Save those newly created product details in custom Table : my_designs
we are successfuly doing with help of this code :
$data = array('title'=>fav1_id,'product_id'=>$product->getId(),'customer_id'=>
Mage::getSingleton('customer/session')->getId());
$model = Mage::getModel('example/mydesign')->setData($data);
2)display those products in My Designs section in Customer's My Account by fetching values from my_designs
table.
I am using module & I am trying below code to display those products under My Designs section.
Issue : in customer 1's Dashboard only Products created by customer 1 should display, but now its displaying all customer's Products.
<?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 />';
}
?>
full module : http://www.filedropper.com/amasty-module1
my_design
table, so that i can display underMy designs
underMy account