[checkout] Version 0.4.0 available

alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2008-08-28 13:40

I've updated the versions of checkout, checkoutpaypal and checkoutemail in the repository and also uploaded checkoutgoogle (for payment via Google Checkout).

If you upgrade checkout to 0.4.0 you'll need also to upgrade checkoutpaypal and checkoutemail if you're using them as previous versions are incompatible with 0.4.0. The new code fixes various bugs and is generally more streamlined.

A lot of files have been either deleted or renamed, so if you are the sort that likes to keep your Gallery installation tidy, I'd recommend uninstalling and deleting the old versions prior to downloading the new ones. If you don't want to reapply the configuration/product options, or you don't want to lose existing transaction records then there should be no problem about keeping the old files around. I might even see if I can find a list of files you can safely delete.

I've also tidied and renamed a few of the templates - something to be aware of if you're using old copies in local/ directories.

There is no longer an option on the checkout Admin page to enable/disable different payment plugins - instead, each plugin has its own enable/disable switch on its own config page. (This is required in addition to the option to 'disable' the module becuse disabling the module also removes access to its administration page.)

There is also now a way to delete more than one order at a time, from the Orders administration page.

Please post any problems or reports in this thread.

Thanks

ps. If you plan to use checkoutgoogle then you'll need to read the Codex intructions. I'm in the middle of writing them; I'll post a link here when they're done.

 
thisisglen

Joined: 2008-02-12
Posts: 25
Posted: Thu, 2008-08-28 23:35

Great work. I've been looking forward to this release. I'm having a small problem at the moment though: After I install the plugin I can't configure it, and therefore can't use it. I just get a 500 Internal Server error. I tried uninstalling and deleting the plugin and doing it again and got the same error!

Thanks for all your work so far!

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2008-08-29 00:14

Hmmm... there was a typo in the file that runs the Admin page in the first version I uploaded last night, but I corrected that this morning and the fixed version has been available for some hours. Might be worth refreshing your downloadable plugins list, and seeing if you can update. You should be able to get version 0.4.0 (build 1612) at present.

Edit: I just updated one of my remote servers to 0.4.0 r1612, and the first time I visited the admin page I got a 500 error, but using the back button and trying again and it was fine. I don't know if that was a coincidence or not...

Edit again: Just updated a second server (one that was running an earlier code revision of 0.4.0) and no problems there.

 
thisisglen

Joined: 2008-02-12
Posts: 25
Posted: Fri, 2008-08-29 05:34

Thanks Alec,

I had to update my plugin list to get the latest build! When I deleted the old one it just added the old one again! New one works great so far! Thanks!

 
thisisglen

Joined: 2008-02-12
Posts: 25
Posted: Fri, 2008-08-29 05:51

Is there any code I could change to make the first item a user selects from the drop down menu default to 1 quantity?

I realise this allows users to order different products of the same picture, but I would prefer to continue using the more simplified method of the older checkout if possible!

Thanks again

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2008-08-29 09:57
Quote:
I had to update my plugin list to get the latest build! When I deleted the old one it just added the old one again!

In that case make sure you also upgrade to the newest versions of checkout/checkoutpaypal etc after updating your plugins list.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2008-09-17 00:29
Quote:
Is there any code I could change to make the first item a user selects from the drop down menu default to 1 quantity?

I realise this allows users to order different products of the same picture, but I would prefer to continue using the more simplified method of the older checkout if possible!

There's no problem with ordering different products of the same picture - it's what checkout is designed to do. I'm a bit confused - how does this version differ in its behaviour from the old versions, that you don't like? If you can be a bit more specific perhaps I can help more.

 
Dirkii

Joined: 2008-01-16
Posts: 214
Posted: Fri, 2008-08-29 23:34

Hallo Alec,

I am unable to display the T&C. I guess I have left something. Is there anything else to set (t-und-c.png)?

Nice greetings, Dirk.

---------------------------
www.galerie-der-fotos.de

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sat, 2008-08-30 11:38

It shows up fine in my installation; I'm not sure what the problem could be.

 
Dirkii

Joined: 2008-01-16
Posts: 214
Posted: Sat, 2008-08-30 20:43

Many thanks Alec,

When does the T&C page be displayed usually? Before opening the "Checkout Step 2 - Confirm your selection" page or after clicking the payment button?

Can I use all the kinds of paths:

www.my-site.com/tc.htm
http://www.my-site.com/tc.htm
/gallery/tc.htm
../gallery/tc.htm

Nice greetings, Dirk.

---------------------------
www.galerie-der-fotos.de

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sat, 2008-08-30 23:09
Quote:
when does the T&C page be displayed usually?

it isn't displayed, ever. All you get for filling in the option is the link on the payment page. It's completely useless, achieves nothing that can't be done more easily by inserting a piece of text and an html anchor link in the template, and only the fact that it's been there since time immemorial has so-far prevented me from ripping it out and saving 10 lines of code; to my mind that would be a fantastically good bargain.

 
Dirkii

Joined: 2008-01-16
Posts: 214
Posted: Sun, 2008-08-31 11:28
Quote:
it isn't displayed, ever. All you get for filling in the option is the link on the payment page. It's completely useless, achieves nothing that can't be done more easily by inserting a piece of text and an html anchor link in the template, and only the fact that it's been there since time immemorial has so-far prevented me from ripping it out and saving 10 lines of code; to my mind that would be a fantastically good bargain.

Urgh, yes indeed, you are absolutely right, very sorry Alec,

I misinterpreted completely again. Yes, the link has been there already, I didn´t see, mind it. I had thought ticking the box would lead the customer to a page where he would have to check (or not) a box or something like that to confirm having read and confirmed to the T&C and...

Sorry again, thanks for help, nice greetings, Dirk.

---------------------------
www.galerie-der-fotos.de

 
mbrown

Joined: 2008-04-23
Posts: 20
Posted: Sun, 2008-09-07 02:46

In my haste to upgrade to the new version, and thinking I had to unistall the old version first (because I had the lock on) I have lost all of my old orders, is there anyway to get them back or are they kaputski?

edit: The orders still appear to be there somewhere because when I click on the button in the emails it still refers to the order status., I just can't see them in the checkout orders area.

Mike B

 
mbrown

Joined: 2008-04-23
Posts: 20
Posted: Sun, 2008-09-07 03:02

While I am at it, I would like to throw a few ideas around for extra features:

1. A downloadable report including all customer details & all transation details including products purchased and image numbers. Preferable in excel or csv formats.

2. Customizable customer input page, i.e. I would like extra fields that I could have the customer fill out when they fill out their info.

3. Additional Options for Order status, like "At Lab" and "At Framer" etc.

4. More as I think of them....

Mike B

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sun, 2008-09-07 03:05

I'd expect them to be, as you say, kaputski - the table with the orders would have been dropped from the db. Have a look in the g2_GalleryCheckoutTransaction table with something like phpMyAdmin if you want to check.

As far as the emails go that sounds very strange; I'd expect a "Permission Denied" error (for a non-existent transaction number) which is what I get when I tried it.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sun, 2008-09-07 03:08
Quote:
1. A downloadable report including all customer details & all transation details including products purchased and image numbers. Preferable in excel or csv formats.

That I can write as an additional module, fairly straightforward. Give me an example of how you'd like the products and image data for lots of orders rolled into one table. CSV will be easiest, I imagine.

Quote:
2. Customizable customer input page, i.e. I would like extra fields that I could have the customer fill out when they fill out their info.

3. Additional Options for Order status, like "At Lab" and "At Framer" etc.

Unfortunately because of the (historic) design of the transaction table those two are really tricky - everyone's going to want different options, different numbers and names of fields, and there's no sensible way that I can see to make them configurable in any meaningful way.

 
mbrown

Joined: 2008-04-23
Posts: 20
Posted: Sun, 2008-09-07 05:03
alecmyers wrote:
I'd expect them to be, as you say, kaputski - the table with the orders would have been dropped from the db. Have a look in the g2_GalleryCheckoutTransaction table with something like phpMyAdmin if you want to check.

As far as the emails go that sounds very strange; I'd expect a "Permission Denied" error (for a non-existent transaction number) which is what I get when I tried it.

Gees Alec, do you ever sleep?

I have found that the orders that are 4 digit long eg 8008 are gone (probably because they were before my last stuff up deleting the galleries), but the 5 digit ones are still linking from the email, and I can even still click on the order administration button after I get to the refering page and they still go into the order details, customer info is still there and the pricing etc. This is really weird. I wonder if I have some old d/b that it is refering to?

I couldn't see any of them in the phpmyadmin, that is only showing what has gone in since the upgrade.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sun, 2008-09-07 09:54

Maybe they're cached (lots of db entries are); I'd have expected the cache to be cleared when you delete a module, but perhaps it isn't?

 
mbrown

Joined: 2008-04-23
Posts: 20
Posted: Sun, 2008-09-07 12:54
alecmyers wrote:
Maybe they're cached (lots of db entries are); I'd have expected the cache to be cleared when you delete a module, but perhaps it isn't?

Must have been, I can't get into them anymore :-(

 
paulcobb

Joined: 2006-05-04
Posts: 122
Posted: Wed, 2008-09-10 17:40

Alec,
I have upgraded to 0.4.0 and all works fine so far - so thanks.

1 or 2 comments though: I think there is a locale issue but maybe you will comment -
- Album pages display 'Add to basket' correctly but on Checkout Step 1. button is labelled 'Empty Cart'.
- In the side bar under the thumbnail of items in the basket reads 'You have the following items in your shopping 'cart'
- When the basket is empty it displays 'Your shopping cart is empty'.

Finally being picky.
- In the sidebar, at the bottom of the display (mine anyway- Matrix theme) there is an icon and the text 'View and adjust quantities and complete your order here'.
In FF this displays fine - the icon to the LHS and the text wrapping around it.
In IE7 the text sits over the top of the icon - looks a little messy.

Thanks

Paul

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2008-09-10 18:16
paulcobb wrote:
Alec,
I have upgraded to 0.4.0 and all works fine so far - so thanks.

1 or 2 comments though: I think there is a locale issue but maybe you will comment -
- Album pages display 'Add to basket' correctly but on Checkout Step 1. button is labelled 'Empty Cart'.
- In the side bar under the thumbnail of items in the basket reads 'You have the following items in your shopping 'cart'
- When the basket is empty it displays 'Your shopping cart is empty'.

Possibly old template files in a local/directory? Seems to work ok on my installations. I changed the capitalisation of some of the button text, so old templates need renewing (also there are some layout changes.) Let me know. I'm pretty sure the en_UK localisation is correct because it works for me on two different sites.

Quote:
Finally being picky.
- In the sidebar, at the bottom of the display (mine anyway- Matrix theme) there is an icon and the text 'View and adjust quantities and complete your order here'.
In FF this displays fine - the icon to the LHS and the text wrapping around it.
In IE7 the text sits over the top of the icon - looks a little messy.

Thanks

Paul

There's no icon included in the module, just a regular gallery style definition for the link, it's really up to your CSS how it's displayed (and whether there's an icon for it.)

EDIT: the class applied to the link is:

<a class="gbAdminLink gbLink-checkout_SelectProducts" href="...

which is automatically added by the {g->linkId view="checkout.SelectProducts"}tag in the template. But it's up to your style-sheet as to what the browser makes of it, and whether there is an icon and what the icon should be.

 
paulcobb

Joined: 2006-05-04
Posts: 122
Posted: Wed, 2008-09-10 18:23

Alec,

Looking at my modules checkout.mo file for en_GB locale
this is not dated as all the other languages are (yesterdays date - which is when I upgraded) would you expect all of the .mo files to be overwritten?
I don't have any 'local' version of templates in 'checkout' only in 'checkoutmail' for the confirmation email template.

Paul

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2008-09-10 19:03

This is the log of changes to the en_GB messages.mo - the latest one is from Aug 27, it looks like.

http://gallery-contrib.svn.sourceforge.net/viewvc/gallery-contrib/trunk/gallery2/modules/checkout/locale/en_GB/LC_MESSAGES/modules_checkout.mo?view=

Out of interest, is your server on windows or unix?

 
paulcobb

Joined: 2006-05-04
Posts: 122
Posted: Wed, 2008-09-10 19:14
Quote:
Out of interest, is your server on windows or unix?

It's on Unix

I'll check the file against mine to see if I can spot anything

 
paulcobb

Joined: 2006-05-04
Posts: 122
Posted: Wed, 2008-09-10 19:22

Looking in the .mo file I find
Project-Id-Version: Gallery: Checkout 0.3.3 !

Obviously this has not updated - not sure why this has remained from the previous version?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2008-09-10 19:46

Try replacing it with the SVN version (you can download it directly from that link). Although I think that's just a comment, the latest version looks to have 0.4.0 in that field.

 
paulcobb

Joined: 2006-05-04
Posts: 122
Posted: Thu, 2008-09-11 09:17

alecmyers wrote:

Quote:
Try replacing it with the SVN version

That has done the trick!.
Can't understand why this was not overwritten with the latest copy when I updated?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2008-09-11 10:35

Who can say. There is (naturally! this is the Gallery project!) no documentation on how the GMC server wraps up modules for delivery, or how or what determines what goes into each language pack, so I might have done something wrong with the source files, and I'd never know.

 
Dirkii

Joined: 2008-01-16
Posts: 214
Posted: Tue, 2008-09-16 11:57

If I had various images / sizes, e.g.

30 x 45

gloss
matt
canvas
etc.

60 x 45

gloss
matt
canvas
etc.

80 x etc.

which could be purchased each with and without e.g. a logo on them which would cost e.g. 5 € additionally, how could I do this best without creating a new “Product Name” this way

30 x 45

gloss with logo
matt with logo
canvas with logo
etc. with logo

but e.g. this way

30 x 45

gloss
matt
canvas
etc.

with logo 5 €.

60 x 45

gloss
matt
canvas
etc.

with logo 5 €.

etc.

which would be added to the amount automatically.

Nice greetings, Dirk.

---------------------------
www.galerie-der-fotos.de

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-09-16 12:02

1. as it stands, you can't, sorry.
2. you could rewrite the module if you wanted the feature badly enough.

 
Dirkii

Joined: 2008-01-16
Posts: 214
Posted: Tue, 2008-09-16 14:04

Okay Alec, many thanks for your fast response and the idea.

Can I show a link additionally to the “Order Status” button in the e-mail sent to a customer after ordering which can be copied and added by the customer to the address field of the browser manually if need be (on some systems such buttons do not work)?

Nice greetings, Dirk.

---------------------------
www.galerie-der-fotos.de

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-09-16 14:09
 
Dirkii

Joined: 2008-01-16
Posts: 214
Posted: Tue, 2008-09-16 15:23

Thank you very much for your very fast answer again and the link, Alec.

Quote:
If you prefer a regular link, then, having noticed that the plain-text portion of the email content contains just that, go to checkout/email/templates/email/confirm.tpl and copy the Smarty code for the link in the plain-text over the form code in the HTML portion of the template.

I do not quite understand this: what is the “Smarty” code? And in which e-mail do I find this code to be added to the confirm.tpl? I guess somewhere above or below this part (I would like to have the link below the button, so I assume the code must be added above “</form>”):

<br>
{g->text text="This is an email to let you know your order has been placed successfully."}<br>
{g->text text="You can check the status of this order any time here:"}

<form action="{g->url arg1="view=checkout.OrderStatus" arg2="transactionId=`$transactionId`" arg3="verify1=`$block.checkout.verify1`" arg4="verify2=`$block.checkout.verify2`" forceFullUrl=true forceSessionId=false}" method="post">
    <button type="submit">{g->text text="Order Status"}</button>
</form>
<br>

Nice greetings, Dirk.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-09-16 15:41
Quote:
the Smarty code for the link in the plain-text

is

{g->url arg1="view=checkout.OrderStatus" arg2="transactionId=`$transactionId`" arg3="verify1=`$block.checkout.verify1`" arg4="verify2=`$block.checkout.verify2`" forceFullUrl=true forceSessionId=false htmlEntities=false}
 
Dirkii

Joined: 2008-01-16
Posts: 214
Posted: Tue, 2008-09-16 16:09

Many thanks for your help, Alec,

Done this way doesn`t show the link:


<br>
{g->text text="This is an email to let you know your order has been placed successfully."}<br>
{g->text text="You can check the status of this order any time here:"}

<form action="{g->url arg1="view=checkout.OrderStatus" arg2="transactionId=`$transactionId`" arg3="verify1=`$block.checkout.verify1`" arg4="verify2=`$block.checkout.verify2`" forceFullUrl=true forceSessionId=false}" method="post">
    <button type="submit">{g->text text="Order Status"}</button>
    {g->url arg1="view=checkout.OrderStatus" arg2="transactionId=`$transactionId`" arg3="verify1=`$block.checkout.verify1`" arg4="verify2=`$block.checkout.verify2`" forceFullUrl=true forceSessionId=false htmlEntities=false}
</form>
<br>

What did I wrong?

Nice greetings, Dirk.

---------------------------
www.galerie-der-fotos.de

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-09-16 16:15

I don't know. Putting html in emails is always dodgy.

Try moving it outside the form.

 
Dirkii

Joined: 2008-01-16
Posts: 214
Posted: Tue, 2008-09-16 20:31

Thanks Alec, it works now,

My fault, the checkout module had have the chown "wwwrun" and so the modified file just wasn`t saved, do not know why the chown had been changed, obviously.

When e.g. the e-mail address is inserted in “Checkout Customer Details”, only and the customer presses the “Submit Order” button he can go on with checking out without having entered his address: might it be possible to let him show a message that he must fill out some empty fields like the address fields instead?

Many thanks for your help, nice greetings, Dirk.

---------------------------
www.galerie-der-fotos.de

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-09-16 21:41
Quote:
When e.g. the e-mail address is inserted in “Checkout Customer Details”, only and the customer presses the “Submit Order” button he can go on with checking out without having entered his address: might it be possible to let him show a message that he must fill out some empty fields like the address fields instead?

Yes, if you want, you can modify the module to do that.

 
Dirkii

Joined: 2008-01-16
Posts: 214
Posted: Tue, 2008-09-16 22:00

Thanks for the fast reply, Alec,

Okay, so at the moment there is no option doing this.

And I assume, something like this is not possible to do, isn`t it?

30 x 45

gloss
matt
other
etc.

50 €
--------------
30 x 45 canvas

structure 1
structure 2
structure 1

80 €
---------------
30 x 45 acryl

sort 1
sort 2
sort 3

100 €

Nice greetings, Dirk.

---------------------------
www.galerie-der-fotos.de

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2008-09-17 00:17

Dirk,

I think you should learn to program in php - then you can make all these modifications yourself! It's not hard, I just prefer myself to work on stuff that's useful to everyone. All these questions you ask are easy to solve for your own private version, that way you can have exactly what you want.

 
Dirkii

Joined: 2008-01-16
Posts: 214
Posted: Wed, 2008-09-17 06:54

Many thanks, Alec,

That`s a good thought, I will think about it.

Nice greetings, Dirk.

---------------------------
www.galerie-der-fotos.de

 
thisisglen

Joined: 2008-02-12
Posts: 25
Posted: Fri, 2008-09-19 11:17
alecmyers wrote:
Quote:
Is there any code I could change to make the first item a user selects from the drop down menu default to 1 quantity?

I realise this allows users to order different products of the same picture, but I would prefer to continue using the more simplified method of the older checkout if possible!

There's no problem with ordering different products of the same picture - it's what checkout is designed to do. I'm a bit confused - how does this version differ in its behaviour from the old versions, that you don't like? If you can be a bit more specific perhaps I can help more.

Alec, thanks for your response. To clarify:

I like the way you could set older version of checkout to a drop down list and if there user was to change to a different item it would simply change what was selected in the 1 product box:

First (Automatic) selection:

[img]http://glen.wimberley.net.au/postimages/Checkout/OLD.JPG[/img]

Then after changing 3 or four times it would look like this (and the quantity would not be affected):

[img]http://glen.wimberley.net.au/postimages/Checkout/OLD%202.JPG[/img]

The new version ends up looking like this after you change your product a few times:

[img]http://glen.wimberley.net.au/postimages/Checkout/NEW.JPG[/img]

Which my customers complained was too confusing, especially since it started as a drop down menu and then turned into a list. Plus, even if you change the quantity to '0' and save changes to the order the unwanted items don't go away.

Hope that makes sense! I'm definitely not complaining! You have done a great job and I thank you very much for it :) I only want to know if there is an option to have it like it used to be which was very simple, as I have a lot of new internet users accessing my website. Even though I think with the older version you maybe couldn't order mutiple products of the same item - I don't need that function.

Thanks so much again! I would love to use the new version, as all the new features are amazing and would help heaps!

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2008-09-19 11:57
Quote:
Plus, even if you change the quantity to '0' and save changes to the order the unwanted items don't go away.

That's actually a deliberate feature :-) it makes it easier to play around with quantities of different products if they don't get rolled back into the list once you change the quantity to zero.

Quote:
I only want to know if there is an option to have it like it used to be which was very simple

The "only order one product" was actually a bug - it was always intended that once you ordered a product from the drop-down it would become a list item on its own, separate to the drop down. However that was before I took over stewardship of the module and the code for that was a bit, um, twisted, so it wasn't 100% clear.

You're welcome to make custom modifications to the code to put back either of these 'features', though. If you want items with zero quantity to roll back into the drop-down then try changing checkout/classes/CheckoutHelper.class around line 243 approx (depending on version). Find this

	    //table view
	    //we leave the quantity record set, but blank - for zeros
	    if (isset($itemDetails['quant'])) {
	        foreach ($itemDetails['quant'] as $prodId => $quantity ) {
		    if (intval($quantity) != 0) {
		        $items[$itemId][$prodId]['quant'] = $quantity;
	            } else {
		        $items[$itemId][$prodId]['quant'] = '';
	    	    }
	    	    if ( isset($itemDetails['paper'][$prodId]) ) {
		        $items[$itemId][$prodId]['paper'] = $itemDetails['paper'][$prodId];
	            }
    	        }
    	        
	    }

And delete the else clause in the middle:

	    //table view
	    //remove if quantity zero
	    if (isset($itemDetails['quant'])) {
	        foreach ($itemDetails['quant'] as $prodId => $quantity ) {
		    if (intval($quantity) != 0) {
		        $items[$itemId][$prodId]['quant'] = $quantity;
	            } 
	    	    if ( isset($itemDetails['paper'][$prodId]) ) {
		        $items[$itemId][$prodId]['paper'] = $itemDetails['paper'][$prodId];
	            }
    	        }
    	        
	    }

I'll put a comment in the code for the benefit of others in future.

As for picking one item only ... hmmm... to do exactly as you describe would clash with the choice of papers (matt/gloss) because you can't see the paper-choice radio buttons until the product is displayed as an item in its own right. That means you can't leave the product name in the drop-down, you have to pull it out, and show the drop-down separately. You could arrange it that picking a different product from the drop-down would remove the first choice, so you could still only pick one product in total - would that help?

 
thisisglen

Joined: 2008-02-12
Posts: 25
Posted: Fri, 2008-09-19 21:47
alecmyers wrote:
..... You could arrange it that picking a different product from the drop-down would remove the first choice, so you could still only pick one product in total - would that help?

So far so good, Thanks for the explanation! What you mentioned above (in this quote) would be even better if I could do that with a local version - let me know how. If this were the case, would it also be possible to make any product that you selected from the list default to '1' quantity? I know there is an option in the list for an initial value but I would prefer if the customer could first select which product they wanted and then it would come up as '1' of that product.

Seriously appreciate the help Alec!

 
helaku

Joined: 2007-04-29
Posts: 51
Posted: Sat, 2008-09-20 00:40

Hi Alec, I've just upgraded checkout and checkoutpaypal from 0.3.5 to 0.4.0 which went smoothly.

Thank you for adding more currencies to checkoutpaypal. I know we're a long way from the rest of the world but could you please add New Zealand Dollar NZD to future versions?

(For the time being I've replaced another currency with NZD in Admin.tpl which works fine.)

Thank you and keep up the good work!

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sat, 2008-09-20 19:10
Quote:
What you mentioned above (in this quote) would be even better if I could do that with a local version - let me know how. If this were the case, would it also be possible to make any product that you selected from the list default to '1' quantity

To force only one product to be selectable, I think these are the changes you need to make. Reverse the order of the sections, so the drop-down is parsed first, and insert a 'continue' statement, so the whole section reads as follows:

foreach ($form['photos'] as $itemId => $itemDetails ) {
		
	    if (isset($itemDetails['remove'])) {
		continue;
	    }
	    $items[$itemId]['id'] = $itemId;
	    
	     //dropdown view
    	    if ( isset($itemDetails['newproduct']) && $itemDetails['newproduct'] != '' ) {
		if (intval($itemDetails['newqty'])!= 0) {
		    $items[$itemId][$itemDetails['newproduct']]['quant'] = $itemDetails['newqty'];
	        } else {
		    $items[$itemId][$itemDetails['newproduct']]['quant'] =  '';
		}
		continue;
    	    }
	    
	    //table view
	    //we leave the quantity record set, but blank - for zeros
	    if (isset($itemDetails['quant'])) {
	        foreach ($itemDetails['quant'] as $prodId => $quantity ) {
		    if (intval($quantity) != 0) {
		        $items[$itemId][$prodId]['quant'] = $quantity;
	            } 
	    	    if ( isset($itemDetails['paper'][$prodId]) ) {
		        $items[$itemId][$prodId]['paper'] = $itemDetails['paper'][$prodId];
	            }
    	        }
    	        
	    }
	}

To have a default quantity of one... I would adjust the template so that the quantity text box adjacent to the drop-down has 1 as its default value. See if that works for you.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sat, 2008-09-20 19:18
Quote:
could you please add New Zealand Dollar NZD to future versions [of checkoutpaypal]?

Sure. It's just a template change, in admin.tpl, if anyone wants to add it to their own installation in the mean time. But it will be included in the next update of the code.

 
thisisglen

Joined: 2008-02-12
Posts: 25
Posted: Sun, 2008-09-21 13:00

Hey Alec, Thanks for all your help and development work. I got my gallery working just nice thanks to the replys in this thread :)

One feature I would like to see in the future are discounts based on each product type.

For example: Let's say I offer a discount 20% for ordering 10 of Product A, B and C but this discount doesn't apply to product D, E or F.

I would love to see something like this in the future!

Thanks again!

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sun, 2008-09-21 13:03
Quote:
For example: Let's say I offer a discount 20% for ordering 10 of Product A, B and C but this discount doesn't apply to product D, E or F.

Think of a straightforward way to design the interface for how to configure something like that. The only difficulty is how not to confuse the bejeezus out of people who don't want something that complicated.

 
thisisglen

Joined: 2008-02-12
Posts: 25
Posted: Sun, 2008-09-21 13:15

I think something exactly the same as the groups would work, the heading might read 'Applies to' under which is a drop down menu with a default option that says 'all products' which drops down to a list of all of the remaining products. The other option would be to ID the products, maybe '01' '02' '03' and a box which has '0' = All Products by default and then the user can type the product code to offer the discount only on that product.

Thanks for your consideration.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sun, 2008-09-21 13:18
Quote:
I think something exactly the same as the groups would work, the heading might read 'Applies to' under which is a drop down menu with a default option that says 'all products' which drops down to a list of all of the remaining products.

How then to do "applies to products A, B and/or C but only if you buy three of products D and one product E"?