Page 1 of 1

PHP and Paypal Shopping Cart

Posted: Fri Sep 10, 2004 4:23 pm
by suz_1234
Hello,

I am trying to integrate Paypal shopping cart into my php based website...

Here is my shopping cart code..

Code: Select all

<input type="hidden" name="item_name" value= <?php echo $row&#1111;'bookName']; ?>>

<input type="hidden" name="item_number" value=<?php echo $row&#1111;'bookID']; ?>>
This code works partially. When I click on Add To Cart, the item is added into the shopping cart, but it does not print the bookName quite right..
So, for example,

If the book name is: PHP and Paypal Shopping Cart
It will only print 'PHP' in the Shopping cart... how would I make it print the full title of the item.

Thanks,

Posted: Fri Sep 10, 2004 4:27 pm
by feyd
quote the value string in the html.

Posted: Fri Sep 10, 2004 4:33 pm
by suz_1234
Quotes does not work...

Any other suggestions???

Posted: Fri Sep 10, 2004 4:37 pm
by feyd

Code: Select all

<input type="hidden" name="item_name" value="<?php echo $row&#1111;'bookName']; ?>">
that doesn't work?

Posted: Fri Sep 10, 2004 4:51 pm
by suz_1234
Thats right, it doesn't work...

If I put quotes, it goes the Shopping cart but and prints 'Please enter an amount greater than zero.' in bold red

Another thing I found out was, when I look at the Source.. It shows me the Shopping cart values, just like I want (with the whole title)..

You may take a look at the site:

http://www.shalemdistributors.com/listBooks.php

Try clicking on the Add To Cart button... This is the modified version w/ quotes

Thanks

Posted: Fri Sep 10, 2004 4:55 pm
by feyd

Code: Select all

<input type="hidden" name="bookName" value= Overcomming Spiritual Barriers in Japan>
that's not quoted.

copy the line I wrote exactly, and try again.