Anfuca Posted January 10, 2017 Share Posted January 10, 2017 Buenas, en el módulo de productos destacados de la pagina principa, me gustaría ordenar automáticamente los productos de tal manera que, el último que se introduzca, aparezca el primero en la portada. Sin tener que hacerlo manualmente.En este hilo dan una solución que creo que es válida, pero aplicado a la la versión 1.5. ¿Algún alma caricativa me guía para cómo hacerlo en la versión 1.6?Gracias! Link to comment Share on other sites More sharing options...
ventura Posted January 10, 2017 Share Posted January 10, 2017 Tienes que sobreescribir la funcion _cacheProducts del modulo modules/homefeatured cambiar esta parte else HomeFeatured::$cache_products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), 'position'); por esto else HomeFeatured::$cache_products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), 'date_add', 'DESC' ); 2 Link to comment Share on other sites More sharing options...
joseantgv Posted January 10, 2017 Share Posted January 10, 2017 Tienes que sobreescribir la funcion _cacheProducts del modulo modules/homefeatured cambiar esta parte else HomeFeatured::$cache_products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), 'position'); por esto else HomeFeatured::$cache_products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), 'date_add', 'DESC' ); Y limpia la caché que sino no veras el cambio 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now