d3bug3r
d3bug3r

Reputation: 2586

Magento undefined constant

hi have a problems with magento as it shows me this error when i click sunglasses menu:

Notice: Use of undefined constant id - assumed 'id'  in /var/www/app/design/frontend/glassesonline/default/template/mana/filters/items/list.phtml on line 159

This is code at line 159

<input id="category" type="hidden"  value="<?php $arr = $this->getRequest()->getParams(id,false); echo $arr['id']; ?>">

This drive me crazy, please let me know where am i wrong, i will provide more info if needed.Thanks

Upvotes: 0

Views: 1903

Answers (1)

MAXIM
MAXIM

Reputation: 1221

it should be:

<input id="category" type="hidden"  value="<?php $arr = $this->getRequest()->getParams('id',false); echo $arr['id']; ?>">
                                                                                        ^^^

you are missing quotes here and PHP is thinking you are trying to use a defined varuiable which you do not have. Always use quotes for strings.

Upvotes: 2

Related Questions