Checkout Modules

archetechs

Joined: 2007-07-02
Posts: 3
Posted: Tue, 2007-07-03 19:44

jayhen,

Thanks for the quick reply regarding the administration pages. At the moment i need to have something to make administration of orders easy before the end of the month. Based on your reply it looks like i'll try and extend what you've done already. Currently the things that i was looking to add was :

- status of each order and a means to move from one state to another.
- a process for gathering the photos from each order into a zip file, ready to send to a professional printer.

If you had anything else in mind you were thinking about adding, say now and i'll make sure i send the changes back to you!

Cheers.

 
jayhen

Joined: 2007-02-12
Posts: 159
Posted: Thu, 2007-07-05 14:23

archetechs - you'll probably have seen already that the order status is already stored in the database. Also, everything is in place to zip up orders, you just need to call the right functions. Let me know if you get stuck, I'll do what I can to help.

 
archetechs

Joined: 2007-07-02
Posts: 3
Posted: Tue, 2007-07-10 23:48

Okay, i'd like to think its not my coding skills but i'm stuck on the first hurdle! Having never developed a module before i was a little lost as to where to begin, but i've managed to create an "Orders" view which will display all the orders and provide the actions for them. I have the following code :

function loadTemplate(&$template, &$form) {
global $gallery;

list ($ret, $orders) =
CheckoutTransactionHelper::fetchCheckoutTransactions(null, null);
$form['list']['orders'] = array();
foreach ($orders as $orderId => $order) {
$form['list']['orders'][$orderId] = $order;
}
$template->setVariable('transactions', $form);
$template->setVariable('controller', 'checkout.Orders');
return array(null,
array('body' => 'modules/checkout/templates/Orders.tpl'));
}

... and i have 3 orders in the database. I then have :

{foreach from=$form.list.orders item=ord name=orderlist}
<tr class="{cycle values="gbEven,gbOdd"}">
<td>
{$ord->getItem} ?! {$smarty.foreach.orderlist.total}
</td>
</tr>
{/foreach}

Unfortunately, despite iterating three times, i just get 3 rows with '?! 3' in each! I've also tried {$ord.id} and various other combinations but i can't for the life of me work out why none of the values from the row are being displayed. I've also checked that the template _tpl_vars contains a form -> list -> orders array which is indexed by an incremental count.

gallerytemplate Object
(
[_smarty] => gallerysmarty Object
(
...
[_tpl_vars] => Array
(
....
[form] => Array
(
[formName] =>

    => Array
    (
    [orders] => Array
    (
    [0] => gallerycheckouttransaction Object
    (
    [id] => 54
    [creationTimestamp] => 1179433684
    [isLinkable] => 0
    [linkId] =>

    I'm really at a loss so any help would be appreciated.

    Also, can you give me some pointers as to why you mean by 'everything is in place to zip up orders'

    Thanks in advance.

 
Jahandar

Joined: 2007-06-19
Posts: 3
Posted: Tue, 2007-07-17 12:49

Hey, I just upgraded from 0.0.14 to 17. Now whenever sending an order through checkoutemail, I am sent to a page that lists the raw data for the email, and the email itself is not sent. I have tested and verfied that PHP mailing does is working in Gallery2.

The page I see is blank except for what would be the raw email contents:

Quote:
--checkoutemail469cb5f6bb2d0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Customer: Firstname Lastname Email: Recipient: Recipient Address: address1 address2 address3 address4 address5 Zip: 90210 Country: USA Comments: comment ========================= Title: DSC00030 Ref: DSC00030.JPG Summary: Qty: 2 of One 5x7 [$ each] Qty: 4 of Eight Wallets [$ each] Subtotal: $110.00] ========================= Title: DSC00033 Ref: DSC00033.JPG Summary: Tub Qty: 1 of Four 4x5s [$ each] Subtotal: $20.00] ========================= Title: DSC00042 Ref: DSC00042.JPG Summary: Qty: 2 of Four 4x5s [$ each] Subtotal: $40.00] ========================= Title: DSC00029 Ref: DSC00029.JPG Summary: Qty: 1 of Eight Wallets [$ each] Subtotal: $20.00] ========================= Postage and Packing: $0.00 Total: $190.00 --checkoutemail469cb5f6bb2d0 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit <link rel="stylesheet" type="text/css" href="

 
morton

Joined: 2005-09-19
Posts: 52
Posted: Sun, 2007-10-14 21:32

archetechs: I manage a non-profit High School Band Booster website and have been running Gallery 2 for sometime now. We have a photography committee which has several photographers taking photos of the marching band and then upload them to Gallery. Our membership then place orders for photos via this module (email only) and I have had several inquires from the chairperson as to how to keep up with the Orders and their status. Your Order's page is just what I need to enhance our system and provide order to Photo Orders. Currently I'm at 2.01 and will be upgrading the week of Oct. 22 to the current version of Gallery. This should bring in the Checkout module features to where I may be able to help out with developing some of this page. I'm no expert by no means, but I will be glad to help out.

There is a developers guide for Gallery which you may wish to read as it provides some guidelines on devleopment. I've done a little tinkering with Gallery code, but no where near the knowledge of some of these guys.

Feel free to PM me if I can help with this.

Thanks,
Morton

 
animas

Joined: 2007-11-29
Posts: 10
Posted: Sun, 2007-12-02 08:43

I would like to let users upload their own photos and order prints of their own(added to cart) photos of different sizes(4x6, 8x10 etc). I will be using my PayPal ID to receive payments.

Does this module do this job or has a closer solution?

 
sambas

Joined: 2008-01-02
Posts: 2
Posted: Wed, 2008-01-02 22:54

Ich habe die Datei für checkoutemail übersetzt. Ich kann aber leider keine MO Datei erstellen. Kann das jemand übernehmen?

 
Carpcatcher

Joined: 2004-02-02
Posts: 92
Posted: Tue, 2008-01-08 09:12

How (and is it possible) that if a user send the order succesfull (by mail or paypall) that the admin can still download the zip-order file?

 
Knilch

Joined: 2009-01-19
Posts: 44
Posted: Mon, 2009-01-19 11:48

Hello everybody.

I'm pretty new to Gallery and checkout and currently trying to get my site working. My aim is to sell photographs and so far everything is clear except for the fact that my site is based in Germany so I would like to have everything in German.

So far I was able to run through everything needed and found out that I would have to have a de.po file out of which I needed to make a "modules_checkout.mo"-file which should be placed in /modules/checkout/locale/de/LC_MESSAGES/. Is this correct so far?

I have downloaded a de.po-file, made a .mo-file with poEdit (as I don't have shell access to my server) and did everything I read but checkout refuses to be German. I so far even found the "add to cart" argument in the module.inc and translated that, too.

But why is everything else still English? I had to create the path posted above myself as there was nothing in "locale" so far.

If anyone could make a guess where I did wrong I would be really happy as I seem to be blind by now.

For everyone else I have added the two .mo-files for checkout and checkoutemail which poEdit created and which I tried to use without any success so far. But the files should be correct, I hope.

Is there any development still happening with checkout? Will there be a release with more than just one language as standard?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Mon, 2009-01-19 12:18

You haven't said which versions of checkout and Gallery you're using. Ideally you should have started a new thread with this query where you would have been asked to provide technical information useful to people trying to help you.

Quote:
So far I was able to run through everything needed and found out that I would have to have a de.po file out of which I needed to make a "modules_checkout.mo"-file which should be placed in /modules/checkout/locale/de/LC_MESSAGES/. Is this correct so far?

No, that's not correct. Firstly, checkout already includes the de.po and the other files, which are (should be) automatically installed in the correct places when you install the module. The correct run-time location for the modules_checkout.mo file that contains the german translation is your g2data/locale/DE/LC_MESSAGES/ directory, however the correct mo file should be copied there automatically on module installation from the checkout/locale/de/LC_MESSAGES/ directory.

The current version of the module in the repository includes the most up-to-date versions of all the <lang>.po files in the po/ directory as well as all the relevant entries in the checkout/locale/ directories. (You can verify this by looking at the latest MANIFEST file for the module at http://gallery-contrib.svn.sourceforge.net/viewvc/gallery-contrib/trunk/gallery2/modules/checkout/MANIFEST?revision=1719&view=markup)

The situation is slightly complicated by the fact that the translations lag behind the latest code somewhat. The German translations (as with all the languages) are translated by users who speak German and provided to me to include in the repository. That last German translation I think was updated for version 0.4.2. The current version of checkout is 0.4.3 so all the text strings that have been added or changed since 0.4.3 (not the majority, but there are some) will only appear in English since there is no current German translation for them.

The current de.po file included with the module does however include all the correct text strings for 0.4.3 - it just needs the translations to be brought up to date - following which the .mo file needs to be updated and included in the repository so it will download properly.

As regards your specific questions:

Quote:
But why is everything else still English?

There are different possibilities. Firstly perhaps the module's not installed properly. Secondly there's a generic problem with your language system. Thirdly there may be a glitch in the automatic install of the correct files. Have you enabled German in the Admin->Language Settings page? Do the various language packs for Checkout appear when you visit the Plugins->get more plugins->(checkout) upgrade->community respository link? The German language pack for this module is currently at version 1712, whereas the main revision number for checkout is currently 1719.

Quote:
Is there any development still happening with checkout?

Yes, checkout is currently under development.

Quote:
Will there be a release with more than just one language as standard?

All releases of checkout have always included all translations that have been provided to the module maintainer/author at the time. (At the present moment, that's me.) The most up to date language is German, I beleve, with Italian not far behind. Some of the other languages (Spanish, Swedish?) that are included with the module have not been update for periods of more than a year, during which time most of the text has changed and so these translations are so far out of date as to be obsolete.

 
Knilch

Joined: 2009-01-19
Posts: 44
Posted: Mon, 2009-01-19 14:29

Thanks very much for your detailed response and if I read that correctly I probably really have a problem with the automated installation. There were no directories created under "locale" and nothing installed with the automatic installation.

I have the most recent gallery version and the most recent checkout version as I installed them only at the weekend.

The change of language for gallery itself works flawlessly, only checkout doesn't want to join. Now that looks like a serious problem.

So, if I understand correctly, if I install checkout from the gallery menue from the community repository it will automatically install itself with several different language packs so that it will be the same language as my gallery system (for me that means German), correct? Then what has possibly gone wrong?

Edit: now I have deinstalled and installed checkout again and it somehow is a mess now. Most info is now in German but if I view the cart some of the elements is correctly named in German and some other in English still. Also the complete configuration is in English (doesn't bother me but it might be intendet differently). What shall I do now?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Mon, 2009-01-19 14:34
Quote:
Most info is now in German

If any of the info is in German, then it is installed ok. The bits that are still in English are the new or changed texts since the German translation was last updated.

Quote:
What shall I do now?

You can update the translation yourself - load the de.po from the checkout/po/ directory into poedit. poedit will save a de.mo also, which you can rename to modules_checkout.mo and put it in your g2data/locale/de/LC_MESSAGES/ directory (overwiting the existing). When you're happy with all the translations you can send me the de.po and I'll include it in the next module update.

Make sure the de.po that you edit has version 0.4.3 in the information at the top.

 
Knilch

Joined: 2009-01-19
Posts: 44
Posted: Tue, 2009-01-20 15:46

I can't help thinking that there is a problem somewhere. I just completely removed Gallery2 from my server and installed it again. Then I chose checkout from the community repository and downloaded and configurated it. It showed completely in English. I downloaded the modules_checkout.mo-file from here which I uploaded earlier and copied it into the appropriate folder. Since then it is like it was before: there are some arguments in German in the cart but all the buttons and some other info is in English still.

Checkout also didn't download any po-files into its po-folder. It showed the different languages available at the download prompt, though. So what now? Why doesn't it work here? Anything I missed?

Edit: the folder /modules/checkout/locale/ is completely empty.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2009-01-20 17:57
Quote:
there are some arguments in German in the cart but all the buttons and some other info is in English still.

As I explained, the German translation isn't complete. I dont speak any German, so I can't translate text when I add it to the module. If you do complete it, please send me the complete po file so everyone else can use it.

Checkout also didn't download any po-files into its po-folder.

The language system changed in Gallery 2.3, so it doesn't download language files for languages that aren't in use. So if there's a problem it sounds like a Gallery core problem, rather than something checkout-specific - I don't think I can help with that, sorry.

 
Knilch

Joined: 2009-01-19
Posts: 44
Posted: Wed, 2009-01-21 09:34

Okay, thanks again and to get that completely sorted I sum it up: checkout didn't install an "mo"-file in the corresponding folder, there are no po-files downloaded anywhere and although gallery tells me in the site administration that the different language packs of checkout are installed they don't work.

So you say that this is rather a gallery than a checkout problem, correct? So that I would have to ask in the main forum itself.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2009-01-21 10:03

Try this: after installing checkout, go to the Language Settings page, tick Deutch in the upgrade column, and click "save" at the bottom of the page. That should download the de.po, the de/LC_MESSAGES/modules_checkout.mo file.

To actually get the .mo file copied to the right place, it appears (on my test installation) to be necessary to uninstall/reinstall the module *after* the language packs have been updated (from the Language Settings page), which, if true, is a bit bollocks - but on a quick test that was the only way.

I don't know if this is the intended behaviour, or a defect somewhere. Or maybe I'm just being dumb.

I get the impression that the changes to the language system in 2.3 were either not very well thought through, and/or not very well implemented (there have been other problems) and I certainly don't think they were documented - but all the developers are now busy on Gallery3, and I wouldn't expect to see any progress on this front, ever. C'est la vie.

 
Knilch

Joined: 2009-01-19
Posts: 44
Posted: Wed, 2009-01-21 11:30

Ha, thank you very much! Actually I think I did just that yesterday or before I reinstalled gallery completely (i.e. upgraded the language packs and deinstalled/reinstalled checkout itself) but after I now deinstalled the German language and downloaded it again and followed your instruction to deinstall and reinstall checkout it now appears to be all German after all.

At last I can now begin to set up the site completely, thanks again, that helped a lot!

 
Knilch

Joined: 2009-01-19
Posts: 44
Posted: Wed, 2009-01-21 22:48

You have asked me to do it, so I did. As the translation into German hasn't been complete I just ran through the complete file, corrected some mistakes and translated all the missing arguments into German (with 2 or 3 still unclear). It should make sense all the time now but I might have overseen something in which case either I will provide a corrected file or some other might pick it up.

Hope I was some help.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2009-01-21 22:36

Thanks. I'll include that in the next module upgrade.

BTW you left some "#, fuzzy" comments in. I'll fix that.

 
Knilch

Joined: 2009-01-19
Posts: 44
Posted: Wed, 2009-01-21 22:47

Oh, can you tell me where, so I can fix that in my file, too?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2009-01-21 22:51

open in a text editor, look for "#, fuzzy"

Fuzzy strings are not compiled into .mo files unless you set a certain switch (not sure what happens with poedit)

 
Knilch

Joined: 2009-01-19
Posts: 44
Posted: Wed, 2009-01-21 23:07

These "#, fuzzy"-comments are set by PoEdit if a translator is not 100% sure about the translation, right? That's what I posted earlier, there are some which I am not completely sure about. The original file contained 15 of them.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2009-01-21 23:08

Which aspect aren't you sure about?

 
Knilch

Joined: 2009-01-19
Posts: 44
Posted: Wed, 2009-01-21 23:11

If I found the right words in German to get the same meaning the argument has in English. Well, I'll set up my site over the next few days so I might find out if something doesn't fit and I'll post a correction here. Meanwhile it should do okay.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2009-01-21 23:37

The ones that are still fuzzy are:

Postage Band: this means postage category, postage class. I avoided class because it clashes with class-of-service (1st class, 2nd class etc)

None: as in not in any postage band at all - the product (usually a download) doesn't require posting.

Last Return URL: when the user enters a checkout page, the url they should return to (the page they clicked from) is stored. When looking at customer's cart contents, you can see the page they last entered a checkout page from - which is the page they would return to if they were able to click "Continue Shopping"

 
Knilch

Joined: 2009-01-19
Posts: 44
Posted: Thu, 2009-01-22 15:07

Okay, I adjusted a few translations again as I found some errors while setting up the shop. When is the next build due to come out?

The unclear translations now make sense. I hope :).

edit 4:08 P.M. CET: corrected one more mistake.

 
philmo1

Joined: 2009-02-06
Posts: 6
Posted: Fri, 2009-02-06 19:03

Hey everybody!
i basically got the same problem as Knilch.
ive got a german gallery2 version up and running and installed the checkout module but its in english. initially /modules/checkout/locale was empty but after reinstalling the gallery2 language data the /de folder appeared.
So. The language folder is there and its even a german one but checkout is english. why?
im new to G2 so its probably my fault ;-)
thanks

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2009-02-06 19:36

There seems to be some problem with languages and this module (or all community repository modules - it may be that checkout is the only module in the community repository which has language options).

I'm confident that the problem lies with the updates to the Gallery language system made with the updates to G2.3, rather than with the checkout module (although naturally I'd be delighted to be proven wrong, as it would mean it was something I can fix.) Everyone is welcome to do their own (serious) investigations and let me know what they find.

However I'm even more confident that nobody from the development team is going to any more debugging on or fix any faults in G2.3, now that G3 is released.

So as a workaround I would suggest manually copying the modules/checkout/locale/de/LC_MESSAGES/modules_checkout.mo file to your g2data/locale/de/LC_MESSAGES/ folder, which is where it needs to be in order for the gettext system to load and use it.

 
philmo1

Joined: 2009-02-06
Posts: 6
Posted: Fri, 2009-02-06 21:02

alright thats what i did and now my whole G2 is down and just states "Error" :-(
heeelp, pleaaase

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2009-02-06 22:40

I suspect you did something else, too.

 
philmo1

Joined: 2009-02-06
Posts: 6
Posted: Sat, 2009-02-07 12:42

no i havent! im 100% sure!
what does cause this error? (http://phil.peter-axel-mueller.de/gallery/gallery2/main.php)

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sat, 2009-02-07 12:40

Well, the first thing to do would be to undo the last change that you made, and see if the error goes away.

 
philmo1

Joined: 2009-02-06
Posts: 6
Posted: Sat, 2009-02-07 12:54

thats what i did right away...where can i download the modukles_checkout.mo file? just to make sure i really put the original checkout.mo file back.