Sign in to follow this  
Followers 0

Affichage des produits

5 posts in this topic

Posted · Report post

Bonjour à tous

Pourriez vous m'indiquer comment et où faire pour que les produits s'affichent suivant leur dates de mise en ligne ( de la plus récente a la plus ancienne) au lieu de les afficher par n° de référence

Merci

Share this post


: post
Share on other sites

Posted · Report post

Bonjour French Vintage Touch,

Dans affiche_produit_en_colonne() et affiche_produit_en_ligne(), les produits s'affichent, par défaut, par id croissant : tri = "ORDER BY p." . $tri . ", p.id";

A priori, vous voulez le fonctionnement inverse (plus un produit est récent, plus son id est grand).

Donc dans ses deux fonctions, si vous remplacez :

$tri = "ORDER BY p." . $tri . ", p.id";

par

$tri = "ORDER BY p." . $tri . ", p.id DESC";

Ca devrait être OK.

Share this post


: post
Share on other sites

Posted · Report post

Bonjour French Vintage Touch,

Dans affiche_produit_en_colonne() et affiche_produit_en_ligne(), les produits s'affichent, par défaut, par id croissant : tri = "ORDER BY p." . $tri . ", p.id";

A priori, vous voulez le fonctionnement inverse (plus un produit est récent, plus son id est grand).

Donc dans ses deux fonctions, si vous remplacez :

$tri = "ORDER BY p." . $tri . ", p.id";

par

$tri = "ORDER BY p." . $tri . ", p.id DESC";

Ca devrait être OK.

Merci

ca fonctionne correctement

Share this post


: post
Share on other sites

Posted · Report post

Pas de quoi ;)

Share this post


: post
Share on other sites

Posted · Report post

Ce mode de fonctionnement sera dorénavant standard dans les nouvelles versions >= 5.4

Share this post


: post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

Twitter Advisto ecommerce

Facebook PEEL Shopping