Page 1 of 1

Need help on a PHP Shopping Cart

Posted: Thu Apr 08, 2004 3:07 pm
by botch
Hello PHP.com Forum,

This is my first post! I admit I'm very new to the PHP language which is why I'm here.

I am working on this website @ http://www.westcoasttoolsupply.com

Basically they have a custom made shopping cart etc...
The company that handles the credit card transactions stopped hosting the interchange page. It is my job to change the website accordingly to handle the new interchange page which we signed up for.

I have uploaded the 3 php files which will send the information to the new interchange page. This is not the problem. The problem is in my shop2.php file generates the total amount. I need to figure out a way using x_amount to post it on shop3.php (which is the page that posts the information to sim.php which is all I need... and the x_description as well)

Once I have a total on shop3.php it will then post it on sim.php and let the interchange page handle the rest from there. I just need help carrying that grand total over to the shop3.php page then from there I can use
<input type="hidden" name="x_amount" value="<?$your_amount_variable_here? or something to that extent.

Hopefully you guys can understand this. THanks!!!

Posted: Thu Apr 08, 2004 6:43 pm
by phait
hi,
I confess that I don't fully undestand the requirement here, and looking over the site, I couldn't seem to get to shop3.php as when I tried to 'Checkout' on shop2.php it just sent back to shop2.php. But anyways, viewing source on shop2.php, aren't you already passing the total price as ioc_order_total_amount?

Code: Select all

<td valign=top> <form  method=post><input type="image" src="catalog/images/button_checkout.gif" border="0" width="129" height="21" alt=" Checkout "><input type=hidden name=ioc_merchant_id value="wcts"><input type=hidden name=ioc_order_tax_amount value="0">
<input type=hidden name=ioc_order_ship_amount value="0"><input type=hidden name=ioc_order_total_amount value="2.99">
<input type=hidden name=ecom_billto_postal_postalcode value=""><input type="hidden" name="x_amount" value="2.99"> </form>
on shop3.php you then look for $_POST['ioc_order_total_amount']


btw, did you build the html for the site? there are missing end table cell tags and loads of unquoted attributes - it would need some serious effort to pass any accessability checks... might help get you a little more work with the client....

Hey

Posted: Tue Apr 13, 2004 2:22 pm
by botch
I'm not sure how long ago you checked the site, but shortly after I posted it, I figured out what to do. I had x_amount post from shop2 to shop3 and finally to sim3.php

Yea I noticed that too, I'm actually going to change the entire front end of the website as well. It's hideous looking heh.

At anyrate I ran into a huge problem. We have a database of all the shopping carts checked in or abandoned. The problem is the interchange page is supposed to send information back to us which our php link stores as a database entry in mysql.

So basically when a customer goes to purchase an order our website actually keeps track of ... certain information :P

Now I beleive since we got a new interchange page that only recognizes x_amount and x_description etc... when our mysql database it set up to handle amount_id and description_id, confused. Yes I am :(

Can anyone give me any ideas!?