Author Topic: Norwegian characters in order form gives order error  (Read 501 times)

Offline kimborg

  • Full Member
  • ***
  • Posts: 34
    • View Profile
Norwegian characters in order form gives order error
« on: 28/August/2012, 12:53:58 PM »
Version 2.3 on Joomla 1.5.26: When using "Alternatives" for an order form input field (in this case, which products could be chosen from a product dropdown list): In the field "Value, if you choose a value containging the Norwegian character "ø", the order is registered, but with error message that no product was chosen. I think its the same error message that appears when zero products are ordered. Attaches image shows which input box I'm referring to. If you do not have Norwegian characters in Value, everything's fine. Took some time to figure out ...

Offline netshine

  • Administrator
  • Hero Member
  • *****
  • Posts: 4,952
    • View Profile
Re: Norwegian characters in order form gives order error
« Reply #1 on: 28/August/2012, 12:59:35 PM »
The current version of nBill is 2.4.0, so it is possible this might already have been fixed. Can you confirm whether you get the same result on the nBill demo site? (http://www.nbill.co.uk/demo)

Offline kimborg

  • Full Member
  • ***
  • Posts: 34
    • View Profile
Re: Norwegian characters in order form gives order error
« Reply #2 on: 28/August/2012, 03:38:06 PM »
Tried on the demo-site, but not sure if I reproduces it, as the order process gave error "This recipient is currently unable to receive money."

Offline netshine

  • Administrator
  • Hero Member
  • *****
  • Posts: 4,952
    • View Profile
Re: Norwegian characters in order form gives order error
« Reply #3 on: 28/August/2012, 03:50:46 PM »
I activated the pending order you created on the demo site, and it created the order correctly, found the product ok. I suggest you try upgrading to the latest version of nBill - if you still have a problem then, please submit a support ticket and I will investigate further.

Offline kimborg

  • Full Member
  • ***
  • Posts: 34
    • View Profile
Re: Norwegian characters in order form gives order error
« Reply #4 on: 28/August/2012, 08:22:38 PM »
Same issue with 2.4.

Offline netshine

  • Administrator
  • Hero Member
  • *****
  • Posts: 4,952
    • View Profile
Re: Norwegian characters in order form gives order error
« Reply #5 on: 29/August/2012, 09:47:05 AM »
I don't think this problem has anything to do with Norwegian characters - your order form does not have any fields with a client mapping. As such, no client record can be created by the form, so no order record can be created either. If you want to create orders from an order form, at least one field must be mapped to at least one client value (you have some fields mapped to contact values, but not client values). If you don't want to collect any client data (such as address), you could just add a hidden field to the form and map it to the client country (for example) with a default value of "NO" (the ISO code for Norway). However, my understanding is that in many countries it is a legal requirement for invoices to contain at least some address data for the client, so you might want to consider collecting the client address after all.

Offline kimborg

  • Full Member
  • ***
  • Posts: 34
    • View Profile
Re: Norwegian characters in order form gives order error
« Reply #6 on: 29/August/2012, 10:10:30 AM »
Yes, this order form has client mapping, actually the standard one supplied with nbill (login or new customer). The case is: When there's no "ø" in field value, everything works fine: order is generated, new customer generated (or existing recognized) etc.
I've supplied you with admin details, so feel free to go backend and have a look. There's only one form that is published.

Offline netshine

  • Administrator
  • Hero Member
  • *****
  • Posts: 4,952
    • View Profile
Re: Norwegian characters in order form gives order error
« Reply #7 on: 29/August/2012, 11:35:10 AM »
The login/new client field is not mapped to any client value, however, I now spotted that you do have 2 controls on the first page which are mapped to client values. I apologise for the 'red herring'.

The problem here is not so much that the product is not found, it is that the value you select in that dropdown list gets set back to the default value when you click on the 'next' button (and the default value has no product associated with it). If you select the option that contains the ø in the value, then click next, then click back, it has reverted back to the first option in the list.

The workaround is simply to only use latin characters in option values. This should not be a problem as the client never sees the option value, only the description, which can include non-latin characters. Still, I will update the code for the next release to allow for encoded characters to be recognised in option values.