Jump to content

Search the Community

Showing results for tags 'foreach'.

  • Search By Tags

    • foreach ×
    Type tags separated by commas.
  • Search By Author

Content Type



Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Found 14 results

  1. I'm trying to get a list of child categories with their respective products inside them. The code works if I have 50 products and 3 categories. The problem is that: if I have more than 1500 products divided by 6 categories, my code returns an error page for the necessary waiting time for loading (I...
  2. Hey everybody, my name is Daniele, I'm an Italian guy new to programming and to this software. I'm having this huge problem: During the checkout phases all the products are shown the right way, but when we arrive to the order-confirm part the images load fail, or at least, the {foreach} on...
  3. Hi, I'm trying to add a piece of code to my homepage to display a list of all the categories and under each category it's subcategories with a number at side with the amount of products in it. Something like this: - Category 1 - - Sub category (42) - - Sub category (13) - Catego...
  4. I work with a site that uses a lot of different tracking codes and things and a lot of the time I need to pass various variables like the total cost of the order and the users email address to the order confirmation page. I normally have a look through the forums and find what I'm looking for in...
  5. Hi, I am trying to group the products in cart summary page by suppliers. Within the {foreach $products as $product}{} loop, I am trying to assign a product value to a smarty variable. But when I am printing the value inside the loop, it is showing the default value which I have set before the lo...
  6. Hello i saw today this error message in my error.log [14-Oct-2013 10:48:11] PHP Warning: Invalid argument supplied for foreach() in /home4/****/public_html/modules/mailalerts/MailAlert.php on line 177 What is this error? How i can solve the PHP Warning? Thanks a lot
  7. Bonjour, Je suis en train de développer un module pour ma boutique et je rencontre un problème lié aux traduction. Dans ma fonction renderForm(), j'ai un foreach dans un foreach : foreach($this->fields AS $k => $field) { $inputs = array(); foreach($field AS $k2 => $var) { $inputs[] = arra...
  8. I need to output in product-list.tpl file the result of a query from within classes/Search.php in Prestashop. The query in classes/Search.php is: $sql = 'SELECT * FROM `'._DB_PREFIX_.'category_group` cg INNER JOIN `'._DB_PREFIX_.'category_product` cp ON cp.`id_category` = cg.`id_category`...
  9. hola encuentro estes errores en el archivo error_log que me genera el servidor: [05-Sep-2013 17:57:38] PHP Warning: Invalid argument supplied for foreach() in /home4/gwqhafxc/public_html/classes/Category.php on line 535 [05-Sep-2013 16:49:43] PHP Warning: Invalid argument supplied for forea...
  10. Hello, I am want to have different colors for even and odd iterations of the product features in the Data-Sheet tab in the product page. I modified the product.tpl file and added after {foreach from=$features item=feature} {if isset($feature.value)} this IF statement {if $feature@i...
  11. Buenas a todos, estoy trabajando en la ficha técnica o especificaciones que se muestra en una pestaña dentro de cada producto, la idea es conseguir que la primera característica tenga fondo gris, la segunda blanco y así sucesivamente para eso creo que hay que trabajar con modulos y si devuelve 0 o 1...
  12. Hi, I would like to use this simple php cycle. I have an array of strings, lets say $list = array ('name1','name2','name3'); and with each of this elements I need to go thru this array and do something like this: foreach($list as $item){ $stav = $db->Execute("SELECT * FR...
  13. Bonjour, depuis quelques jours je n'arrive pas à régler le problème révélé par ce message d'erreur apparu en front office : Invalid argument supplied for foreach() (.../override/classes/FrontController.php, line 246) La ligne 246 en question étant : foreach (Db::getInstance()->queriesTime as $...
  14. Hello!! Anyone could help me please in smarty because what I wanna do doesn't work, something missing but what? In PHP, what I did and it works foreach($categories AS $row) { $categories[] = intval($row['id_category']); $categories[][intval($row['id_category'])] = $this->get_Produc...
×
×
  • Create New...