close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How do I add Options to PayPayl Pro checkout form

Thread began 5/17/2011 2:16 pm by mcr_31184546 | Last modified 11/15/2011 12:30 pm by Jason Byrnes | 1263 views | 7 replies |

mcr_31184546

How do I add Options to PayPayl Pro checkout form

I am having Trouble figuring out how to add PayPal options like size and color to the Checkout Form in eCart 5. When using Standard as the payment option they are added to the form automaticlly, but they are not present in the Webpayments Pro.

Sign in to reply to this post

Jason ByrnesWebAssist

on the confirm page, you will need to modify the code that passes the item information to paypal to concatenate the options on the name. Find the folloing coed on your confirm page:

php:
$PP_DirectPayment_itemized[0][$nextIndex] = "Name" . strval($cartIndex+1) . "";

$PP_DirectPayment_itemized[1][$nextIndex] = "".$<youreCartObjectName>->DisplayInfo("Name")  ."";



where "<youreCartObjectName>" is the name of your eCart object.

assuming the option columns are named "Size and "Color", change the code to:

php:
$PP_DirectPayment_itemized[0][$nextIndex] = "Name" . strval($cartIndex+1) . "";

$PP_DirectPayment_itemized[1][$nextIndex] = "".$<youreCartObjectName>->DisplayInfo("Name")  ." Size: ".$<youreCartObjectName>->DisplayInfo("Size")." Color: ".$<youreCartObjectName>->DisplayInfo("Color")."";
Sign in to reply to this post

goat200487425014

My confirm page doesn't seem to be adding the sizes to the items when they get to my paypal standard account.... How do I go about fixing this?

Attached Files
confirm.zip
Sign in to reply to this post

goat200487425014

Is there a way to show the shipping option they chose too?

Sign in to reply to this post

Jason ByrnesWebAssist

to pass the selected shipping option, you need to add code to set a session variable with the name of the selected shipping option based on the ShipType session. change this line:

php:
if (isset($_POST['ShipType'])) $_SESSION['ShipType'] = $_POST['ShipType'];



to:

php:
if (isset($_POST['ShipType'])) $_SESSION['ShipType'] = $_POST['ShipType'];

switch ($_SESSION['ShipType']) {
    case 1:
        $_SESSION['ShipTypeString'] = "UPS Ground";
        break;
    case 2:
        $_SESSION['ShipTypeString'] = "USPS First-Class Mail";
        break;
    case 3:
        $_SESSION['ShipTypeString'] = "USPS First Class Mail";
        break;
    default: 
        $_SESSION['ShipTypeString'] = "USPS Priority";
        break;
}



then concatenate the size and the shipping to the item name being passed to PayPal:

php:
<input type="hidden" name="item_name_<?php echo $LuckiexLosersCart_Index+1?>" id="item_name_<?php echo $LuckiexLosersCart_Index+1?>" value="<?php echo $LuckiexLosersCart->DisplayInfo("Name"?> Size:<?php echo $LuckiexLosersCart->DisplayInfo("size"?> Shipping Option: <?php echo((isset($_SESSION["ShipTypeString"]))?$_SESSION["ShipTypeString"]:""?>" />
Sign in to reply to this post

goat200487425014

Ok so that worked, but is there a way to get it to show where the tax and total displays at the bottom? I guess when we work on my ticket and get the shipping to show up down there, we could just add the value of the shipping method name next to the shipping price correct?

Sign in to reply to this post

goat200487425014

For case 3, if the weight is over 13oz it changes from "First Class" to "Parcel Post" so how do we reflect that for case 3?

Sign in to reply to this post

Jason ByrnesWebAssist

i will look into this issue when i call about your other problem.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...