Witam.

Wprowadziłem kod z strony: http://www.virtuemart.pl/forum/viewtopic.php?f=6&t=2229 od graziu w browse_listtable.tpl.php. i niestety nie działa ( http://www.pneumaticon.pl/test/index...id=7&Itemid=11)

Przesyłam kod tego pliku :

Kod:
<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
mm_showMyFileName(__FILE__); ?>

<?php echo $buttons_header // The PDF, Email and Print buttons ?>
<?php
           if( $this->get_cfg( 'showAvailability' ))
         {
              //echo $product_availability;
            
            if ($product_in_stock > 49) $dost=1;
            if (($product_in_stock>19) && ($product_in_stock<=49)) $dost=2;
            if (($product_in_stock<=19) && ($product_in_stock>=4)) $dost=3;
            if (($product_in_stock<=3) && ($product_in_stock>=1)) $dost=4;
            if (($product_in_stock<=0)) $dost=5;
                        
            switch ($dost)
               {
                  case '1': { echo "<img src=\"ilosc/dost1.jpg\" />"; } break;
                  case '2': { echo "<img src=\"ilosc/dost2.jpg\" />"; } break;
                  case '3': { echo "<img src=\"ilosc/dost2.jpg\" />"; } break;
                  case '4': { echo "<img src=\"ilosc/dost2.jpg\" />"; } break;
                  case '5': { echo "<img src=\"ilosc/dost2.jpg\" />"; } break;
               }

           }
           ?>


<?php

            

$data =array(); // Holds the rows of products
$i = 1; $row = 0; // Counters

// Table header
$tableheader[] = $VM_LANG->_('PHPSHOP_CART_NAME');

if( _SHOW_PRICES && $auth['show_prices'] ) {
    $tableheader[] = $VM_LANG->_('PHPSHOP_CART_PRICE').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
    
}
$tableheader[] = $VM_LANG->_('PHPSHOP_PRODUCT_FORM_THUMB_IMAGE');

    $tableheader[] = 'Akcja';


// Creates a new HTML_Table object that will help us
// to build a table holding all the products
$table = new HTML_Table('width="105%"');

$table->addRow( $tableheader, 'class="sectiontableheader"', 'th', true );

foreach( $products as $product ) {
        
        foreach( $product as $attr => $val ) {
            // Using this we make all the variables available in the template
            // translated example: $this->set( 'product_name', $product_name );
            $this->set( $attr, $val );
        }
        
        $data[$row][] = '<br/><br/><br/><h2><center><a href="'.$product['product_flypage'].'" title="'.$product['product_name'].'">'.$product['product_name'].'</a></center></h2>';
        $data[$row][] = '<img src=”dost<?php echo $dost;?>.jpg”>';
           
        if( _SHOW_PRICES && $auth['show_prices'] ) {
            $data[$row][] = '<br/><br/><br/>'.$product['product_price'].'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
            
        }
        $data[$row][] = '<br/><a href="'.$product['product_flypage'].'" title="'.$product['product_name'].'">'
                        . ps_product::image_tag( $product['product_thumb_image'] )
                        . '</a>';
        
        if( $product['has_addtocart'] ) {
            $data[$row][] = '<br/><br/>'.$product['form_addtocart'];
        }
        else {
            $data[$row][] = '<br/><br/><a href="'.$product['product_flypage'].'" title="'.$product['product_name'].'">'
                            .    $product['product_details']
                            .    '</a>';
                            
        }
        
        
        $row++;
        
}


// Loop through each row and build the table
foreach($data as $key => $value) {
    
    $table->addRow( $data[$key], 'class="sectiontableentry'.$i.'"', 'td', true );
    $i = $i == 1 ? 2 : 1;
}
// Display the table
echo $table->toHtml();
?>
<br class="clr" /><br />
<?php echo $browsepage_footer ?>