Magento Forum

   
Moving data from product view to list/grid…
 
Trice
Jr. Member
 
Total Posts:  2
Joined:  2008-04-21
 

I have added a configurable item to my site.. I’d like to move the configurable attribute (there’s only one) from the product view to the list/grid mode, and to make the add to checkout button directly add said configurable item, to the shopping cart.  I’ve looked over the code, and I don’t readily see how to make the data available from the product view on the grid/list for a configurable item… Anyone have some pointers?

Trice

 
Magento Community Magento Community
Magento Community
Magento Community
 
Daim
Sr. Member
 
Total Posts:  172
Joined:  2008-01-08
Germany
 

Look at “/app/design/frontend/default/default/layout/catalog.xml”

<!--
Category default layout
-->

....
<
block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
                <
block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
                    <
action method="addAttribute"><attribute>manufacturer</attribute></action>
            <
action method="addAttribute"><attribute>quantity</attribute></action>
                       <
action method="addAttribute"><attribute>YOURATTRIBUTE</attribute></action>

Then in “/app/design/frontend/default/default/template/catalog/product/list.phtml”

Search

<?if
($this->getMode()!='grid'):?>

and edit the Code below

 
Magento Community Magento Community
Magento Community
Magento Community
 
Trice
Jr. Member
 
Total Posts:  2
Joined:  2008-04-21
 

Well… I got that far already.. I can include simple attributes in there, but if I try to include the drop down attribute I created like that, it’s just rather freaks out....  Any more ideas guys?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bonaventure
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2007-09-26
 

I don’t think I’m putting my code in the proper section of list.phtml. Can you post an example of what the code should look like in list.phtml?  Let’s assume that I have an attribute called “publisher” that I want to appear just below the title or name of the product.

This is what I tried:

First “catalog.xml”

<!--
Category default layout
-->

    <
catalog_category_default>
        <
reference name="left">
            <
block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
        </
reference>
        <
reference name="content">
            <
block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
                <
block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml" />
                <
action method="addAttribute"><attribute>publisher</attribute></action>
            </
block>
        </
reference>
    </
catalog_category_default>

Then “list.phtml” (the last line is what I added)

<?php // Grid Mode ?>
<div class="listing-type-grid  catalog-listing"> <!-- the class name will change to .listing-type-cell if viewing in list mode -->
<?php $_collectionSize $_productCollection->count() ?>
    
<table cellspacing="0" class="generic-product-grid" id="product-list-table">
    
<?php $i=0; foreach ($_productCollection as $_product): ?>
    <?php 
if ($i++%3==0): ?>
    
<tr>
    
<?php endif ?>
        
<td>
            <
class="product-image">
                <
a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>">
                    <
img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>" width="135" height="135" alt="<?php echo $this->htmlEscape($_product->getName()) ?>"/>
                </
a>
            </
p>
            <
h5><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>)"><?php echo $this->htmlEscape($_product->getName()) ?></a></h5>
            
<?=$_product->getAttribute('publisher')?><br />

I did the same for the list mode.
Why isn’t it working?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jacky2008
Member
 
Total Posts:  43
Joined:  2008-04-15
 

I am interested in it, too. Who can share it????
This is good question

Thank you very much.

 
Magento Community Magento Community
Magento Community
Magento Community
 
wwozn
Jr. Member
 
Total Posts:  2
Joined:  2008-01-26
Poland / Warsaw
 

Hi All,
Do you know how to add third cutomized view (other then grid and list) to the list.phtml?
Thanks you,
Wiktor

 
Magento Community Magento Community
Magento Community
Magento Community
 
Pro Digital
Sr. Member
 
Avatar
Total Posts:  110
Joined:  2007-12-05
Hungary
 

Hi i need the solution too, to move the configurable product’s configurable attribute to the grid…

 
Magento Community Magento Community
Magento Community
Magento Community
 
doctorlogos
Sr. Member
 
Avatar
Total Posts:  178
Joined:  2008-05-06
 

I am very interested too.

I think we want this change because we need a solution for the pagination of the products. Now the product´s page pagination, for see previous and next product, is null, it´s an deathline.

Magento Team, check that, all cms systems have this simple and logic navigation. What´s happen?

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