Checkout Modules
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
This group of modules provides an enhanced shopping cart and checkout mechanism, allowing users to purchase items from your Gallery. For full details, and instructions on how to install and configure the modules, see our page on the Gallery Codex. Please do not post support requests for these modules in the Tech Zone forums - there is a specific 3rd Party Modules forum for such requests at http://gallery.menalto.com/forum/75. When posting in that forum, please ensure you start the subject line of your post with [checkout] - this keeps the forum tidy and allows us (the module developers and support volunteers) to keep an eye out for threads relating to these specific modules. There's a demo site for the modules here. Be warned - any PayPal transactions you complete all the way through will result in real money being sent into my account!!! If you ask nicely, I might refund it ;) Feel free to do anything with the email payment option - this will just send you a copy of the confirmation email, but nothing further will happen. *** NOTE *** |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
And here are the modules themselves: *** UPDATED 8/4/2006 ***
If you require the modules for Gallery 2.0, please download older versions from the SourceForge repository. For items to have per-item pricing set the CheckoutPricing field as follows: These values will be parsed to overwrite the standard product prices. It is not possible to define new products here that the Checkout module doesn't already have defined. If CheckoutProducts is set to 'Only listed products' then only the products with per-item prices defined will be available for that item. Otherwise all products will be available, with per-item prices overriding the defaults where set. |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
turnbulm, great, just going to test this after the next CVS. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
Congratulations to the module release! Where's the demo? I wonder a little bit why you needed to create a new cart module (your checkout module). Maybe we can backport required features into cart or is there a fundamental difference between cart and checkout which would justify the existence and further development of both modules as framework for further cart/checkout plugins? |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
valiant- demo's coming... I'm just upgrading my production site, then I'm going to create a separate demo site. The logic for creating a separate cart was to support three main sets of logic:
I thought pretty hard about this before I split away from using the built-in cart module, but it had just got to the point where I couldn't see how to support the expanding operation of the checkout module and keep a good user experience.[/] |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
Feedback: Paypal admin page: - Checkout step 1: __and here's the first bug i've experienced: when i was first redirected to Checkout::Step 1, i got <br> stuff in the html form, see the attached screenshot. When i proceed to checkout, i get the <br /> in all fields. And I also get a few notices of undefined indexes... Another test gives me Notice: Undefined index: quant in /var/www/localhost/htdocs/php440/gallery2/modules/checkout/classes/CheckoutHelper.class on line 303 keep up the good work. of course it has a few bugs, but once they're fixed this is going to be very cool Unit tests would be awesome ;) They really help finding bugs. Basically what you do with unit tests is a) specify the functionality of your module and b) verify that the implementation meets the specification. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
And I guess we could merge checkout and the official cart module. The zip / print with shutterfly / ... checkout options could be included etc. |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
Wow! Quick feedback!! OK... to address your points in turn: @First config save redirects to modules - I'll get that sorted. It's entirely logical, I don't know why I didn't think to do it. @Paper - this is something I'm not entirely happy with myself at the moment, and I think it's probably going to be replaced pretty soon by a new product structure. For the moment I'll put an example in there (it's basically for the user to choose Matt/Gloss paper for prints) @Default currency code - I was trying to be impartial and just going alphabetically... by preference I'd go for GBP, but then again USD is probably going to be the most used... What the heck, I'll default to USD in the next release. @'Back To Album' option - I hadn't noticed that the Navigation block is no longer available down the left hand side, which is where I always used to go for that option before. I guess now I'll have to work out how to go back from my view to where the user last came from... Any clues how I tell which view they came to me from? @bug - I don't see this on my install. Please could you attach the relevant snippet from View Source so I can work out which tags in the template are getting in where they shouldn't? @bug2 - I also don't see these br tags in the checkout - again, please can you let me know the snipped of HTML source so I can track it down? @Undefined Indexes - this is an ongoing effort. We're down from many many problems to the last remaining few. For the moment it's in as something that has to be fixed before release 1.0, but there is a workaround (PHP error display off, and don't panic when looking at the logs!) I'm thinking of getting some unit tests in pretty soon, but I need to spend some time working out how best to make them realistic. For instance, with the PayPal module, how should I write a unit test for the IPN part? Ideally I'd need to create a transaction, then post back a fake reply from PayPal to see what happens. This sounds a bit difficult, so I'm working myself up to it! |
|
drhiii
Joined: 2003-04-27
Posts: 397 |
![]() |
Turnbulm... this is Flippin' Sweet. Valiant, unbelievably fast response! I learn a great deal just in this exchange, on how the checkout module works. Wow. |
|
drhiii
Joined: 2003-04-27
Posts: 397 |
![]() |
Valiant, a quick note on "Paper". This is a really big deal for museums, pro photogs, etc... when I first saw that turnbulm had provided this I jumped up. Being able to allow custom paper selections is a huge, deal for some photogs, print shops, etc. When I showed this to some photographers a couple weeks ago, the overall response was one of amazement, because no one ever thinks of that they said. I think I know what you are expressing here tho. A little more description to the user when setting up a Checkout mod, what this means if *they* don't know what it means. I think that is what you were driving at. Am just adding $0.02, that this feature really rocks. Just a thought here... as you said, this is a really cool module. valiant wrote:
Feedback: |
|
JerrySegers
Joined: 2005-07-13
Posts: 44 |
![]() |
Ok so I am a little dense today. I downloaded the latest version of Gallery2 Beta 4 and did a clean install (removed old database and gallery2 folder then copied the newly downloaded folder into the same location). Next I downloaded the checkout, paypal, and e-mail options from the message above then copied them as separate folders into the modules section of the Gallery2 folder. When I install all goes great except that I can not configure the checkout module because of the error: Checkout 0.1.1 Checkout the cart using Paypal Incompatible module! Core API Required: 5.0 (available: 6.4) Module API Required: 0.10 (available: 2.0) Do I just have bad carma and need to wait till tomorrow? :wink: Or is there a line somewhere I need to change? - Jerry |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
JerrySegers, you'll need the version 0.1.8 available from the topmost post of this thread for B4 !! |
|
DAG
Joined: 2005-07-23
Posts: 3 |
![]() |
I just upgraded both my gallery 2-3 to the 2-4 version from the nightly build (7-22-05) and also the 3 cart modules at the top of this message string. When I ran the upgrade option I received the following error. I have had no probelms upgrading in the past. The other 2 modules upgraded fine? Any suggestions the mods are great. Error Detail - |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
I suddenly can't open the checkout page - I see (one of the two) Apache processes dying and the chekout page stays empty. Un-/Re-installing the modules doesn't help. Any idea? Afterwards Apache becomes unresponsive... |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
JerrySegers- It looks like you still have the old versions of the modules. See the version reported in the error message is v0.1.1? The current one in the download at the top of this post is v0.1.8. I'd suggest making sure you don't have any old checkout directories in /modules and unzip again. Maybe your unzip command was set not to overwrite existing files? DAG- I'll take a look at the code and try to work out what could be going wrong. I see this is for the main checkout module - did the other two modules upgrade OK before you tried this one? It shouldn't make any difference, but it's better (for data migration reasons) to upgrade the PayPal and/or Email ones first... LFrank- I haven't seen that with the Checkout module, but I did get the problem with other bits of B4 when I upgraded. The fix for me was to flush my Firefox cache. No idea why it happened or why that fixed it, but I haven't seen it since. Are there any errors in your Apache log when things go bad? |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
turnbulm, clearing (all kinds of) caches didn't help. Access log is not specific, error log: only states the 'exit'. Strange - will make a re-boot (sometimes helps ;)) |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
Ouch - rebooting does not help - I can't fix. Apache keeps dying trying to open the checkout page ... do you thing a Gallery Debug Output could help? |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
I'm at a loss as to what could be causing this - turning debug on would be a good idea, but I don't know if it will give you any more information. I'd love to be able to work out what is causing the problem as it sounds quite serious. Could you also turn up the logging level in PHP and Apache to try and get some more information on this? |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
Ok, I'll do - in the meantime - guess what, after activating the debug it opens ... but the fails to ask for the details - I hate those unreproducable, erratic issues... I'll keep the log levels up to control this a bit. |
|
kuku.lele
Joined: 2005-07-16
Posts: 5 |
![]() |
turnbulm these modules are great. Once I read that u'r planning to add transactions admin plugin for the cart, where r u regarding this? |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
LFrank- isn't that just typical :roll: Oh well - as you say, keep the debug turned up for a little while just in case it happens again. I would like to get to the bottom of it if possible... kuku.lele- the transactions view in admin is just starting to come together. As of these latest versions all the required data is being gathered and stored, so it is just a matter of viewing it nicely... not entirely easy though! I'd guess that I'll have something working in a couple of weeks, as I do have to allow a little bit of time for my real job as well |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
DAG- I've had a look at the code and I can't see any reason why you would get that storage error. Please can you tell me which version of the Checkout module you are upgrading from? |
|
stukintx
Joined: 2005-04-15
Posts: 16 |
![]() |
Hi, Can CheckoutPaypal & CheckoutEmail both be installed...in other words can you choose between the two once you get to your cart? Thanks... |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
stukintx- yes, they can both run side-by-side. The user will be presented with both buttons at the checkout when they need to choose a payment method. |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
Updated the front post to add a link to a demo site here. Be warned - any PayPal transactions you complete all the way through will result in real money being sent into my account!!! If you ask nicely, I might refund it ;) Feel free to do anything with the email payment option - this will just send you a copy of the confirmation email, but nothing further will happen. |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
stukintx- I should also add that the payment buttons will appear in the order that you activated them in site admin->modules. So, if you want PayPal to be the first option then you should make sure you activate that module before the email one. To change the order you can just go back and deactivate both modules then activate them again in the order you require. There is no need to uninstall the modules - just deactivate them. |
|
stukintx
Joined: 2005-04-15
Posts: 16 |
![]() |
Thanks turnbulm... |
|
DAG
Joined: 2005-07-23
Posts: 3 |
![]() |
turnbulm thanks for such a speedy reply, your module rocks. You asked: Which version- I was running the latest versions of checkout, email and paypal modules, released prior to this current release for G2-4. Everything was working fine. I was using a G2-3 CVS released late in June. I did upgrade the other two modules and they appear to have uprgraded fine. Just the checkout module generated the error. Any help would be appreciated to correct this error, I think your modules are great and would like to use them. Thanks I set Gallery to Debug and received the following report, stating the erorr is in one of the sql statements. |
|
JerrySegers
Joined: 2005-07-13
Posts: 44 |
![]() |
turnbulm, As I suspected it was bad karma. I downloaded the same file today as suggested by LFrank, and all is well. I will get back to testing as soon as I pick up my MySql server that failed to restart. - Jerry |
|
highpulse
![]()
Joined: 2004-05-15
Posts: 45 |
![]() |
I haven't installed G2-4 yet and hope to find time this weekend. Thanks for updating the checkout modules too! Love the screenshot that valiant attached to his feedback. I wonder if he uses a Canon 20D too? |
|
drhiii
Joined: 2003-04-27
Posts: 397 |
![]() |
Turnbulm, Finally back (sadly, a passing in the family). Have had opportunity to install and test the G2B4 Checkout Modules. Everything works. No errors here. And using Mod_rewrite too, fwiw. I will press forward with some deeper testing, and if it is ok, will supply some responses on the logic and flow. It really is a pleasure to be able to come to your modules and work with them. Am amazed at how far these have evolved in such a short period. drhiii |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
DAG- Please can you let me know which version of MySQL you are using? I've never seen this error before, and I'm wondering if it might be a DB compatibility thing to do with the way I'm migrating data during the upgrade. |
|
drhiii
Joined: 2003-04-27
Posts: 397 |
![]() |
In further testing this morning, found that in the latest G2B4 and Checkout mods, was unable to have the Add Album to Cart function bring up the entire Album for individual selection... as it has done in the past. Will continue to test this to see if it is something I am doing. Will report back. |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
drhiii wrote:
... was unable to have the Add Album to Cart function bring up the entire Album for individual selection... as it has done in the past. I can confirm this - it states now the cart being empty - 'before' you could select individual items. EDIT: just checked your site turnbulm, there it works fine - strange... rechecked mine and found again a bit erratic. btw. I've allowed myself to change a few "add to cart" to "purchase" to keep it separated from my ZIP download cart ;) |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
turnbulm wrote:
Updated the front post to add a link to a demo site here. Be warned - any PayPal transactions you complete all the way through will result in real money being sent into my account!!! If you ask nicely, I might refund it ;) Same applies to my site http://localmail.dynip.com/GALLERY2 ;) (The PayPal Option has to be handled with care - I don't know yet how to make a refund |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
DAG- Valiant has pointed out the error in my code that was causing your problem - it's MySQL version dependant which I guess is why nobody else has seen it yet. I'll fix the code and get an updated version out this afternoon drhii + LFrank- I can't understand how this would work from the sidebar but not from the item links - the same code gets called in both instances, I've just registered the action and its up to G2 where it gets shown! I'll play around with it and see if I can work anything out. Just wanted to check you're not using it on albums that only contain other albums? It's not recursive - it will only add items directly inside the album you act on. I'm confused why so many problems seem to have appeared for B4 - all in areas of code that haven't been touched since the last release! I'll have a good look through things again as soon as I can and see if I can see anything obviously wrong. In the meantime, thank you all for your patience. |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
turnbulm, it's on me (us) to thank you for all the efforts you put into these modules, it's really highly appreciated! |
|
stukintx
Joined: 2005-04-15
Posts: 16 |
![]() |
I have 2 problems with the checkout module that I can't quite figure out. They are both Smarty errors and I've cleared the template cache but the problem still exists. First one is when you add an item to the cart I get Smarty errors on the paper type until I select one and then it goes away. The second error is on the Email Cart page where all the fields have Smarty Undefined Index errors inside of them. Anyone have any ideas what the problem is and how to correct it? Thanks... |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
can't stop myself playing with this module One - cosmetic issue - Having "bought" all available options, the empty box looks slightly, hm - unneccessary. What do you think? |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
stukintx, what versions do you have installed (module, gallery...) ? |
|
stukintx
Joined: 2005-04-15
Posts: 16 |
![]() |
I have Gallery 2 B4 and Checkout 0.1.8, Checkout by Email 0.0.4 and Checkout by Paypal 0.1.5 |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
stukintx, strange - never had this since the start... I only could propse to turn on the debug option to get more info. |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
stukintx- Valiant saw something similar to this, but I haven't been able to track it down. Please could you post the HTML source for both the pages you mentioned where you have the problem? This will (hopefully!) help me pinpoint the problem. LFrank- good edge case, I hadn't thought of that. I've added a task to do it... |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
DAG- I've fixed the code that was causing your problem and updated the Checkout module at the front of this thread. Please can you download the new file (still v0.1.8 ) and try the upgrade again? Let me know if you have any further problems. |
|
stukintx
Joined: 2005-04-15
Posts: 16 |
![]() |
turnbulm...hopefully this is what you're asking for. If it's not please let me know. Thanks for your help. |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
stukintx- that's exactly what I needed. It's given me the line numbers where the problems are happening in my templates, so now I'll just try to work out how to fix them :roll:. As soon as I've got it I'll upload new versions of the modules for you. |
|
drhiii
Joined: 2003-04-27
Posts: 397 |
![]() |
I second, third, fifth and sixth that. I began to seeG2 and the Checkout modules as a possibility for non profits, and I slowly started to let some local entities see it. Believe I am right. One cannot express enough appreciation for this work. The Checkout modules. G2. This great open source effort. LFrank wrote:
turnbulm, it's on me (us) to thank you for all the efforts you put into these modules, it's really highly appreciated! |
|
DAG
Joined: 2005-07-23
Posts: 3 |
![]() |
turnbulm Thanks I installed the modified checkout 7/22/05 and it installed with no problems. I sent a test by email and it sent the test purchase. I havn't had a chance to play with it or yet but it appears to be working fine. You ought to change the name to flippin sweet checkout. I hope you continue upgrading you are doing a great job. Again thanks |
|
drhiii
Joined: 2003-04-27
Posts: 397 |
![]() |
After working to understand the combinations of possible usages, a couple of questions. How can one turn off the Checkout Cart/module for an Album? And, can this be done on a per item basis too? There will be instances where an item could be viewed only, but the artist does not wish to have it available for purchase. Ideas anyone? |
|
turnbulm
Joined: 2004-10-03
Posts: 431 |
![]() |
drhiii- I know it's not elegant, but you could just remove the '[checkout] Purchase item' permission from the albums but leave it in place on the items. Same thing for making certain items non-purchasable... just remove the permission. |
|
drhiii
Joined: 2003-04-27
Posts: 397 |
![]() |
Turnbulm - was looking at this method when you sent your response. Hey, not inelegant at all. Whatever works is cool. Will wrestle through the combinations and see how to make it function. Checkout is looking excellent. |
|