Closed (fixed)
Project:
quantity_discount
Version:
5.x-0.1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
6 Nov 2007 at 16:27 UTC
Updated:
16 Feb 2008 at 04:12 UTC
Hi, I am currently working on a ecommerce website and I was looking for a module allowing me to assign a price on a product according to a specified amount (2 € from 1 to 99, 1.5 € from 100 to 500 etc. ...).
The worry is that after install the quantity_discount module, but after that, the "?q=cart/view" page tell me : "warning: Invalid argument supplied for foreach () in [...] \ modules \ quantity_discount \ quantity_discount.module on line 418. "
After research it seems that on this famous line: foreach ($form["items"] as &$item)
$form["item"] seems not to be an array ??
thanks,
Martouff
ps: scuze my poor english !! (I'm french)
Comments
Comment #2
janusman commentedFixed; will post this soon.
For now you can just insert this before the foreach() in the .module file:
if(is_array($form["items"]))
foreach($form["items"] as &$item) {
[... rest of code ...]
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.