• Resolved morgy23

    (@morgy23)


    Hello,

    My question is about the product listing page.
    By default, if I use the product listing shortcode, the page will display a list (or grid) of my products showing a thumbnail, the title and the price.

    Is it possible to add more than just the title? If I have products with height and width attributes, is it possible to show these information on the product listing page as well?

    Thanks in advance

    Xanthi

    http://wordpress.org/plugins/wpshop/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Xanthi,
    Of course, it’s possible !
    You must create a file named “main_elements.tpl.php” in the WPSHOP Folder of your theme.
    In this file, add this code :

    <?php
    /*	Product mini display (List)										Produits mini liste */
    ob_start();
    ?>
    <li class="product_main_information_container-mini-list wpshop_clearfix wpshop_clear {WPSHOP_PRODUCT_CLASS}" itemscope itemtype="http://data-vocabulary.org/Product" >
    	{WPSHOP_PRODUCT_EXTRA_STATE}
    	<a href="{WPSHOP_PRODUCT_PERMALINK}" class="product_thumbnail-mini-list" title="{WPSHOP_PRODUCT_TITLE}">{WPSHOP_PRODUCT_THUMBNAIL}</a>
    	<span class="product_information-mini-list" itemprop="offers" itemscope itemtype="http://data-vocabulary.org/Offers">
    		<a href="{WPSHOP_PRODUCT_PERMALINK}" title="{WPSHOP_PRODUCT_TITLE}" class="wpshop_clearfix">
    			<h2 itemprop="name" >{WPSHOP_PRODUCT_TITLE}</h2>
    [wpshop_att_val attid="ATTRIBUTE_ID" pid="{WPSHOP_PRODUCT_ID}"]<br/>
    
    			<span class="crossed_out_price">{WPSHOP_CROSSED_OUT_PRICE}</span> {WPSHOP_PRODUCT_PRICE}
    			{WPSHOP_LOW_STOCK_ALERT_MESSAGE}
    			<p itemprop="description" class="wpshop_liste_description">{WPSHOP_PRODUCT_EXCERPT}</p>
    		</a>
    		{WPSHOP_PRODUCT_BUTTONS}
    	</span>
    </li><?php
    $tpl_element['product_mini_list'] = ob_get_contents();
    ob_end_clean();
    
    /*	Product mini display (grid)									Produits mini grid */
    ob_start();
    ?>
    <li class="product_main_information_container-mini-grid {WPSHOP_PRODUCT_CLASS}" itemscope itemtype="http://data-vocabulary.org/Product" >
    	<a href="{WPSHOP_PRODUCT_PERMALINK}" title="{WPSHOP_PRODUCT_TITLE}" itemprop="offers" itemscope itemtype="http://data-vocabulary.org/Offers" >
    		<span class="wpshop_mini_grid_thumbnail product_thumbnail_{WPSHOP_PRODUCT_ID}">{WPSHOP_PRODUCT_THUMBNAIL}</span>
    		{WPSHOP_PRODUCT_EXTRA_STATE}
    		<h2 itemprop="name" >{WPSHOP_PRODUCT_TITLE}</h2>
    [wpshop_att_val attid="ATTRIBUTE_ID" pid="{WPSHOP_PRODUCT_ID}"]<br/>
    	    {WPSHOP_PRODUCT_PRICE}<br/>
    
    	</a>
    	{WPSHOP_PRODUCT_BUTTONS}
    </li><?php
    $tpl_element['product_mini_grid'] = ob_get_contents();
    ob_end_clean();

    And replace “ATTRIBUTE_ID” code by the good attribute id.

    J.

    Thread Starter morgy23

    (@morgy23)

    Great, thanks!

    I’ll give it a try.

    Xanthi

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Include more attributes on the product listing than the title’ is closed to new replies.