This is a server-side Java (.js) shopping cart script, often referred to as a 2nd party cart. This mod uses one of your image's custom description fields to assign different price options for different pictures (current default is the first field). The script serves as an interface between your on site and PayPal. Users only interact with your shopping page so there are no official, encrypted "PayPal button" for this mod. Everything you need is included in this module, you simply need to backup your displayimage.php and replace it with the displayimage.php file in this package.
If you need to use a custom description field other than the first field, you will have to change the "$pricing_setup = $user1;" variable in orders.php to $user2, $user3, or $user4, as appropriate.
You can also change the entries in the user field to whatever you wish. Just be sure to change the IF/ELSE statements accordingly.Set paypal ID and currency typeSet your paypal ID and currency, accordingly.
if ($pricing_setup=="Panoramics"||$pricing_setup=="panoramics") //custom field entry is "Panoramics"Each option field ($Option#) is paired with a corresponding description field ($Desc#). The $Option# field is what the script reads and posts to your paypal cart. The $Desc# field is what your customer sees in the dropdown lists. The \" is an 'escaped' expression for double quotes("), representing inches. You must use the escaped expressions for special characters in the Options fields for the script to work.   " is used to add extra spaces between words to space things out aesthetically. The @ character followed immediately by numbers is how the script reads prices to send to paypal. You can have as many Options as you want in your dropdown list. Just remember to pair them accordingly.
{
$Option1 = " Matted size: 10\" x 20\" (image size: 6\" x 16\") @35.00 ";
$Desc1 = " 10\" x 20\" @ $35.00 USD ( image size: 6\" x 16\") " ;
$Option2 = " Matted size: 14\" x 28\" (image size: 9\" x 23\") @95.00 ";
$Desc2 = " 14\" x 28\" @ $95.00 USD ( image size: 9\" x 23\") ";
$Option3 = " Matted size: 16\" x 32\" (image size: 11\" x 27\") @125.00 ";
$Desc3 = " 16\" x 32\" @ $125.00 USD ( image size: 11\" x 27\") ";
$Option4 = " Matted size: 18\" x 36\" (image size: 12\" x 30\") @135.00 ";
$Desc4 = " 18\" x 36\" @ $135.00 USD ( image size: 12\" x 30\")";
$Option5 = " Matted size: 20\" x 40\" (image size: 13\" x 33\") @150.00 ";
$Desc5 = " 20\" x 40\" @ $150.00 USD ( image size: 13\" x 33\")"; $Option6 = "";
$Desc6 = "";
$Option7 = "";
$Desc7 = "";
$Option8 = "";
$Desc8 = "";
$Option9 = "";
$Desc9 = "";
$Option10 = "";
$Desc10 = "";
}
else
// 11-20 for 2nd option or "Squares"
if ($pricing_setup=="Squares"||$pricing_setup=="squares") //custom field entry is "Squares"
{
$Option1 = " Matted size: 8\" x 8\" (image size: 6\" x 6\") @15.00 ";
$Desc1 = " 8\" x 8\" @ $15.00 USD ( image size: 6\" x 6\") " ;
$Option2 = " Matted size: 10\" x 10\" (image size: 8\" x 8\") @30.00 ";
$Desc2 = " 10\" x 10\" @ $30.00 USD ( image size: 8\" x 8\") ";
$Option3 = " Matted size: 12\" x 12\" (image size: 9\" x 9\") @40.00 ";
$Desc3 = " 12\" x 12\" @ $40.00 USD ( image size: 9\" x 9\") ";
$Option4 = " Matted size: 14\" x 14\" (image size: 11\" x 11\") @60.00 ";
$Desc4 = " 14\" x 14\" @ $60.00 USD ( image size: 11\" x 11\")";
$Option5 = " Matted size: 16\" x 16\" (image size: 12\" x 12\") @75.00 ";
$Desc5 = " 16\" x 16\" @ $75.00 USD ( image size: 12\" x 12\")";
$Option6 = " Matted size: 18\" x 18\" (image size: 13\" x 13\") @90.00 ";
$Desc6 = " 18\" x 18\" @ $90.00 USD ( image size: 13\" x 13\")";
$Option7 = "";
$Desc7 = "";
$Option8 = "";
$Desc8 = "";
$Option9 = "";
$Desc9 = "";
$Option10 = "";
$Desc10 = "";
}
else
// 21-30 for third option or "Standards and all else"
if ($pricing_setup=="Standards"||$pricing_setup=="standards"||$pricing_setup=="")
{
$Option1 = " Matted size: 8\" x 10\" (image size: 5\" x 7\") @15.00 ";
$Desc1 = " 8\" x 10\" @ $15.00 USD ( image size: 5\" x 7\") " ;
$Option2 = " Matted size: 11\" x 14\" (image size: 6\" x 9\") @30.00 ";
$Desc2 = " 11\" x 14\" @ $30.00 USD ( image size: 6\" x 9\") ";
$Option3 = " Matted size: 16\" x 20\" (image size: 11\" x 15\") @50.00 ";
$Desc3 = " 16\" x 20\" @ $50.00 USD ( image size: 11\" x 15\") ";
$Option4 = " Matted size: 18\" x 24\" (image size: 13\" x 19\") @75.00 ";
$Desc4 = " 18\" x 24\" @ $75.00 USD ( image size: 13\" x 19\")";
$Option5 = " ";
$Desc5 = " ";
$Option6 = " ";
$Desc6 = " ";
$Desc8 = " ";
$Option9 = " ";
$Desc9 = " ";
$Option10 = " ";
$Desc10 = " ";
}
else
// fall back when nothing matches, SAME AS STANDARDS.
{
$Option1 = " Matted size: 8\" x 10\" (image size: 5\" x 7\") @15.00 ";
$Desc1 = " 8\" x 10\" @ $15.00 USD ( image size: 5\" x 7\") " ;
$Option2 = " Matted size: 11\" x 14\" (image size: 6\" x 9\") @30.00 ";
$Desc2 = " 11\" x 14\" @ $30.00 USD ( image size: 6\" x 9\") ";
$Option3 = " Matted size: 16\" x 20\" (image size: 11\" x 15\") @50.00 ";
$Desc3 = " 16\" x 20\" @ $50.00 USD ( image size: 11\" x 15\") ";
$Option4 = " Matted size: 18\" x 24\" (image size: 13\" x 19\") @75.00 ";
$Desc4 = " 18\" x 24\" @ $75.00 USD ( image size: 13\" x 19\")";
$Option5 = " ";
$Desc5 = " ";
$Option6 = " ";
$Desc6 = " ";
$Desc8 = " ";
$Option9 = " ";
$Desc9 = " ";
$Option10 = " ";
$Desc10 = " ";
}
Start Form Block for purchase optionsThis is the user interface purchase < FORM > code block.
Select Finished size and MediumYou will probably want to edit the various "Select Type" dropdown list options as well.
Select matted size
Select print type
Select print medium
Select Mat Color
Decorative Mat Overlay (Optional, Double Matting)
Gift Wrap (+$7.50) (Includes greeting card of picture)