[checkout] Version 0.4.0 available

thisisglen

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

Opps! Forgot about that, I was only thinking A and B again for some reason!

How about the opposite then? Discounts have codes '01' '02' etc. and the products have a 'discounts that apply:' box where the default is '00' for all discounts apply and '01' or '02' etc. can be set instead?

I can see how this is complicated. Even having the ability to offer the discount on one product only would be a good addition.

Later on when/if there are multiple discounts then people could set up different discounts for each product that could apply seperately.

The reason I am after this feature is to be able to sell CD's of images at a capped price, but also offer other products at the same time without capped prices.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sun, 2008-09-21 13:38
Quote:
Discounts have codes '01' '02' etc.

Can't be doing with assigning things codes to type in (not in config pages anyway) - we used to have that for the old custom prices back in 0.1.15, where you had 'internal product references' and it was just, um, squalid. Or at best a neat hack that even the authors thought no doubt should better have been done another way.

Quote:
The reason I am after this feature is to be able to sell CD's of images at a capped price, but also offer other products at the same time without capped prices.

Rather than try to shoehorn a particular specialist pricing pattern into a general config page and complicate things for the 99.3% of people who don't want it and still not get things 100% right for yourself, you'd be better off learning a little php and writing a special module to adjust the pricing in the cart. The hooks are already in the code for extra modules to be able to adjust prices, quantities, discounts, descriptions etc. As these things go it's pretty trivial.

 
thisisglen

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

I totally see what you're saying. I know some code, but I can't write it from scratch.

I've been stuck with the original set of 3 modules... I feel a bit silly that I only just noticed 'checkout: price bands' which sounds exactly like what I need. I have it installed an activated but don't see any configuration options. Do I have to do something to get it started?

*sorry it's late here, I'm feeling very noobish at the moment. Really appreciate the help.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sun, 2008-09-21 13:56
Quote:
I have it installed an activated but don't see any configuration options.

On the Edit Item page, checkout tab. Although from what you've said, it isn't quite what you want. It won't adjust prices if you order the same product of different items - they have to be the same item & product.

You could modify the code though.

 
thisisglen

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

Yeah, I see. Do you have a PayPal account or something I can donate to? I don't have much, but I would like to help in return for the work you've done.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sun, 2008-09-21 14:09

I don't take donations, but you're welcome to order a print from http://danceportraits.co.uk - that way you get something in return.

 
thisisglen

Joined: 2008-02-12
Posts: 25
Posted: Sun, 2008-09-21 14:22
alecmyers wrote:
They have to be the same item & product.

You could modify the code though.

I'm going to have a crack at that. I'm assuming all the files I'll need to modify are contained within the checkout 'price bands' module directory?

And I'm guessing I'll just have to remove certain references to itemId's? Or is it alot more complicated?

EDIT: I see what I might have to do now, but it's a fair way over my head right now. I will try and learn and see if I can get it!

 
CHOCKYMONSTER

Joined: 2008-09-18
Posts: 4
Posted: Thu, 2008-09-25 11:26

Alec,

I've edited my template.tpl to include a link to "view basket" ./main.php?g2_view=checkout.Select which works
Is it possible to have an option in Checkout to enable the View Basket link on the top bar?

Paul

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2008-09-25 12:31
Quote:
Is it possible to have an option in Checkout to enable the View Basket link on the top bar?

I think you mean as a systemLink (http://codex.gallery2.org/Gallery2:ModuleLinks)

Yes, not a bad idea. I'll have a think about it for the next release.

 
unknownid000

Joined: 2003-04-04
Posts: 16
Posted: Fri, 2008-09-26 19:38

Hi All,

I have been looking forward to (kinda) finding the time to upgrade these great plugins for some time now, and it all went faily well except I have what I thought was a small problem but I can't find away to fix it so now its a really annoying problem ; ) (for me).

On the "Select.tpl" page the checkout picks up on the 'Photo Title' and displays it properly no problem but on the Confirm.tpl / TransactionContents.tpl, the file name is listed instead of the Photo Title and {$item.title|markup} does not seem to work.

So, instead of having the photo title passed to the confirm page and also onto paypal I get the file name blahblah_smwebversion.jpg as what folks are purchasing and paying for at paypal.

I can't remember if this was a custom fix way back to pass along the title to paypal but am wondering if anyone might be able to point me in the right direction? With so many changes (great ones) I cannot find what might have been making this work before the upgrade.

Nutshell: to have "Photo Title" listed at confirm page and passed on to paypal instead of "FILENAME.JPG".

Thanks for any help.

-

 
kferranti4

Joined: 2008-02-10
Posts: 26
Posted: Tue, 2008-10-21 19:21

I seem to get an error everytime I try to use the get more plug-ins with my new instalation. Is there a place I can download this new version of checkout and manually upload it to my site. I can only find the old version.

Thanks
Karen

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-10-21 19:27

Hi Karen,

You can check it out direct from sourceforge with a subversion client; but there's no packaged download, no. Best thing is to sort out your "get more plugins".

 
kferranti4

Joined: 2008-02-10
Posts: 26
Posted: Tue, 2008-10-21 21:58

Thanks I am working on the problem with the plug-ins. Hopefully It will be fixed soon and I will be able to get checkout installed.

 
unknownid000

Joined: 2003-04-04
Posts: 16
Posted: Sun, 2008-10-26 12:43

Hey All,

Anyone? Did I miss a thread or something that addresses this? Am I missing something silly?

Thanks.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sun, 2008-10-26 13:08

Assuming you're referring to your previous post in this thread ....

You can make a small code modification to adjust the fields that are included in the Confirm.tpl etc pages, by editing Confirm.inc, lines 170 pp. which currently read:

    $txnItem->setItemName($item['fullItemDetails']['pathComponent']);
    $txnItem->setItemText($item['parentTitle']);

if you want to know what fields are available, I would insert a line like this just previous:

    echo '<pre>'; print_r($item); echo '</pre>';

and that will fill the screen with all the information that's available for you to choose from at that point in the code. Hopefully you can work it out from there.

As a bit of background: until the order is recorded in the database (i.e. while you're still looking at the user's cart, stored in the session) you can print what you like because you have access to the 'live' item records. That applies to the Select.tpl page. After you move to the confirm page the order is crystalized in the database, with only selected information about each item stored. (So if the item details change in the db, the contents of the order remain fixed, which is what you want.) The point at which the item details are recorded in the database is around line 170 of Confirm.inc - so that's when you have to choose what to put in the db entry for each line of the order.

I'm debating in my head whether to make various options available for what fields to put in the two text fields itemName and itemText, but I haven't come to a conclusion about whether it's worth complicating the UI for the module even more. Comments and suggestions welcome, of course.

 
Fotographer

Joined: 2007-03-23
Posts: 110
Posted: Mon, 2008-10-27 01:31

To avoid double posting here's a link to something I posted:

I was wondering if someone could give it a once over.

 
kferranti4

Joined: 2008-02-10
Posts: 26
Posted: Tue, 2008-10-28 14:59

Is there a way to only show x amount of products in the pricing block. (e.g. items 1-6)

something from this line maybe?

Quote:
foreach from=$block.checkout.products item=thisProduct} {$thisProduct.name} {if isset($thisProduct.price)}{$block.checkout.csymbol}{$thisProduct.price}{else} {/if}
{/foreach}

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-10-28 15:27

That's a very old template you're looking at, as the latest version includes link to add each individual product directly to the cart.

But yes, you need to recode the foreach loop so it selects only the products that you want, be it only the first six, the ones that cost less that $20, or the ones whose names begin with "makeMeAmillionaire".

 
unknownid000

Joined: 2003-04-04
Posts: 16
Posted: Wed, 2008-11-26 23:17

Hey Alec,

Thanks for this! It worked great!

For others that might be wanting to have the chosen title of a file shown instead of the file name at paypal here is what worked for me.

Optional:
Right before line 170 in Confirm.inc I put in the pre line and then went through the checkout page and got the output of all the options (instead of the cart).

echo '<pre>'; print_r($item); echo '</pre>';

Then, based on that output I saw the variable was called 'title' so I just simply changed line 170 in Confirm.inc

from:

$txnItem->setItemName($item['pathComponent']);

to:

$txnItem->setItemName($item['title']);

Now, at paypal check out the name of what folks are purchasing is listed as the actual title of the photograph that I chose for it and not the name of the image file .jpg.

Thanks again!

-

 
Carpcatcher

Joined: 2004-02-02
Posts: 92
Posted: Mon, 2009-02-16 15:31

Hello,
I found that the email forms are in theme Carbon not really nice.
is it easly possible for me to change:
1) email field is to large
2) to many adress fields
3) quistion field to small
4) send button VErstuur ? is dutch but only one V capital

thanks in advance

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Mon, 2009-02-16 15:45
Quote:
1).....3)...

Edit the checkoutemail/templates/Details.tpl (follow the instructions at the top of the file)

Quote:
4)...

Feel free to edit the nl.po file and forward it to me.

 
Carpcatcher

Joined: 2004-02-02
Posts: 92
Posted: Mon, 2009-02-16 22:01

thanks for the info

 
Carpcatcher

Joined: 2004-02-02
Posts: 92
Posted: Tue, 2009-02-17 22:15
alecmyers wrote:
Quote:
1).....3)...

Edit the checkoutemail/templates/Details.tpl (follow the instructions at the top of the file)

As you can see the telephone field is 30 characters long, but how can I enlarge
the comments field?

<td align="right"><strong>{g->text text="Contact Telephone
Number"}:</strong></td>
<td><input type="text" name="{g->formVar
var="form[telephone]"}" value="{if
isset($form.telephone)}{$form.telephone}{/if}" size="30" /></td>
</tr>
<tr>
<td align="right"><strong>{g->text
text="Comments"}:</strong></td>
<td><textarea name="{g->formVar
var="form[custComments]"}">{if
isset($form.custComments)}{$form.custComments}{/if}</textarea></td>
</tr>
</table>

thanks in advance

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2009-02-17 22:33
 
rrhode

Joined: 2008-05-21
Posts: 43
Posted: Wed, 2009-02-18 18:41

Hi there,

I have a feature request that maybe you could help me with. I figured this would probably be a good place to post it.

Is it possible for the quantity to use a checkbox for cases where there can only be one item selection? For example, if I enter several sizes of images for the products why would someone order 3 of the same size image which can then be downloaded as a zip file? Therefore it should be possible to enable a checkbox for the quantity field if the quantity can only be 0 or 1.

I have figured out how to add the checkboxes to the SessionContents.tpl file using this code:

<input type="checkbox" name="{g->formVar var="form[photos][`$item.id`][quant][`$thisProduct.productId`]"}" 
				{if isset($item[$thisProduct.productId].quant)}checked="checked"{/if} 
				value="true" />

but I don't know how to make the form detect the quantiy as being 1 and it is always returning an error.

Furthermore, and this may be due to the large amount of customization I have, when I select no items it is emptying the cart for some reason.

Any ideas on how to confirm the checkboxes properly? I am lost trying to figure it out.

Thanks!

Ryan

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2009-02-18 19:06

There is a field for each product in the main checkout configuration page product table for an upper quantity limit. You can set the upper limit to 1, in which case any quantity of more than one is changed to 1 whenever the cart contents are saved (or you move to the 'confirm' page).

You could change it to a tick-box contingent on the upper quantity limit for that product; you'd have to change some code to get that limit into the template to be able to test for it. You'd also need to make the checkbox return "1" instead of "true" so that the result is parsed correctly. A further difficulty is that a checkbox that isn't checked doesn't return a form field, which generates a php warning when you try to parse the missing field. Not hard to code for, but still needs doing.

I did think about doing what you suggest (when the upper quantity limit is 1) but there are circumstances where it doesn't make sense: like when it's a product you could have more than one of (a special edition signed print) but where you want to restrict the purchase to 1 item per order.

So all things considered, I left it as it is.

Quote:
Furthermore, and this may be due to the large amount of customization I have, when I select no items it is emptying the cart for some reason.

Not sure what to say to this - except first, remove *all* your customization (reinstall the module from a fresh download) and see if you have the same problem.
If it's a popular idea, it wouldn't be hard to implement.