. ps_product::image_tag( $product['product_thumb_image'] )
. '</a>';
if( _SHOW_PRICES && $auth['show_prices'] ) {.
Jak można coś takiego wstawić do tego kodu php aby nie generowało błędów składni? Cały kod poniżej
mm_showMyFileName(__FILE__); ?> <?php $i = 1; $row = 0; // Counters // Creates a new HTML_Table object that will help us // to build a table holding all the products $table =& new HTML_Table('width="100%"'); 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][] = '<a href="'.$product['product_flypage'].'" title="'.$product['product_name'].'">' . ps_product::image_tag( $product['product_thumb_image'] ) . '</a>'; if( _SHOW_PRICES && $auth['show_prices'] ) { $data[$row][] = '<a href="'.$product['product_flypage'].'" title="'.$product['product_name'].'">'.$product['product_name'].'</a>'; $data[$row][] = $product['product_price']; } if( $product['has_addtocart'] ) { $data[$row][] = $product['form_addtocart']; } else { $data[$row][] = '<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 ?> <br class="clr" /><br /> <?php // Show Featured Products if( $this->get_cfg( 'showFeatured', 1 )) { /* featuredproducts(random, no_of_products,category_based) no_of_products 0 = all else numeric amount edit featuredproduct.tpl.php to edit layout */ } ?>