PDA

View Full Version : Is there a way to do paypal from a hidden exhibition


poke
13th of March 2005 (Sun), 02:20
I would like to be able to create a private exhibition, but be able to email the link to people and then have them purchase the photos via paypal. I am not using online printing, so there is no need for the photos to be available for a www printing company.

ATM when I try to do this, on the order page when I select paypal, I get this...

SECURITY INFO: INCORRECT PHOTO ID

TIA

poke
14th of March 2005 (Mon), 15:30
So... has no one ever wanted to be able to sell prints from EE... and not have the whole world seeing the gallery?

Pekka
14th of March 2005 (Mon), 16:22
Oh, I see that there is a bug with EE commerce and hidden exhibitions!

In order.php

Replace line

ee_uncookied_extract ($u); // now we have all get variables back
}


with

ee_uncookied_extract ($u); // now we have all get variables back
}

if (isset ($HTTP_POST_VARS['pass'])) {
$pass = $HTTP_POST_VARS['pass'];
}

and lines

<input type="hidden" name="u" value="<?php print $uncookied_base_id; ?>">
<input type="hidden" name="template" value="<?php print $template; ?>">
<input type="hidden" name="photo" value="<?php print $photo; ?>">
<input type="hidden" name="page" value="<?php print $page; ?>">

with

<input type="hidden" name="u" value="<?php print $u; ?>">
<input type="hidden" name="template" value="<?php print $template; ?>">
<input type="hidden" name="photo" value="<?php print $photo; ?>">
<input type="hidden" name="page" value="<?php print $page; ?>">
<input type="hidden" name="pass" value="<?php print rawurlencode(ee_stripslashes($pass)); ?>">

also in ee_commerce/required/data.php replace

if (!function_exists('eecommerceform')) {
function eecommerceform($formname, $action_URL, $formtarget, $action_method, $id) {
global $uncookied_base_id;
global $file;
global $exhibition;
global $header;
global $ownername;
global $varlist;
global $template;
global $photo;
global $page;
print "<form name=\"" . $formname . "\" action=\"" . $action_URL . "\" target=\"" . $formtarget . "\" method=\"" . $action_method . "\" id=\"" . $id . "\">\n";
print "<input type=\"hidden\" name=\"file\" value=\"{$file}\">\n";
print "<input type=\"hidden\" name=\"exhibition\" value=\"{$exhibition}\">\n";
print "<input type=\"hidden\" name=\"header\" value=\"{$header}\">\n";
print "<input type=\"hidden\" name=\"ownername\" value=\"{$ownername}\">\n";
print "<input type=\"hidden\" name=\"u\" value=\"{$uncookied_base_id}\">\n";
print "<input type=\"hidden\" name=\"template\" value=\"{$template}\">\n";
print "<input type=\"hidden\" name=\"photo\" value=\"{$photo}\">\n";
print "<input type=\"hidden\" name=\"page\" value=\"{$page}\">\n";
return;
}
}

with

if (!function_exists('eecommerceform')) {
function eecommerceform($formname, $action_URL, $formtarget, $action_method, $id) {
global $u;
global $file;
global $exhibition;
global $header;
global $ownername;
global $varlist;
global $template;
global $photo;
global $page;
global $pass;
print "<form name=\"" . $formname . "\" action=\"" . $action_URL . "\" target=\"" . $formtarget . "\" method=\"" . $action_method . "\" id=\"" . $id . "\">\n";
print "<input type=\"hidden\" name=\"file\" value=\"{$file}\">\n";
print "<input type=\"hidden\" name=\"exhibition\" value=\"{$exhibition}\">\n";
print "<input type=\"hidden\" name=\"header\" value=\"{$header}\">\n";
print "<input type=\"hidden\" name=\"ownername\" value=\"{$ownername}\">\n";
print "<input type=\"hidden\" name=\"u\" value=\"{$u}\">\n";
print "<input type=\"hidden\" name=\"template\" value=\"{$template}\">\n";
print "<input type=\"hidden\" name=\"photo\" value=\"{$photo}\">\n";
print "<input type=\"hidden\" name=\"page\" value=\"{$page}\">\n";
print "<input type=\"hidden\" name=\"pass\" value=\"" . rawurlencode(ee_stripslashes($pass)) . "\">\n";
return;
}
}

chriz
15th of March 2005 (Tue), 01:11
I gather you will add these modifications to the upcoming version of EE ?

Pekka
15th of March 2005 (Tue), 05:54
Yes of course.

poke
15th of March 2005 (Tue), 07:01
Thanks heaps Pekka... That did the trick.

One little problem though, the BACK link on the order page... it does not handle the hidden exhibitions. I know your busy, and this is not a serious problem for me, so whenever you get the time to respond is fine.

If you want to see what I mean...

http://photo.pudltec.com/gallery/list.php?exhibition=2&pass=cheese

poke
15th of March 2005 (Tue), 07:14
I found it...

Replace this in order.php


if (!isset($HTTP_GET_VARS['newwin'])) {
print "<a href=\"{$page}.php?photo={$photo}&u={$uncookied_base_id}\
"><b>BACK</b></a><br>";
}


with this....


if (!isset($HTTP_GET_VARS['newwin'])) {
print "<a href=\"{$page}.php?photo={$photo}&u={$uncookied_base_id}&pass={$pass}\
"><b>BACK</b></a><br>";
}

poke
15th of March 2005 (Tue), 08:34
Got another one though... on list.php, if you select the info card view, when you click the for sale paypal link off that... it gets the photo id not found.

Replace in outputstyles/infocard.php - line 259 if thats any help


$ml = "<a href=\"order.php?photo={$photoid}&template={$tid}&page=list&exhibition={$thise
xhib}&u={$uncookied_base_id}\" TITLE=\"{$m}\" style=\"color: #{$s_
outputlink_color}\">" . $ms . "</a>";



$ml = "<a href=\"order.php?photo={$photoid}&template={$tid}&page=list&exhibition={$thise
xhib}&u={$uncookied_base_id}&pass={$pass}\" TITLE=\"{$m}\" style=\"color: #{$s_
outputlink_color}\">" . $ms . "</a>";

kheops
6th of February 2006 (Mon), 10:45
hi,
thanks to both, it works for me now ;)
Pekka, might i remind you not to forgot this "patch" for the upcoming EE2.0 ? (EE 1.5rc4 came before this patch, i'm aware of that)
many thanks