Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. <customer_account>
  2. <reference name="customer_account_navigation">
  3. <action method="addLink">
  4. <name>offer_product</name>
  5. <path>user/index/index</path>
  6. <label>My Offer Product</label>
  7. </action>
  8. </reference>
  9. <!-- <update handle="customer_account"/> -->
  10. </customer_account>
  11.  
  12. <?php
  13. $products = Mage::getModel("catalog/product")->getCollection()->addAttributeToSelect('*') ->setOrder('entity_id', 'DESC')->setPageSize(10);
  14. foreach($products as $product):
  15. $_product = Mage::getModel('catalog/product')->load($product->getId());
  16. $attribute_value = $_product->getResource()->getAttribute('customerproduct')->getFrontend()->getValue($_product);
  17. if($attribute_value == 'Yes')
  18. {
  19. ?>
  20. <img alt="" class="img-responsive" src="<?php echo Mage::helper('catalog/image')->init($_product, 'small_image')->resize(200,200); ?>">
  21. <?php
  22. ?>
  23. <br />
  24. <?php
  25. echo $product->getName().'<br />';
  26. echo $product->getPrice();
  27. }
  28. endforeach;
  29. ?>
  30.  
  31. <?php
  32. class Excellence_User_IndexController extends Mage_Core_Controller_Front_Action
  33. {
  34. public function indexAction()
  35. {
  36. $this->loadLayout();
  37. $this->_initLayoutMessages('customer/session');
  38. $this->_initLayoutMessages('catalog/session');
  39.  
  40. $this->getLayout()->getBlock('content')->append(
  41. $this->getLayout()->createBlock('user/account_dashboard')
  42. );
  43. $this->getLayout()->getBlock('head')->setTitle($this->__('My Account'));
  44. $this->renderLayout();
  45. }
  46. }
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement