-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This should fix the issue where a customer, without predefined addresses, is unable to checkout. #219
Conversation
…ses, is unable to checkout. To replicate the problem, create a customer using the admin area. Do not give that customer an address. Login as that customer and try to checkout. This commit will assume that if the customer didn't pick "Use existing address" that they are trying to make a new address. fixes #80
@Lokiracer, impossible to see the difference https://github.com/opencart/opencart/pull/219/files check your IDE end-of-line settings |
I'm not sure what to check for. My IDE and TortoiseSVN both say only one change was made. Line 169 of the new file replaces line 169-171 of the old file. What settings do you recommend? Pic of TortoiseGit and my IDE settings to open files as Unix: https://lh5.googleusercontent.com/-jkmz5FPhrNs/UJbopuiohOI/AAAAAAAAYQU/0SrjJv44qWM/s1280/git.jpg |
try change "default file format" for "Windows" |
of course you need to make an address. opencart is not designed for some to checkout without one. |
And that type of response would be why I dislike helping out projects. How about contacting me, or looking at the issue. OpenCart makes it impossible to add an address for an existing account because there is no radio button to select "New address." Take the code or not, OpenCart clearly has a bug for existing users, created by the admin control panel, that don't have addresses. |
@Lokiracer don't worry. It's a strange repository. I also have many ideas to improve OpenCart code and architecture. But I lost desire to improve something after communicating with maintainer. |
unfortunately i'm very busy. i stopped work on the main script to update If I just accepted everyone's suggestion opencart would be a mess. if i On Fri, Nov 9, 2012 at 3:09 AM, Stepan Tanasiychuk <notifications@github.com
|
Wait. You're complaining to me that you put your codebase on git so people could help you with it? I didn't make a suggestion, I made a bugfix. A bug that multiple people have documented both here and on the forums. You dismissed it as if I was bothering you with my petty pull request. I think the words you are looking for are "thank you." Don't worry about spending more time with this pull request. I won't be bothering you again. |
Before you get too carried away there you should probably know that your code doesn't fix the bug. |
Loklracer - While I tend to think Daniel could exercise a little more diplomacy in his responses to peoples posts/pull requests, I respect his decision to only accept quality code. Just by adding Opencart to Github doesn't mean Daniel is going to take any and every pull request - not everyone's code is quality and not everyone's pull requests are beneficial to the Opencart Project. A lot of people submit pull requests that they should spend a little more time on before submitting. People also submit pull requests for non issues in OC, which are pointless to submit. In addition a lot of people post here for help with issues that are NOT BUGS. If you look back at the pull requests, Daniel did accept several pull requests recently for bug fixes and improvements. I'd encourage you take continue to work on the OC project and try to contribute to the project. Just make sure that you don't take rejections personally. Best of Luck, DS-Matt |
@OpencartHelp I'm not sure what you mean. I tested it and it resolved the issue for me. It seemed fairly simple, the checkout form expects a radio button to be checked indicating a new address or existing address. That radio button is not displayed when an account is created without an address by an admin. The change I made allows the form to submit without that radio button and by default creates a new address. @DS-Matt I didn't take the rejection personally. I took the tone of his comment personally. I also took the tone of his reply personally.
All things that don't apply in this situation. There is clearly a bug, noticed by multiple people, which I submitted a pull request to fix. Instead of considering the bug and my solution, Daniel's response is that I don't understand that OpenCart requires an address. I'm fairly confident I knew that, considering I'm fixing a bug that comes from not being able to checkout because an address can't be added. |
Line 125. The fact you can't spot it probably goes a long way toward explaining why your merge was rejected. |
@OpencartHelp Sorry, I'm not seeing anything wrong with Line 125 of my commit. Care to explain? |
Wow. Okay. So what do you think "Undefined index: payment_address" means? |
I didn't edit line 125, so I'm curious to know why my commit was rejected because of line 125. Unless you're inferring that the existing customer should call in to that if statement. Because they won't. Let me lay it out for you again. If an admin makes a customer via the admin area, they aren't required to enter an address. Then the customer logins and tries to checkout and they can't because OpenCart assumes they have an address, which they don't. The customer is shown the address creation form, but without the radio box that fires for line 125 or 171, thus not allowing an address to be added. |
That's the point! The bug is still there and will stop the checkout from proceeding! |
125 isn't the cause of this bug. You want me to do a code review on OpenCart for you? There are pages of files/lines that aren't properly written. I'm done replying. Good luck with things. |
That's the error I get when following your directions on re-producing. |
even if its a bug i can fix it myself very easily. i'm not here to jump up and down to fix things for you. I don;t have time to look into this. its not my fault that people keep replying to a topic that would take me less than 5 minutes to come up with a solution. |
Gyes, I like OpenCart. But he has a problems with the code and architecture. Do you not understand this? I don't want edit core files to extend the standart functionality. And I don't want used VQMOD (this is a hack). I want a flexible and extensible engine. I want to use all the advantages of OOP and PHP 5.3. PS. Someone working with modern frameworks? |
Ok, please list these modern frameworks. If you say zend your in trouble. |
@opencart of PHP frameworks we are using Symfony2 |
your wasting my time. Symfony2 is a bloat framework similar to zend. you can tell a bloat framework by the number of files required to generate pages. there is about 20 files just for the template system. opencart template system = 1 |
Obama can't fix everything. |
i'm very busy working on on the documentation system now and have been for the past few weeks but keep having to change the main opencart site to block scammers. I don't like jumping back an forth between different projects. people never accept what you say. they always have to get on a high horse and never admit they are wrong. when you run your own open source project that is as big as opencart (now 3rd most popular eCommerce project) then you will find out. people don't take no. they argue with you forever. I have already done my time messing with frameworks. I have been through zend, cake, Symfony, code inigitor and 100's of other ones posted on sitepoint. seriously do you think some one who has managed to get a project like this up and running by them selfs have not studied most the frameworks out there. Why would anyone want such a massive API like Zend or Symfony when its quicker to know the built-in php functions off by heart. opencart's framework uses a set a simple one file classes. maybe around 20. Symfony's class files goes into the the hundreds. which sounds more optimized to you? which sounds easier to learn. |
FYI, this popcorn magnet has been posted to reddit: http://www.reddit.com/r/webdev/comments/12wmr9/textbook_example_of_how_not_to_use_github/ I hope you guys believe in "any publicity is good publicity"... |
I have no control over anything here but I seriously wonder the same thing. Daniel can't seem to reject a pull request without it leading to a huge amount of complaining. We're debating frameworks now? Seriously? DS-Matt is absolutely right. People need to understand the project before jumping into it. I've been submitting bug fixes long before long before Github was used. Sometimes they get used, sometimes they get rewritten, sometimes they get rejected. That's how it works. Regardless of the debate on everyone's attitude and whether the bug exists, the simple fact is the submitted code doesn't fix it. That should be the end of it right there. |
@OpencartHelp It does fix it. It doesn't fix other issues with this file, but it does fix the issue of admin created users without addresses being endlessly redirect during checkout because it's impossible for them to create an address. I'm sorry I didn't clean up line 125 for you, but it would take a full time salary to fix all the issues with OpenCart. This commit was simply trying to fix a bug, not clean up the codebase. If you look at /catalog/view/theme/default/template/checkout/payment_address.tpl lines 1-19, you will see that is will be impossible for payment_address to be set by someone that doesn't have an address. Here are the steps to replicate the bug that this commit fixes.
This commit assumes that a new address is being created unless existing_address is the value of payment_address. Since you're so stuck on the idea that I didn't fix line 125, simply add an isset() check and call it a day. |
@Lokiracer banned! just got what you said in the mail. |
use magento instead i'm sure they have no bugs at all. |
@Lokiracer The problem is all your code does is ignore the error. It's still fundamentally there. It will still fill up your logs. It will still loop through checkout indefinitely if on-page errors are left enabled. This is a bad solution and running off to some other website because you don't like to hear that is goofy. I think it's far wiser to follow what OpenCart already does and put the solution in the payment_address.tpl template. Just add: <input type="hidden" name="payment_address" value="new" /> to the fallback form when no addresses are present (~line 21). One line and the issue is really fixed. |
fixed! |
не нужен полный путь до картинки. Надо просто пусто возвращать
To replicate the problem, create a customer using the admin area. Do not give that customer an address. Login as that customer and try to checkout.
This commit will assume that if the customer didn't pick "Use existing address" that they are trying to make a new address.
fixes #80