close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Editing details passed to PayPal - only sending product code (ID) at moment?

Thread began 5/12/2014 12:02 pm by Nathon Jones Web Design | Last modified 5/13/2014 8:12 am by Jason Byrnes | 997 views | 5 replies |

Nathon Jones Web Design

Editing details passed to PayPal - only sending product code (ID) at moment?

When customers select PayPal, and are taken to PayPal, our client is only seeing the Product Code listed and we need to include the title and various variables each of which are columns in the eCart object:
Name
Description
Colour
Dimmable
Sensor

How (where) do we edit what's sent to PayPal?
Thank you.
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

on the confirm page, there will be a code block to send the item name paypal, it will look like this:
$nextIndex = count($WA_PP_ECO_Do_itemized[0]);
$WA_PP_ECO_Do_itemized[0][$nextIndex] = "Name" . strval($cartIndex+1) . "";
$WA_PP_ECO_Do_itemized[1][$nextIndex] = "".$cartName->DisplayInfo("Name") ."";

you can edit that to concatenate other columns:
$WA_PP_ECO_Do_itemized[1][$nextIndex] = "".$cartName->DisplayInfo("Name") ." ".$cartName->DisplayInfo("Description")."" ;

you can add additional columns in the sam manner


note: the name has a character limit of 127 characters.

Sign in to reply to this post

Nathon Jones Web Design

On my confirm page it is listed as:
$WA_PP_ECO_Do_itemized[1][$nextIndex] = "".$LEDCart->DisplayInfo("Name") ."";

Does that space at the end matter? Between the last bracket and the period?

I know that my client has long product titles (Description) - is there a way to limit the number of characters displayed for any one field in that concatenated list?

Also, if I want to separate my cart columns with something like a forward slash or upright slash, so it's easier to read on the PayPal side, how would I edit the concatenated string?

Here's what I have just now (I've not added in the Description column yet) on line 327 on my confirm page:
$WA_PP_ECO_Do_itemized[1][$nextIndex] = "".$LEDCart->DisplayInfo("Name") ." ".$cartName->DisplayInfo("Colour")." ".$cartName->DisplayInfo("Dimmable")." ".$cartName->DisplayInfo("Sensor")."";

It's producing the following error on submission:
Fatal error: Call to a member function DisplayInfo() on a non-object in /home/led2014/public_html/confirm.php on line 327

Thank you.
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

  Does that space at the end matter? Between the last bracket and the period?  



no the space does not matter

  Also, if I want to separate my cart columns with something like a forward slash or upright slash, so it's easier to read on the PayPal side, how would I edit the concatenated string?  


use the substr function:
http://www.php.net/manual/en/function.substr.php, for example to limit the description to 12 characters:

$WA_PP_ECO_Do_itemized[1][$nextIndex] = "".$cartName->DisplayInfo("Name") ." - ".substr($cartName->DisplayInfo("Description"),0,12)."" ;

  is there a way to limit the number of characters displayed  




here is an example using a hyphen:
$WA_PP_ECO_Do_itemized[1][$nextIndex] = "".$cartName->DisplayInfo("Name") ." - ".$cartName->DisplayInfo("Description")."" ;

  It's producing the following error on submission:  


you have to substitute your cart name in the code, in my example code, i used $cartName as the name of the car object. you need to adjust accordingly, for example::

$cartName->DisplayInfo("Colour")

should be:
$LEDCart->DisplayInfo("Colour")

Sign in to reply to this post

Nathon Jones Web Design

Thank you Jason. Clear and comprehensive although the last bit should have read:
$LEDCart->DisplayInfo("Colour")

...but I knew what you meant!
Regards
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

You're welcome. I Updated the reply to change the last bit of code.

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...