PDA

View Full Version : errors


Andy
17-11-08, 19:39
Couldn't think of a better subject title.
I'm doing some stuff with error reports on, playing on V2.
product.php?p=32484179Warning: Invalid argument supplied for foreach() in /#/#/#/#/elements/related_product_list.php on line 43
This product doesn't appear to have any related products, hence the invalid argument

the fix I have is pretty basic but it works:

open elements/related_product_list.php

find:
foreach ($aProducts as $key => $oProduct) {
if ($oProduct->iId == $oShopCore->oProduct->iId) {
unset($aProducts[$key]);
}
}

wrap with:if(count($aProducts) > 0){

}


so it looks like:if(count($aProducts) > 0){
foreach ($aProducts as $key => $oProduct) {
if ($oProduct->iId == $oShopCore->oProduct->iId) {
unset($aProducts[$key]);
}
}
}

Ollie
18-11-08, 10:10
Good Morning Andy,

Thanks for raising this. I will test out the fix you suggested and put it into the next release of the ShopWindow Client.

Thanks again

sspyrou
26-11-08, 12:18
Hi Folks

I've been hitting my quota limit alot and am trying to resolve this issue.

However, as a short term fix i woulk like to disable error repporting through php so that these errors are simply not called:

soap_error Object ( [sCode] => ns1:Client.LIMIT_1 [sString] => Insufficient Quota [sDetails] => getCategoryPath: You have used all your operations quota )


Adding

error_reporting(0);

to the php does not seem to work.. any ideas?


Please advise...

Thanks

Andy
13-01-09, 11:20
Sorry nobody has answered this earlier.

Basically, you just need to ask for a higher quota through you Affiliate Window account

Log into you AffiliateWindow account and go to:
http://www.affiliatewindow.com/support/ticket.php?action=new&category=41&name=Shopwindow%20Quota%20Review

You can set the quota alerts to ON here:
http://www.affiliatewindow.com/affiliates/shopwindow/index.php?

That way when you do get close to quota, you'll receive an email.

For all other Errors...................

in constants.inc.php
find:ini_set('display_errors', 1); // php errors
and change to:
ini_set('display_errors', 0); // php errors
you can find more info on PHP error reporting here:
http://uk3.php.net/error_reporting

changing that line to:
ini_set('error_reporting', E_ALL);results in a very scary list of notices!

nowucit
04-03-09, 13:57
Couldn't think of a better subject title.
I'm doing some stuff with error reports on, playing on V2.
product.php?p=32484179This product doesn't appear to have any related products, hence the invalid argument

the fix I have is pretty basic but it works:

open elements/related_product_list.php

find:
foreach ($aProducts as $key => $oProduct) {
if ($oProduct->iId == $oShopCore->oProduct->iId) {
unset($aProducts[$key]);
}
}

wrap with:if(count($aProducts) > 0){

}


so it looks like:if(count($aProducts) > 0){
foreach ($aProducts as $key => $oProduct) {
if ($oProduct->iId == $oShopCore->oProduct->iId) {
unset($aProducts[$key]);
}
}
}

This error is still appearing in my error log. I have applied Andy's fix so hopefuly that will cure it, but it might be useful to add it to the SW download