Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP and MYSQL e-commerce help
Old 08-14-2009, 10:18 PM PHP and MYSQL e-commerce help
Junior Talker

Posts: 1
Name: taeob
Trades: 0
Hi, My name is Luther, I am new to this forum.

Could you guys help me figure out how to include the shipping cost and adding it to the total price of the items purchased in the Paypal. Firstly, I used the Beginning PHP and MySQL E-commerce book to build my e-commerce website. Then, I have completed till the storing customer orders and decided to use Paypal as my primary payment method. I am having trouble in adding the shipping cost to the total amount that the customer is about to pay when they check out. All thoughts are welcome.

Here is my Paypal form code (include/config.php):
// PayPal configuration
define('PAYPAL_URL',
'https://www.paypal.com/xclick/business=username@hotmail.com');
define('PAYPAL_CURRENCY_CODE', 'USD');
define('PAYPAL_RETURN_URL', 'http://localhost/tshirtshop/');
define('PAYPAL_CANCEL_RETURN_URL', 'http://localhost/tshirtshop/');

Here is the paypal redirect link (presentation/checkout_info.php)
// This will contain the PayPal link
$redirect =
PAYPAL_URL . '&item_name=TShirtShop Order ' .
urlencode('#') . $order_id .
'&item_number=' . $order_id .
'&amount=' . $this->mTotalAmount .
'&currency_code=' . PAYPAL_CURRENCY_CODE .
'&return=' . PAYPAL_RETURN_URL .
'&cancel_return=' . PAYPAL_CANCEL_RETURN_URL;

// Redirection to the payment page
header('Location: ' . $redirect);

Here are the screens:

http://www.freeimagehosting.net/imag...8c004417ff.jpg
http://www.freeimagehosting.net/imag...c1e747981b.jpg

I would appreciate your help. Please let me know if you want to see the rest of my codes. Btw, I used Xampp to integrate the website. Thanks!
blinkmadden is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-15-2009, 01:47 PM Re: PHP and MYSQL e-commerce help
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
PHP Code:
'&amount=' $this->mTotalAmount $Shipping 
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to PHP and MYSQL e-commerce help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24580 seconds with 12 queries