- Forums
- Archives
- Versions stables
- Joomla 1.5
- Discussions générales
- Extensions tierces
- Composants
- Trier les colonnes du tableau de la boutique Virtuemarrt dans le fichier: browse_listtable.tpl.php
×
Extensions Composants
Question Trier les colonnes du tableau de la boutique Virtuemarrt dans le fichier: browse_listtable.tpl.php
- lilasn
- Auteur du sujet
- Hors Ligne
- Nouveau membre
Réduire
Plus d'informations
- Messages : 1
- Remerciements reçus 0
17 Oct 2009 20:18 #1
par lilasn
Trier les colonnes du tableau de la boutique Virtuemarrt dans le fichier: browse_listtable.tpl.php a été créé par 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
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
Connectez-vous ou Créer un compte pour participer à la conversation.
- lavsteph
- Hors Ligne
- V.I.P
- Fondateur
Réduire
Plus d'informations
- Messages : 9394
- Remerciements reçus 500
18 Oct 2009 01:42 - 18 Oct 2009 01:43 #2
par lavsteph
Réponse de lavsteph sur le sujet Re:Trier les colonnes du tableau de la boutique Virtuemarrt dans le fichier: browse_listtable.tpl.php
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.
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.
Dernière édition: 18 Oct 2009 01:43 par lavsteph.
Connectez-vous ou Créer un compte pour participer à la conversation.
Droit d'accès du forum
- Vous ne pouvez pas: Créer un nouveau sujet.
- Vous ne pouvez pas: Répondre au sujet.
- Vous ne pouvez pas: Éditer votre message.
Modérateurs: lavsteph, tramber91, Scottux, serge
- Forums
- Archives
- Versions stables
- Joomla 1.5
- Discussions générales
- Extensions tierces
- Composants
- Trier les colonnes du tableau de la boutique Virtuemarrt dans le fichier: browse_listtable.tpl.php
Temps de génération de la page : 0.346 secondes