You are here:  » Voucher Helper Tool Problem in IE


Voucher Helper Tool Problem in IE

Submitted by chrisst1 on Tue, 2013-06-25 09:59 in

Hi David

I have just stumbled upon a helper tool problem in IE that was pointed out to me this morning. The helper tool does not work in your PT demo in IE8, but works fine in my firefox. Is it possible to fix this?

Chris

Submitted by support on Tue, 2013-06-25 10:09

Hello Chris,

It's going to be a few hours before I have access to a machine where I'll be able to run IE8 - could you describe what's happening it's might be something I'm able to spot?

Thanks,
David.
--
PriceTapestry.com

Submitted by chrisst1 on Tue, 2013-06-25 10:22

Hi David

In the Demo the "Merchant:" and "Field:" at the top of form both remain blank and the form is not seachable.

Chris

Submitted by support on Tue, 2013-06-25 11:30

Thanks Chris,

I will check this out as soon as I have access to IE8, but if you would like to try in the mean time, in admin/voucher_codes_edit.php, look for the following code at line 477:

  helper_document = (helper.contentDocument || helper.contentWindow.document || helper.document);

...and REPLACE with:

  if (is_object(helper.contentDocument))
  {
    helper_document = helper.contentDocument;
  }
  else
  {
    helper_document = helper.document;
  }

Cheers,
David.
--
PriceTapestry.com

Submitted by chrisst1 on Tue, 2013-06-25 14:22

Tried that, no luck in ie8 and messed up in FF.

Chris

Submitted by support on Wed, 2013-06-26 08:04

Hi Chris,

I've checked this out, if you revert the previous suggestion; and then as before look for the following code at line 477 of admin/voucher_codes_edit.php:

  helper_document = (helper.contentDocument || helper.contentWindow.document || helper.document);

...and REPLACE with:

  helper_document = (helper.contentDocument || helper.document);

Thanks for pointing it out!

Cheers,
David.
--
PriceTapestry.com

Submitted by chrisst1 on Wed, 2013-06-26 12:34

Hi David

Nearly there, in your demo both "Merchant:" and "Field:" function correctly and update when changed in form, the search works correctly, addKeyword works ok but the addExact does not (only adds a coma if keyword added).

Chris

Submitted by support on Thu, 2013-06-27 07:54

Hi Chris,

Looks like IE doesn't set .value if a select box is just multi-line (not multi-select), so in admin/voucher_codes_helper.php look for the following code at line 146:

    setMatchValue(document.getElementById("results").value);

...and REPLACE with:

    res = document.getElementById("results");
    for(var i=0;i<res.options.length;i++){
      if (res.options[i].selected==true)
      {
        setMatchValue(res.options[i].value);
        break;
      }
    }

Alternative works cross browser as non browser-specific despite the quirk...

Cheers,
David.
--
PriceTapestry.com

Submitted by chrisst1 on Thu, 2013-06-27 16:05

Hi David

That sorted it, thank you.

Chris