Jump to content

[BUG FIX] - customers in apartments can't order


Recommended Posts

Hey guys, it's me again! Guess what I woke up to - another critical error in Prestashop that prevents customers from giving me money. Its not like the spent 15 minutes browsing, finding an item, and then dutifully filling out the registration form.

Now I must step aside, and say that unlike most people running PS, I have a 1 click checkout module installed. While some people might bemoan my distrust of bureaucracy (the official PS party line why 1 click guest checkout isnt added by default), I subscribe to the capitalist viewpoint that it's a GOOD THING to let people give you money as easily and quickly as possible in exchange for my good. Crazy, huh?

Anyway the bug is this. PS uses a system called "Alias" to provide repeat customer an easy to remember dropdownlist of past shipping address. Not bad in theory, but alas....like much of PS, it's bug riddled, and rife with logic errors.

Suppose your address is "#123 43 main street". This is not super common in the US, but very common elsewhere, and works as a valid US address. You might write it as

address 1: 43 main street
address 2: #123

but today you don't feel like doing that. Today you live at #123 43 main street. No problemo, I can still take you order, right?

WRONG!

2 bugs here:

#1 - with 1 click checkout, its creating the alias on the fly from your address. Everything looks good, but the user gets an error:

"alias is invalid"

Sorry bro - you can't live at an address starting with # with 1 click checkout


#2 - Using the default checkout (lol 4 page checkout process decreasing conversions 20%, 20% less conversion with a 4 page checkout lol), you can freeform your alias. Woe to you if you copy and paste your apartment number into the field.

And what do you get?

""alias is invalid""

Great error message there. Let's dog the customer because you can't program a decent ecommerce system You're invalid.

Why does this break?

In Address.php

'alias' => 'isGenericName'



regexs and fails if first character on alias is a # tag.

change it to

'alias' => 'isAddress'



and viola (lol I can spreak french lol) - people in apartments can checkout.

Thank you kind sirs for the privilege of using your open sores software.

Link to comment
Share on other sites

  • 10 months later...
×
×
  • Create New...