Uutiset:

Join the Facebook Fan Page.

Main Menu
Advertisement:

Undefined index issue

Aloittaja The Wizard, heinäkuu 17, 2013, 08:10:45 IP

« edellinen - seuraava »

The Wizard

Hello:

I'm getting the following errors -
LainaaLine: 109 - 8: Undefined index: shop_name
Line: 133 - 8: Undefined index: shop_asc

anybody have a idea how to solve this?

Wiz


// Get the sort type
switch($_GET['sort'])
{
case 0:
$context['shop_inv']['sort_type'] = $txt['shop_name'];
$sortQuery = 'name';
break;
case 1:
$context['shop_inv']['sort_type'] = $txt['shop_price'];
$sortQuery = 'price';
break;
case 2:
$context['shop_inv']['sort_type'] = $txt['shop_description'];
$sortQuery = '`desc`';
break;
case 3:
$context['shop_inv']['sort_type'] = $txt['shop_stock'];
$sortQuery = 'stock';
break;
default:
fatal_error($txt['shop_invalid_sort']);
break;
}

// And the direction
switch($_GET['sortDir'])
{
case 0:
$context['shop_inv']['sort_dir'] = $txt['shop_asc'];
$sortDirQuery = 'ASC';
break;
case 1:
$context['shop_inv']['sort_dir'] = $txt['shop_desc'];
$sortDirQuery = 'DESC';
break;
default:
fatal_error($txt['shop_invalid_sort_direction']);
break;
}

4Kstore

The $txt['shop_name'] and $txt['shop_asc'] variables not exits, you need to create these variables in language files

¡¡NEW MOD: Sparkles User Names!!!

The Wizard

Slams head into desk....

How could I have over looked something so simple.

Thanks 4Kstore! :)



4Kstore

No problem man, sometimes happens.
Cheers!

¡¡NEW MOD: Sparkles User Names!!!

Advertisement: