Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <customer_account>
- <reference name="customer_account_navigation">
- <action method="addLink">
- <name>offer_product</name>
- <path>user/index/index</path>
- <label>My Offer Product</label>
- </action>
- </reference>
- <!-- <update handle="customer_account"/> -->
- </customer_account>
- <?php
- $products = Mage::getModel("catalog/product")->getCollection()->addAttributeToSelect('*') ->setOrder('entity_id', 'DESC')->setPageSize(10);
- foreach($products as $product):
- $_product = Mage::getModel('catalog/product')->load($product->getId());
- $attribute_value = $_product->getResource()->getAttribute('customerproduct')->getFrontend()->getValue($_product);
- if($attribute_value == 'Yes')
- {
- ?>
- <img alt="" class="img-responsive" src="<?php echo Mage::helper('catalog/image')->init($_product, 'small_image')->resize(200,200); ?>">
- <?php
- ?>
- <br />
- <?php
- echo $product->getName().'<br />';
- echo $product->getPrice();
- }
- endforeach;
- ?>
- <?php
- class Excellence_User_IndexController extends Mage_Core_Controller_Front_Action
- {
- public function indexAction()
- {
- $this->loadLayout();
- $this->_initLayoutMessages('customer/session');
- $this->_initLayoutMessages('catalog/session');
- $this->getLayout()->getBlock('content')->append(
- $this->getLayout()->createBlock('user/account_dashboard')
- );
- $this->getLayout()->getBlock('head')->setTitle($this->__('My Account'));
- $this->renderLayout();
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement