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

How would I create a simplified Product Listing
 
travelingwilly
Sr. Member
 
Total Posts:  85
Joined:  2009-03-21
 

I am trying to start a mall business and some of the stores do not have pictures or are very simple in nature and wish to show there entire listing or Partial (based on level of category selection) at once in a simplified form. No pictures, So I do not want to take away the formats that are there ,what is there I want to add the extra Listing types so there 2 additional choices

So I would like to add the option for product listing look like this Simple Grid/Simple List

Subcategory1
Item 1 Description 8.99 Item2 Descripton 9.99 Item3 Descrption 10.99
Item 4 Description 10.88 Item 5 Description 8.99 Item 6 Description 8.99

Subcategory2
Item 11 Description 8.99 Item12 Descripton 9.99 Item13 Descrption 10.99
Item14 Description 10.88 Item15 Description 8.99 Item16 Description 8.99
Etc

Or

Subcategory1
Item 1 Description extra description 1 8.99
Item 2 Description extra description 2 8.99
Item 3 Description extra description 3 8.99

Subcategory2
Item 3 Description extra description 3 8.99
Item 4 Description extra description 3 8.99
Item 5 Description extra description 3 8.99

Etc

 
Magento Community Magento Community
Magento Community
Magento Community
 
tzyganu
Mentor
 
Avatar
Total Posts:  2205
Joined:  2009-11-18
Bucharest, Romania
 

You just have to change /app/design/frontend/{interface}/{theme}/template/catalog/product/list.phtml to fit your design needs.

 
Magento Community Magento Community
Magento Community
Magento Community
 
travelingwilly
Sr. Member
 
Total Posts:  85
Joined:  2009-03-21
 

Thanks I will try that… where would I add the extra selections Grid/list/simplelist..

Also How would you set up screen cms page or static page .. To show entire catalog listing. Presently It looks like I have to select one catagory at a time. I want to see it all but have a simple Catalog description in between like above

 
Magento Community Magento Community
Magento Community
Magento Community
 
tzyganu
Mentor
 
Avatar
Total Posts:  2205
Joined:  2009-11-18
Bucharest, Romania
 

The easiest (less code) solution is to create a category called ‘All’ an put all the products in that category(beside the category that they belong to).
The second method implies some code.
Create the Mage_Catalog_Block_Product_All class and put it in a file located here (app/code/code/Mage/Catalog/Block/Product/All.php)

<?php
class Mage_Catalog_Block_Product_All extends Mage_Catalog_Block_Product_List
{
    
protected function _getProductCollection()
    
{
        
if (is_null($this->_productCollection)) {
            $collection 
Mage::getResourceModel('catalog/product_collection')
                ->
addAttributeToSelect('*')
                ->
addAttributeToFilter('status'1)
                ->
addAttributeToFilter(array(array('attribute'=>'visibility''eq'=>"4")));
            
$this->_productCollection $collection;
        
}
        
return $this->_productCollection;
    
}
?>

After this create a CMS page. and in it’s content put the following

{{block type="catalog/product_all" template="catalog/product/list.phtml"}}
In the “Layout” field (from the ‘Custom design’ tab) select ‘2columns-left’ (or any other design just don’t leave it to ‘empty’)
Save and that’s it.
If the page you just created has the identifier (’all-products’) and is enabled you will see a paginated list of all your products here:
http://www.yoursite/all-products (or http://www.yoursite/{YOUR STORE CODE}/all-products if you have store codes in the url)

I know that this is not 100% clean because you need to add some code in the core. This is no problem, you can add this also in the local folder.

For security reasons a copy of this post can be found here:http://marius-strajeru.blogspot.com/2010/01/list-of-all-products-in-website-for.html

This was don in a hurry and not 100% tested. Don’t kill me if is not what you expect.

 
Magento Community Magento Community
Magento Community
Magento Community
 
travelingwilly
Sr. Member
 
Total Posts:  85
Joined:  2009-03-21
 

I have changed my code it is starting to look good. But I want the ratings to just show me the Stars and the (1) counter and an Anchor to go to the rating screen

If I use <?php if($_product->getRatingSummary()): ?>
<?php echo $this->getReviewsSummaryHtml($_product) ?>
<?php endif; ?>
I get
a row of Stars
a row link to Add Reveiw
a (1) Counter in link row Link to View reviews

if I use <?php if($_product->getRatingSummary()): ?>
<?php echo $this->getReviewsSummaryHtml($_product , 'short' ) ?>
<?php endif; ?>
I get
a row of stars
a row (1) Counter

It is 2 lines .. I am trying to simplify the listing this is driving me nuts.... I am even Using tables just to simplify the code

Someone help before I really make this look ugly

<?php foreach ($_productCollection as $_product): ?>

<div <?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">

<?php // Product description ?>
<div class="product-shop_WGG">
<table width="100%" style="border-top-style: solid; border-top-width: thin; border-top-color: #FFCC99">
<tr >
<td width="10%" valign="middle" align="center">
<?php if($_product->isSaleable()): ?>
<button class="form-button" onclick="setLocation(’<?php echo $this->getAddToCartUrl($_product) ?>’)"><span><?php echo $this->__('Add to Cart') ?></span></button>
<?php else: ?>
<div class="out-of-stock"><?php echo $this->__('Out of stock') ?></div>
<?php endif; ?>
</td>
<td>
<h5><a href="<?php echo $_product->getProductUrl() ?>” title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName())?></a>
</h5>
</td>
<td align="left">
<div class="description" >
<?php echo nl2br($_product->getShortDescription()) ?>
</div>
<?php if($_product->getRatingSummary()): ?>
<?php echo $this->getReviewsSummaryHtml($_product , 'short' ) ?>
<?php endif; ?>
</td>
<td width="10%" align="right">
<?php echo $this->getPriceHtml($_product, true) ?>

</td>

</tr>
</table>
</div>
</div>
<?php endforeach; ?>

 
Magento Community Magento Community
Magento Community
Magento Community
 
where_s_gary
Jr. Member
 
Total Posts:  12
Joined:  2009-01-12
 

Did you ever figure out how to remove the reviews text that followed the stars?

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