I'd like to restrict access to portions of a site to paid users only. And that's the only thing my site will sell. I want the signing up process to be extremely easy. In particular just prompt the user for billing info (address, credit card) and then they are done. In short, I don't want the process of filling a cart with an item then checking out.
However, I do want other portions of the ecommerce module. In particular the admin screens and purchase history shown in the user profile.
Is this possible? Is there an API I can use to initiate a transaction without the shopping cart?
Thanks, -Dave
Comments
Comment #1
Dave Cohen commentedLooking through some code, I see that store.module may contain what I need.
Can I simply call store_transaction_save(), passing in values for the keys in store_transaction_fields() and store_transaction_product_fields()???
If I take this approach, will it work in the current ecommerce module? Is it likely to work in future versions?
Again, thanks. This looks like a wonderful module.
Comment #2
lucidcarbon commentedDave,
I'd like this functionality, too. Did you have any success with it or hear back from the developers?
Thanks!
Be well
-August
Comment #3
Dave Cohen commentedAugust,
I did not hear back. My site is still under development. When I have something fully working, if I can do it in a way that is generically applicable, I'll post code here.
Here's one of the more important pieces, creating a transaction containing a single product. It makes use of a feature of store's transaction validate and save methods, namely that you can pass in a field called 'nids' which is a list of product node ids.
Comment #4
simehousekeeping - bit old this one
Comment #5
TerrenceLP commentedIf one product, like a membership, etc..., I've used 'cart/review/' in the store config section under destination page after 'add to cart' has been clicked.
Running ec4 alpha 5, also can anyone show me an example on how to create a module for e commerce? I'm a module developer but can't seem to find good examples on how to interact with the product api, thank and hope the above helps!