Search the Community
Showing results for tags 'foreach'.
-
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...
-
- categories
- php
- (and 6 more)
-
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...
-
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...
-
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...
- 1 reply
-
- product information
- $cookie
- (and 8 more)
-
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...
-
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
- 3 replies
-
- PHP Warning
- Invalid argument
-
(and 3 more)
Tagged with:
-
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...
- 1 reply
-
- traduction
- $this-l
-
(and 4 more)
Tagged with:
-
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`...
- 13 replies
-
- prestashop
- php
- (and 4 more)
-
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...
-
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...
- 6 replies
-
- data sheet
- product
-
(and 1 more)
Tagged with:
-
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...
- 4 replies
-
- ficha tecnica
- productos
- (and 6 more)
-
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...
-
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...