Closed (won't fix)
Project:
e-Commerce
Version:
4.6.x-1.x-dev
Component:
address
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2005 at 11:40 UTC
Updated:
22 Sep 2006 at 04:24 UTC
Jump to comment: Most recent file
Comments
Comment #1
ñull commentedIs your patch related to this issue? If it is, can I mark it fixed?
Comment #2
ñull commentedSorry, I forgot to include the link: http://drupal.org/node/34902
Comment #3
pz commentedThe main problem is the same -- anonymous purchases doesn't work, but this issue is agains 4.6 the other against cvs. The patch only fixes some typos not the main problem.
Comment #4
jeff veit commentedBefore anyone else fixes this: I've fixed it, but I have to bundle up it up into a patch which will happen in the next couple of days sometime.
Comment #5
Jesse Grosjean commentedI'm trying to get anonymous purchasing to work with paypalpro. I would love to see what changes you found were necessary to support this. Even if you don't have time to make a patch, just a description of what you did would help. Thanks.
Comment #6
h3 commentedI noticed too that anonymous purchase was broken and sadly, I really need it :|
When click checkout while logged in I get the shipping and billing address form showing up correctly, but when I try as anonymous user, i get this MySQL error:
And only the "Adresse E-mail:" field shows up..
Anyone can help ?
Comment #7
h3 commentedI just found out that this issue was a duplicate of this one: http://drupal.org/node/34902 wich as a big part of the solution.
To make this feature work, here's what i've done..
First
Like jessethouin said in his reply #3,
on the cart.module at line 801 I've changed
Second
thanks to averageyoungman with his reply #2, in address.module within line 125 and 135
now both billing and shipping address form are shows up correctly without any errors, but when I submit it I always get the same error :|
I'm really getting crazy with this bug
Comment #8
matt westgate commentedI've committed the above patch. Please let me know if this issue is resolved.
Comment #9
pz commentedThat won't fix the issue of the address information not being saved for users that are not logged in, the code assumes there is a address "object" but for users not logged in there never is one.
Comment #10
Timotheos commentedYep it's still messed up.
Basically when an anonymous user is checking out their is no $txn->shipping_address to validate since the anonymous user is using the store_transaction_addresses_form which has a field like shipping_street1.
Sooo... a quick fix is to do something like this...
Is anybody else working on this? Seems to me we should make some of the transaction fields required if we're going to use it for anonymous users. I can do this and wrap it in with what I'm doing on http://drupal.org/node/39655
Tim
Comment #11
jeff veit commentedYes - I've fixed anonymous purchases and I think it addresses the issues below, but I haven't built a patch.
Was hoping to do it yesterday, but it's more likely to be Monday now. If anyone wants I'll drop them my code which is 4.6. It has some other enhancements too though, which I should separate into separate patches.
Jeff
Comment #12
jeff veit commentedHere's a patch for this problem. It's been built against ecommerce 4.6. It's tested with PHP 4.4. It needs testing with PHP5. My version of Drupal is a hacked 4.5 so it would be good to test against Drupal 4.6.
Line 192 of store.inc is not one I remember changing, so it's possible that this patch may unintentionally reverse a fix for something else.
This is my first patch submission to Drupal. Let me know if there's a problem with the patch format.
Jeff
Comment #13
jeff veit commentedThis patch needs a further extension: if there's a shippable product and shipping details are entered, but billing details are not (or vice-versa) then the values of the one should be used for the other. I haven't had time to add this and since that's a less important problem and there's been a bit of clamour for this fix, I won't wait. I'll open another feature request for this change.
Comment #14
sethcohn commentedYes, the patch is in the wrong format...
Among other things, the slashs are the wrong way which confuses patch.
Comment #15
rkerr commentedI did a workaround for anonymous people buying products with the Cart, but it actually skips the address section completely.. so that I could send people's cart contents to 2checkout and use their address and payment forms instead.
So, I really only had to change cart.module... but if I'm interested in making sure anonymous users can make purchases so will watch this issue for a bit.
Comment #16
jeff veit commentedHere's a version with slashes the other way. Is that better?
All the comments above still apply; I've used a different patch tool, that's all.
Jeff
Comment #17
vitamin-1 commentedStill not work.
Comment #18
jeff veit commentedVitamin,
When you say 'Still not work', do you mean that the patch wouldn't apply? That the format of the patch was wrong? Or that you found a bug in the patch.
Thanks,
Jeff
Comment #19
vitamin-1 commentedSmoothstream,
I took latest e-commerce from CVS with DRUPAL_4_6 tag, then I downloaded your patch.
First of all, it seems to me that patch tries to "downgrade" some pieces of code to previous version.
But anyway, anonymous purchases does not work for me - it give me same error (Please fill shipping address, Please fill billing address - regardless that they are filled or not).
Comment #20
q0rban commentedAny update on this? I'm trying to get this to work... Not sure which of the above patches I should try...
Comment #21
pjdevries commentedI second that! Need that functionality badly!
Comment #22
vitamin-1 commentedHere http://drupal.org/node/39655 is the solution.
Comment #23
iokevins commentedThanks for this patch, it solved nearly all my troubles. :)
One note for anonymous purchases, one might want to restrict access to the store/history/0 page (modules/ecommerce/store/store.module) thusly: ;)
175 /*$items[] = array('path' => "store/history/$uid", 'title' => t('order history'),
176 'callback' => 'store_user_history', 'access' => $user_access, 'type' => MENU_CALLBACK);
177 */
Not sure this breaks anything else.
Otherwise anyone in the know seems to be able to publicly access store/history/0 and view customer billing and shipping data. x_x
I have updated http://drupal.org/node/39655 with this bit of news as well.
Kevin
Comment #24
kbahey commentedFor those who do not know how to patch module, here is a prepatched version of address.module for 4.6.
Comment #25
kbahey commentedHere is a patch against the latest 4.6 branch, as per Gordon's request.
Comment #26
gordon commentedThanks all, I have commited this to cvs.
We need to roll this into cvs.
I have activated this again, so that someone can port this change to cvs.
Comment #27
wpd commentedApplied patch to cvs version as requested. Can not really tell if it works until more of the ecommerce module is updated.
Comment #28
gordon commentedThanks I have commited this.
Comment #29
pjdevries commentedBeing not very well CVS educated, it took me a while to figure out how to access the E-Commerce CVS. The main problem is an invalid link on the E-Commerce project page (http://drupal.org/project/ecommerce). The 'Browse the CVS repository' link points to http://cvs.drupal.org/viewcvs/contributions/modules/ecommerce/ while it should be pointing to http://cvs.drupal.org/viewcvs/drupal/contributions/modules/ecommerce/,
By the way, can anyone explain how to access the 4.6 branche from TortoiseCVS? Updating the branche list only shows HEAD and DRUPAL-3-0 upto DRUPAL-4-2.
Comment #30
pjdevries commentedThis time I tried SmartCVS to obtain the latest E-Commerce 4.6 modules and that seemed to work. However, a quick comparison of the retrieved CVS modules with the default E-Commerce 4.6 project download (http://drupal.org/files/projects/ecommerce-4.6.0.tar.gz) shows quite a few changes, many of them having to do with the new 4.7 Forms API. Can anyone explain that? Have I retrieved the wrong Branch/Tag from the CVS and if so, what should I do to obtain the latest 4.6 revision?
Comment #31
q0rban commentedThis worked for me (smartCVS):
Make sure you select Tag in the Kind of Revision to get drop down box on the Checkout page. Then in the Tag form field, type "DRUPAL-4-6".. Hope that helps!
Also, be careful when you change the title when posting comments to bugs. It changes the title of the whole bug thread.
Cheers...
Comment #32
wpd commentedYou can do it from the command line like this:
You can also use the command cvs status to make sure your files are marked with the sticky tag DRUPAL-4-6.
If not you have the wrong branch.
Comment #33
kbahey commentedI just discovered that the committed patch for address does not work for registered users on 4.6.
The user cannot get past the /cart/checkout page, and gets the error message: "Please enter a valid email address".
Here is a one liner patch that fixes this (Just a
global $user;in the address_checkoutapi() function. it is so small it does not warrant an attachment).Comment #34
gordon commentedThanks I have added this.
Comment #35
gordon commentedComment #36
pjdevries commentedThanks to James and Scott for the pointers on using CVS. It appears I succeeded in checking out a working 4.6 version now.
Sincere applogies for changing the title when posting my comments. I didn't realise it changes the title of the whole thread. It won't happen again.
I have a couple of additional questions concerning the address module. Although I have over 20 years of programming experience, I'm new to Drupal and to PHP and web programming but for my current (and first Drupal) application I want to make a couple of modifications:
1) I want to add a couple of fields to the address form.
2) It seems that only the e-mail address field is mandatory and I would like to have a few more.
3) I would like the red asterisk to show up near all the mandatory fields on the address form.
4) I would like to integrate the address module with the Drupal profile in such a way that an unauthenticated visitor can purchase a subscription and become a registered member all at once, without having to enter any details twice.
Are the above things doable for an unexperienced Drupal/PHP programmer like myself and can anyone give me e few pointers where to start?
Comment #37
coupet commentedDo I have to download cvs E-commerce module to obtain latest patch version of address module?
Can I download latest patch address module seperately ?
Thanks, Darly
Comment #38
pjdevries commentedWhat I understand from this thread, is that replacing just the address module should work. Comparing the complete 4.6 E-Commerce package with the CVS version, shows quite some differences in other modules as well. I didn't take the risk and downloaded the complete E-Commerce CVS package which seems to work (as designed).
By the way: can anyone spare the time and energy to help me out with the questions in my previous post?
Comment #39
coupet commentedWhat happens after the user make paypal payment?
Does the user become a member of authenticated user role?
Is the user still anonymous ?
Can we choose how the member is assigned after payment?
Thanks, Darly
Comment #40
AgnesCB commentedIt looks like the patch to address.module to fix checkout for anonymous users (the move from 1.16.2.5 to 1.16.2.7) broke things for authenticated users when the E-Commerce module is set up to require users to be logged in to order.
When reaching the "review and submit your order page" the billing address (I only tested with non-shippable items, shipping address is probably the same) shows up as blank. This is when testing with the latest E-Commerce files for tag 4-6.
Resetting this as active, while noting that downgrading back to release 1.16.2.5 of address.module took me past that bump. Except that now checkout fails silently when placing the order, but I haven't figured out if this is related to this issue or is something different...
Comment #41
AgnesCB commentedThis is currently against 4.6, as HEAD has moved to 4.7.
Comment #42
AgnesCB commentedHere is a patch that fixes things for logged users and shouldn't break anonymous purchases, although I haven't tested those.
Needs to be reviewed by a better PHP programmer than I am (was it a scope issue?).
Comment #43
gordon commentedLooking at this patch, there is no change to the code. Basically the patch removes 1 line and then duplicates that same line twice.
This think this was a problem on you system that you accidently fixed.
Comment #44
AgnesCB commentedI know. None of this makes sense.
I got to this place by rolling back to the latest version that worked in CVS, and then applying differential changes. Removing the last change (the one that moved that line out of the if statement) solved the issue in my environment: the address selection combo was showing again. Putting it back in both places got me a duplicate. Having it outside of the if? Nothing. I added it back inside the else statement to make sure there wouldn't be any changes for anonymous (I don't use about anonymous purchases, other people might).
I will wipe out my test environment and start from scratch with a clean/empty Drupal and E-Commerce install... Downgrading this in the meantime.
Comment #45
jeff veit commentedI finally have the time to get back to the anonymous purchase problem. I'm hoping to whack this today.
I've done a series of tests, and the results are listed below.
I'm using Drupal 4.6 download version, together with ecommerce 4.6 head. Everything is standard: it's a new set up.
Ecomm set up: I have a tangible item and a non-tangible. I haven't tried anything with grouped items. The ecomm module lets you set the order of checkout screens. I am only using the default - address first, then payment, then cart, although a brief test suggests that the problems are there for other screen ordering too.
Firstly using cash on demand as the only payment option, with anon purchase:
Now using paypal with anonymous purchase:
General:
If anyone else knows of any other problems with anonymous purchase, please list them here.
Comment #46
AgnesCB commentedI disagree.
We use the E-Commerce module for a local non profit that sells memberships through its website. While Paypal makes our life easier, we have more than a few members who are not very tech savvy and still prefer to pay by check. To us non-tangible + COD is a necessity (even if it is not actually check on delivery but rather send your check and your order will get processed manually).
Comment #47
jeff veit commentedThanks, that's very useful to know.
Comment #48
jeff veit commentedThere are two related conversations going on: http://drupal.org/node/41136 and http://drupal.org/node/14604
I know that this is anonymous purchase bugs, and that's what I'm working on, but it's the most complete conversation that I've found so far about workflow, so I'm adding this bit into the mix from 41136
--------
The payment modules should have:
- the ability to check that the info that has been submitted is appropriate for that payment method
- the ability to specify the address format required
Actually, it might not only be the payment modules that should be able register address requirements, there's a note somewhere that says that tax modules have some address requirements too for GST (General Sales Tax).
The address module should communicate with the payment method modules to get the definitions of requirements, and collect the specific details for that payment type.
The workflow order should be fixed to:
payment type screen, addresses, checking
This order allows you to collect only the data required for that particular payment type.
The address module should provide a mechanism to define extra fields that should be collected.
What holes can you find in these proposals?
-------
Comment #49
jesse_idc@civicspacelabs.com commentedI have tried patching address.module,v 1.16.2.5 2005/12/02 with the patches above, including trying Khalid's pre-patched module, running drupal 4.6. While this superficially allows anonymous users to pass the "enter shipping/billing info" step, the entered billing/shipping info is not passed along to the rest of the checkout process. Confirming the order results in a blank screen (I am using PayPal as the sole payment method).
I've looked at this thread, and http://drupal.org/node/39655 and found no solution. Do I have to wait for 4.7 to fix the anonymous purchases issue, or are there other files within ecommerce that I need to edit in order to make this work?
Comment #50
jesse_idc@civicspacelabs.com commentedIgnore my last comment - it turns out I did indeed need to update another file. I needed to get a more recent copy of the cart.module file, which I found here: http://cvs.drupal.org/viewcvs/drupal/contributions/modules/ecommerce/car...
Comment #51
q0rban commentedWell, I thought I anonymous purchase working using the above patch, until I had an anonymous user purchase a file. How does an anonymous user access their files? And if they can't, shouldn't there be a check to make sure that anonymous users who try to purchase a file must first create an account?
cheers..
Comment #52
coupet commentedI have similar issues to q0rban. I think new user should require only the following (username, password and email) then they will be able to download files or have access to content as defined by roles.
Scenario (1) for generic product - no shipping infromation required
-------------------------------------------------------------------
1. Anonymous user 2. Not a new member (no information is obtained from user) 3. Paypal payment 4. Address obtained manually thru Paypal for processing
Scenario (2) for generic product - no shipping infromation required
-----------------------------------------------------------------
1. Anonymous user 2. Becomes a new member (obtain username, password, email from user) 3. Paypal payment
Thanks, darly.
Comment #53
wpd commentedThe checkout logic should not branch for anonymous users.
Proposed flow: (anonymous user)
1. Hit Checkout Link
2. Display Login box AND ask for email address
3. IF user Logins then go to step 5.
4. Create account for new user
5. Proceed with normal checkout (addresses, payment, etc...)
This wil simplify the logic in the checkout process. The key to this is making the creation of the account a normal part of the checkout not an annoyance to the user. (Although creating an account should be less trouble than buying a file they can not download ;))
New code will be need for step 2 and 4, but that should be adaptation of existing drupal code.
Note: this is how amazon.com deals with purchases.
Agree/Disagree? I have not looked at coding this because I do not want to waste my time if nobody likes the idea.
Comment #54
q0rban commentedI agree, but one of my clients would disagree. For some reason or another, anonymous purchasing is dear to his heart, which leads me to believe that many customers might feel the same; ie, that it is a hassle to have to register before making a purchase.
The only thing barring anonymous purchase from being completely possible with e-Commerce seems to be the 'file' product issue. For those of you possibly not aware, after files are purchased, they are available under a 'my files' menu item associated with the current user. A database call is made which looks up the transactions made by the current user (uid), and associated files are listed in this fashion:
http://www.example.com/store/myfiles/1/download?file=filesdirectory/mydownloadfile.blah. The '1' you see there is the uid. This protects (prevents) any anonymous user from accessing the files. This is a good thing, and IMO we do not want to bypass it, for security reasons.In a conversation with smoothstr we brought up the idea of having a forced registration for certain product types, configurable in admin. The main product type in mind, obviously, is the 'file' type. Smoothstr suggested the possibility of certain (tangible) product types that should require login such as guns or the like. Does anyone else foresee any other possible product type that would require login before purchase? Otherwise, my vote is to force login for 'file' products and let anonymous purchases be made for all other purchases (contingent on the anonymous purchase setting in admin).
cheers,
q0rban
Comment #55
coupet commentedI think simplifying registration and payment process for the new user is the objective.
Files download may requires being a member.
Also, the site might be selling membership access to content, then address is not required.
I think the minimum should be required to obtain payment and be registered to get access to files download or view content.
Also, logintoboggan improves Drupal's login system.
Thanks, Darly
Comment #56
simeWe are not supporting 4.6 now. Please re-open if any problems.