+33 3 83 56 65 26 +33 6 87 42 95 30 Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. Lun-Ven : 9.00 à 17.00
Extensions Composants

Trier les colonnes du tableau de la boutique Virtuemarrt dans le fichier: browse_listtable.tpl.php

More
17 years 1 month ago #13720 by lilasn
Bonjour à tous,

Je voudrais trier par ordre croissant/décroissant les colonnes "noms" "prix" par exemple et filtrer les colonne product-desc et product-s-desc qui correspondent à des champs de texte par mots clefs. J'utilise la page browse_listtable.tpl.php de virtuemart dont le code de la page est le suivant:


<?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 echo $browsepage_header // The heading, the category description ?>
<?php echo $parameter_form // The Parameter search form ?>
<?php echo $orderby_form // The sort-by, order-by form PLUS top page navigation ?>

<?php
// Table header
$tableheader[] = $VM_LANG->_('PHPSHOP_CART_NAME');
$tableheader[] = $VM_LANG->_('PHPSHOP_CART_SKU');
if( _SHOW_PRICES && $auth ) {
$tableheader[] = $VM_LANG->_('PHPSHOP_CART_PRICE');
}
$tableheader[] = $VM_LANG->_('PHPSHOP_PRODUCT_DESC_PLAYER');
$tableheader[] = $VM_LANG->_('PHPSHOP_PRODUCT_DESC_TITLE');
if( _SHOW_PRICES && $auth && USE_AS_CATALOGUE != '1' ) {
$tableheader[] = $VM_LANG->_('PHPSHOP_CART_ACTION');
}
// Creates a new HTML_Table object that will help us
// to build a table holding all the products
$table =& new HTML_Table('width="100%"');

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

$data =array(); // Holds the rows of products
$i = 1; $row = 0; // Counters
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][] = ''.$product.'</a>';
$data[$row][] = $product;
if( _SHOW_PRICES && $auth ) {
$data[$row][] = $product;
}
$data[$row][] = $product;
$data[$row][] = $product;
if( $product ) {
$data[$row][] = $product;
}
else {
$data[$row][] = '<a href="'.$product.'" title="'.$product.'">'
. $product
. '</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 ?>
<?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 */
echo $ps_product->featuredProducts(true,10,true);
} ?>

<?php echo $recent_products ?>



Pouvez-vous m'aider SVP?
Merci

Please Connectez-vous or Create an account to join the conversation.

More
17 years 1 month ago - 17 years 1 month ago #13728 by lavsteph
Bonjour et bienvenue,

il n'y a malheureusement quasiment pas de membres spécialistes de cette extension sur notre site, je pense que vous auriez plus de réponse dans cette catégorie du forum officiel français Joomla.

Désolé de ne pouvoir répondre à vos attentes. :blush:
Last edit: 17 years 1 month ago by lavsteph.

Please Connectez-vous or Create an account to join the conversation.

Moderators: lavsteph, tramber91, Scottux, serge
Time to create page: 0.136 seconds

News Communautés

News sécurité