Try the Demo

Magento Forum

   
Undefined index:  isAjax
 
hartus
Jr. Member
 
Total Posts:  13
Joined:  2011-04-21
 

Hello,

My system.log show an ajax error :

2012-03-01T10:59:51+00:00 ERR (3): Notice: Undefined index:  isAjax in /homez.487/materielb/www/app/design/frontend/default/default/template/ajax/checkout/cart/sidebar/default.phtml on line 15

Is there anyone who already had this error ? I don’t know how to fix this anyone could help ?

Thank you

 Signature 

Eskem studio - Identitée visuelle & conception graphique pour PME et PMI
Agence de communication

 
Magento Community Magento Community
Magento Community
Magento Community
 
AlexHadley
Member
 
Avatar
Total Posts:  31
Joined:  2011-07-09
London, UK
 

Did you ever get to the bottom of this?

 Signature 

Lightnest Ltd - for Magento Development and Web Design.

 
Magento Community Magento Community
Magento Community
Magento Community
 
justintime67
Sr. Member
 
Avatar
Total Posts:  189
Joined:  2009-08-12
 

I have this error as well… can anyone provide any solution?

 Signature 

Happy Cow - Belts & Bags For People On The Mooove

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageBuzz
Sr. Member
 
Avatar
Total Posts:  109
Joined:  2011-11-23
Vietnam
 

I think the problem is described. Try to open that template file and find that line. It can bring you more useful information to fix the issue.

 Signature 

Store of Magento extensions, themes & solutions
Follow us: Facebook | Twitter
Skype: neo.azebiz

 
Magento Community Magento Community
Magento Community
Magento Community
 
boris_cb
Jr. Member
 
Total Posts:  10
Joined:  2012-05-09
 

Got the same problem right now.

And yes, i´ve already opened that template, but i´m not that good in php/ajax that i understand, where the error comes from.
so half of the implemented ajax´s not working and i can´t figure out, why.

no suggestions besides \\\"look in that template\\\”? hmmm

 
Magento Community Magento Community
Magento Community
Magento Community
 
FireHorse
Jr. Member
 
Total Posts:  5
Joined:  2012-09-12
 

I also have this error on line 15

if($params['isAjax'== 1){

I guess this means the entry isAjax is not in this array

Its obviously not critical but it would be nice to get it fixed, ideas anyone?

cheers
FireHorse

 
Magento Community Magento Community
Magento Community
Magento Community
 
AntoniArcorio
Jr. Member
 
Total Posts:  1
Joined:  2012-11-14
 

replace

if($params['isAjax'== 1){
by
if(!empty($params) && $params['isAjax'== 1)

 
Magento Community Magento Community
Magento Community
Magento Community
 
FireHorse
Jr. Member
 
Total Posts:  5
Joined:  2012-09-12
 

Didnt work, so I tried this and the Notice seems to have stopped

if(isset($params['isAjax'])) {
                
if($params['isAjax'== 1){

Cheers
FireHorse

 
Magento Community Magento Community
Magento Community
Magento Community
 
Preciouslinen
Jr. Member
 
Total Posts:  2
Joined:  2012-12-02
 
FireHorse - 12 February 2013 09:54 PM

Didnt work, so I tried this and the Notice seems to have stopped

if(isset($params['isAjax'])) {
                
if($params['isAjax'== 1){

Cheers
FireHorse

This didnt work for me but maybe I implemented it wrong. here is my code can you tell me how I should be placing the fix?

<div class="product-details">
        <
a href="<?php 
            $params = $this->getRequest()->getParams();
            if($params['isAjax']) 
                $isAjax = 1;
            else
                $isAjax = 0;
            if($isAjax == 1){
                $refererUrl = Mage::registry('referrer_url');
                if (empty($refererUrl)) {
                    $refererUrl = Mage::getBaseUrl();
                }
                $deleteUrl = $this->getUrl(
                    'ajax/index/delete',
                    array(
                        'id'=>$_item->getId(),
                        Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $this->helper('core/url')->getEncodedUrl($refererUrl)
                    )
                );
            }else{
                $deleteUrl = $this->getDeleteUrl();
            }
            echo $deleteUrl;

 
Magento Community Magento Community
Magento Community
Magento Community
 
FireHorse
Jr. Member
 
Total Posts:  5
Joined:  2012-09-12
 

my code seems to be a little different as it is coming from a slightly different file but hope this gives you ideas at least

in file app/design/frontend/enterprise/THEMENAME/template/checkout/cart/sidebar/default.phtml on line 15

<?php endif; ?>
    
<div class="product-details">
        <
a href="<?php 
            $params = $this->getRequest()->getParams();
            if(isset($params['isAjax'])) {
                if($params['isAjax'] == 1){
                    $refererUrl = Mage::registry('referrer_url');
                    if (empty($refererUrl)) {
                        $refererUrl = Mage::getBaseUrl();
                    }
                    $deleteUrl = $this->getUrl(
                        'ajax/index/delete',
                        array(
                            'id'=>$_item->getId(),
                            Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $this->helper('core/url')->getEncodedUrl($refererUrl)
                        )
                    );
                }
            }else{
                $deleteUrl = $this->getDeleteUrl();
            }
            echo $deleteUrl; 
    ?>

Hope that helps
FireHorse

 
Magento Community Magento Community
Magento Community
Magento Community
 
Preciouslinen
Jr. Member
 
Total Posts:  2
Joined:  2012-12-02
 

Thanks fixed my ajax, issues are over.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top