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
Shopping Cart Script - BASIC
Old 02-11-2008, 05:52 PM Shopping Cart Script - BASIC
Gilligan's Avatar
Website Designer

Posts: 1,670
Name: Stefan
Location: London, UK
Trades: 0
Let me just start out by saying that i have been to 2 other coding forum websites, and neither have been of any assistance to me.

-----------------------------------------------------

1) I have a merchant account with SECPay
2) I have a MySQL Database
3) I have little PHP skills

The thing i want is REALLY basic.

I only need this so far for one product (costing £10). I would like to add this product to my database, then i would like for the user to buy this product and pay for it through SECPay.

I want it so the user clicks 'continue' (£10 multiplied by quantity is added to total), they then select their shipping (price is added on to total), they finally click 'go to payments' and are taken to secpay with their final price.

An example is below.

http://gks.890m.com/democart - Does not function (just an example)

i also have the form to take the user to the secpay page

Code:
<form name="payment" method="POST" action="https://www.secpay.com/java-bin/ValCard" name="autosubmit">
<input type="hidden" name="callback" value="shopurl">
<input type="hidden" name="merchant" value="MerchantID">
<input type="hidden" name="trans_id" value="transaction id">
<input type="hidden" name="amount" value="total price">
<input type="submit" name="Submit" value="Go to payments">
</form>
All i need is a script that enables the EXTREMELY BASIC cart and also enables the points specified in red above.


Hope i explained this well enough.


Any help is appreciated.
Gilligan
Gilligan is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-11-2008, 07:57 PM Re: Shopping Cart Script - BASIC
Defies a Status

Posts: 1,606
Trades: 0
Maybe you should ask the people at SECPay.

PayPal has easy to follow instructions on their site.
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Old 02-12-2008, 03:11 AM Re: Shopping Cart Script - BASIC
Gilligan's Avatar
Website Designer

Posts: 1,670
Name: Stefan
Location: London, UK
Trades: 0
I have, several times. They say that they are only worried about the final price, which would be much easier if i were charging the same for all orders. However, i need price changes for quantity and shipping. I also need an increasing transaction id for refunds.
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 02-12-2008, 03:42 PM Re: Shopping Cart Script - BASIC
reli4nt's Avatar
Extreme Talker

Posts: 168
Location: New York
Trades: 0
I don't think there are any really basic cart that could handle that. Oscommerce and several others can but they come with a lot of baggage you may not want. I suspect your best bet would be to hire a developer to write the code for you or to settle for a more complex script.
__________________

Please login or register to view this content. Registration is FREE

Designing the world we live in.
Defining the terms we live by.
reli4nt is offline
Reply With Quote
View Public Profile Visit reli4nt's homepage!
 
Old 02-12-2008, 05:13 PM Re: Shopping Cart Script - BASIC
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Couldn't you just calculate the price before the page loads?

Something like this:
PHP Code:
<?php
//Calculate total price and store in $total_price
//For example
$total_price = (int)$_GET['quantity']*10 + (float)$_GET['shipping'];

echo 
'
<form name="payment" method="POST" action="https://www.secpay.com/java-bin/ValCard" name="autosubmit"> 
<input type="hidden" name="callback" value="shopurl"> 
<input type="hidden" name="merchant" value="MerchantID"> 
<input type="hidden" name="trans_id" value="transaction id"> 
<input type="hidden" name="amount" value="'
.$total_price.'"> 
<input type="submit" name="Submit" value="Go to payments">
</form>'
;
?>
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 02-12-2008, 06:07 PM Re: Shopping Cart Script - BASIC
Gilligan's Avatar
Website Designer

Posts: 1,670
Name: Stefan
Location: London, UK
Trades: 0
Thanks for the replies, belive it or not this is the only forum out of 7 that have replied with some help, although i had help from a mate who knows php. He made me a code and it works exactly how it should, i will post the code soon. Haven't got much time now.
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 02-12-2008, 10:06 PM Re: Shopping Cart Script - BASIC
Defies a Status

Posts: 1,606
Trades: 0
I never heard of SECPay but if anyone supports it or makes it easy to add a plugin it would most likely be CubeCart. Not what I would call a simple cart but it is one that works.

Come and visit more often.
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Old 02-13-2008, 09:14 AM Re: Shopping Cart Script - BASIC
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
From the sounds of it you have found a solution, this should be very easy to do, just a few forms and a database and your done i have made a similar one cant wait till i can actually get the only payments set up Lol

Good luck anyways, and do visit more often we are a nice bunch here.
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 02-13-2008, 11:35 AM Re: Shopping Cart Script - BASIC
Gilligan's Avatar
Website Designer

Posts: 1,670
Name: Stefan
Location: London, UK
Trades: 0
definitely will visit more often, i do have coding skills , just not php. i'm good at css
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 02-13-2008, 12:35 PM Re: Shopping Cart Script - BASIC
Gilligan's Avatar
Website Designer

Posts: 1,670
Name: Stefan
Location: London, UK
Trades: 0
Heres the code.

http://www.gks.890m.com/cart.zip

Unzip and read 'readme.txt'
Gilligan is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Shopping Cart Script - BASIC
 

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.32609 seconds with 12 queries