News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

Main Menu

add a Paypal shopping basket to your gallery.

Started by Casper, July 04, 2004, 07:02:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Casper

Quote from: mgraf on March 04, 2005, 09:01:29 PM
Casper,
Seem to be having a problem... I think I got everything uploaded and modified correctly.  I used your instructions in modifying an existing theme.   When adding one of the print options to your cart, it takes me to the Paypal page - but has an error:

QuotePlease enter an amount greater than zero.

There is a small section of code for the theme.php mods that shows:

<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="business" value="{$CONFIG['paypal_email']}" />
<input type="hidden" name="item_name" value="Photo Name : {TITLE}" />
<input type="hidden" name="amount" value="" />
<input type="hidden" name="currency_code" value="{$CONFIG[currency]}" />


The "amount" value="" seems strange, is this correct?

Not quite sure what is going on.  Any suggestions?

Here is the gallery:  http://www.grafphoto.com/gallery/index.php

ALSO - instead of the Picture {TITLE} being used as the description in the Paypal cart, can this be changed to the data for Custom Field 1?  Is theme.php the only place you would have to change this reference in the paypal code above?

Mark


Not sure why your price is not being picked up.  Try loading the classic theme version of the hack and see if that works.

To use the user1 field, you will need to change the displayimage.php as well.

Use this in the code in theme.php to call it {USER1}

Then in displayinage.php, find;

'{FILENAME}' => $CURRENT_PIC_DATA['filename'],
'{ALBUM_TITLE}' => $CURRENT_ALBUM_DATA['title'],


and add into this array;

'{USER1}' => $CURRENT_PIC_DATA['user1'],
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

mgraf

Quote from: Casper on March 06, 2005, 04:22:17 PM

Not sure why your price is not being picked up.  Try loading the classic theme version of the hack and see if that works.


Casper, I am not sure what this would do for me.  My theme is already extensively modified, and I wouldn't want the classic version.  If there are any files you would need to examine, I would be happy to send them.  I would really like to get this to work.

Still puzzled,

Mark

Casper

Quote from: l-nes on March 05, 2005, 01:02:20 AM
hi all

Great hack.

I have one problem. I don't use any of the "normal" theme. I have many pictures with no title. I se that it is possible to download a "theme" where this is fixed. Can you explain where i have to make changes to my theme.

Thank you.

www.fotosalg.net

Lars E.


Hi Lars,

please see this post and the answer, http://coppermine-gallery.com/forum/index.php?topic=13938.msg56555#msg56555
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

Quote from: mgraf on March 06, 2005, 04:29:35 PM
Quote from: Casper on March 06, 2005, 04:22:17 PM

Not sure why your price is not being picked up.  Try loading the classic theme version of the hack and see if that works.


Casper, I am not sure what this would do for me.  My theme is already extensively modified, and I wouldn't want the classic version.  If there are any files you would need to examine, I would be happy to send them.  I would really like to get this to work.

Still puzzled,

Mark


It would see if the problem lies with your theme, or other parts of the code.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

Quote from: netfalls on March 05, 2005, 05:09:06 PM
Hi all,


I was wondering if it's possible to set 3 or 4 different paypal adreess?

I would like each user to get his money directly.

Thanx
Philip

www.netfalls.com/portal2/

No, not with this current mod.

There may well be a way to code it, but I don't know how.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

mgraf

Quote from: Casper on March 06, 2005, 04:31:30 PM
It would see if the problem lies with your theme, or other parts of the code.

Ok, just updated the Classic theme and tried it - still get the same error for the shopping cart.
(By the way, I updated the PHP files using Dreamweaver.  Just cut and paste from your code instructions.  Can this play a part?)

Mark

Casper

Yes it can.

Dreamweaver, and any other wysiwyg editor can add bits of it's own code, which upsets the php code..

Zip up your theme.php and template.html, and attach them to your reply to this post, using the additional options.  If you cannot zip them, save them as txt files.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Tophux95


Hello,

After Install , Update my site Web and create a paypal account, I always a msg error in the basket paypal :

      "The link you have used to enter the PayPal system contains an incorrectly formatted item amount."

Do you want Help Me

Tophux

l-nes

hi again

i have the same problem. I get an error saying amount must be larger then zero. I used UltraEdit to edit the php files. any ideas ?


Lars E.

Casper

@ Tophux95

please give a link to your site.  What currency do you use?  for instance, if using dollars, and the price is $10, then the setting for the price in config must be 10.00 not $10.00, or $10.

@ l-nes

Have you double checked your mod.  What theme are you using?  More info would help, as well as a link.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

l-nes

Sorry for the poor inforamtion

My site: www.fotosalg.net. I am testing this out with currency = $, price is 50.00. I am useing the theme "digital flow". Everything else on the mod seems to be working.

In debug it says:
"Notice: Use of undefined constant currency - assumed 'currency' in /customers/fotosalg.net/fotosalg.net/httpd.www/bildearkiv/themes/digital_flow/theme.php on line 554
Notice: Use of undefined constant currency_symbol - assumed 'currency_symbol' in /customers/fotosalg.net/fotosalg.net/httpd.www/bildearkiv/themes/digital_flow/theme.php on line 561"

Line 554: <input type="hidden" name="currency_code" value="{$CONFIG[currency]}" />
Line 561: <option value="{$CONFIG['size1']} @{$CONFIG['size1_price']} ">{$CONFIG['size1']};    {$CONFIG[currency_symbol]}{$CONFIG['size1_price']}   </option>

Can this be the problem ?

Thx

Lars E

Casper

please attach a zip of the 2 theme files changed (or saved as txt files) so I can have a look.

It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

netfalls

Hi guys,

I would like to know if it's possible to set a paypal address for each member and an option to select when uploading photo witch size are available.

My site http://stock.netfalls.com
In my view you cannot claim to have seen something until you have photographed it

mgraf

Quote from: Casper on March 06, 2005, 07:20:33 PM
Yes it can.

Dreamweaver, and any other wysiwyg editor can add bits of it's own code, which upsets the php code..

Zip up your theme.php and template.html, and attach them to your reply to this post, using the additional options.  If you cannot zip them, save them as txt files.

Thanks for the offer Casper - but I took another route.  Since I could not get this one figured out, I went with an alternative that was actually a bit easier to implement, except it doesn't offer the Admin Config interface that this one has.   I went back and compared the DW modified PHP files in a plain text editor, and there didn't seem to be any differences between it and the Mod instructions.

Mark


Casper

Quote from: netfalls on March 08, 2005, 02:00:26 PM
Hi guys,

I would like to know if it's possible to set a paypal address for each member and an option to select when uploading photo witch size are available.

My site http://stock.netfalls.com

Neither of these requests are available with this mod.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Howard

Hey Casper,

Thanks for the great mod. I've got it running on my website without any trouble.

I have one small problem though. I run a website which is frequently updated with new photos, often 100s at a time. As other have noticed, it is not possible to view the "order form" without entering a Title & Description. Because I use the Batch Add option of Coppermine, these are all blank by default. As you can imagine, it would be very time consuming to manually enter a name and description for each one :(

So my question is, is it possible to make the input form for each image pass on the URL to the image instead of the title etc to PayPal? And with that, the order form would be shown on all new images by default (saving me from adding the details for each image).

Thanks in advance,

Howard

Casper

The add to basket problem has been fixed in the downloads available from my site, and the method to do it manually is on this thread, http://coppermine-gallery.com/forum/index.php?topic=13938.msg56555#msg56555

How to add the filepath to the basket info is at http://coppermine-gallery.com/forum/index.php?topic=13938.msg69854#msg69854

It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

mikecheliak

I am not a complete newbie to PHP/SQL but I am reletively new to Coppermine.  How do I install this hack?  I just need to be pointed in the right direction to get started.  I have downloaded the shop_update files and the themes but I am not sure where I have to upload these and what I do to change the paypal account information.  I am from Canada and also need to know if this will work with my account.

Thanks a MIL!!!

Mike Cheliak
Mostly a Photographer

mikecheliak

Disregard the above post...I found the instructions...sorry!

:-[

mikecheliak

Tried to update SQL and got this error...any ideas

SQL-query:

ALTER TABLE `CPG_filetypes` DROP INDEX `EXTENSION` ,
ADD PRIMARY KEY ( `extension` )
MySQL said:  

#1091 - Can't DROP 'EXTENSION'. Check that column/key exists