To get Product Information in category view

Support Forums Programming and Development Magento To get Product Information in category view

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Jeanne 7 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1161

    sharmilav
    Participant

    How to retrieve product’s data for each product in category view?

    #1166

    Jeanne
    Keymaster

    Hi Sarmila,

    Use the below code to get product Information based on Product Id

    $_product = Mage::getModel(‘catalog/product’)->load($product_id); // Enter your Product Id in $product_id
    echo $_product->getName(); // get Product’s name
    echo $_product->getShortDescription(); //get product’s short description
    echo $_product->getDescription(); //get Product’s Long Description
    echo $_product->getPrice(); //get Product’s Regular Price
    echo $_product->getSpecialPrice(); //get Product’s Special price
    echo $_product->getProductUrl(); //get Product’s Url
    echo $_product->getImageUrl(); //get Product’s image Url

    If you need attributes like brand and manufacturer for that product you can get in same way.

Viewing 2 posts - 1 through 2 (of 2 total)

You must Login/Register to reply to this topic.