Henrik Larsen Posted January 1, 2011 Share Posted January 1, 2011 Hej Nederst på siden i Prestashop finder man en dropdown box hvor man normalt vil kunne vælge mellem flere enheder.Se evt. billedet for hvad jeg mener. Link to comment Share on other sites More sharing options...
Guest Posted January 1, 2011 Share Posted January 1, 2011 Ja da,BO, preferences, Products. Halvvejs nede af siden. Link to comment Share on other sites More sharing options...
Henrik Larsen Posted January 1, 2011 Author Share Posted January 1, 2011 Ja man kan ændre det fast, men jeg ønsker at kunden skal kunne vælge selv hvor mange produkter de vil se.faktisk har jeg fundet koden for drop down boxen men den vil ikke virke efter hensigtene:CODE:<?php$nArray = intval(Configuration::get('PS_PRODUCTS_PER_PAGE')) != 10 ? array(intval(Configuration::get('PS_PRODUCTS_PER_PAGE')), 10, 20, 50) : array(10, 20, 50);asort($nArray);$n = abs(intval(Tools::getValue('n', intval(Configuration::get('PS_PRODUCTS_PER_PAGE')))));$p = abs(intval(Tools::getValue('p', 1)));$range = 2; /* how many pages around page selected */if (!$n) $n = $nArray[0];if ($p < 0) $p = 0;if ($p > ($nbProducts / $n)) $p = ceil($nbProducts / $n);$pages_nb = ceil($nbProducts / intval($n));$start = intval($p - $range);if ($start < 1) $start = 1;$stop = intval($p + $range);if ($stop > $pages_nb) $stop = intval($pages_nb);$smarty->assign('nb_products', $nbProducts);$pagination_infos = array('pages_nb' => intval($pages_nb), 'p' => intval($p), 'n' => intval($n), 'nArray' => $nArray, 'range' => intval($range), 'start' => intval($start), 'stop' => intval($stop));$smarty->assign($pagination_infos);?> 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