Generating an Add to Cart Button that uses my database?, Custom Shopping Cart |
Generating an Add to Cart Button that uses my database?, Custom Shopping Cart |
colinkites2000 |
May 14 2009, 04:04 PM
Post
#1
|
Member Group: Members Posts: 59 Joined: 11-July 08 Member No.: 6,143 |
Hi Everyone,
I've been plugging away at taking our website (www.abraDELETETHISmetal.com) to take online orders. The original plan was to use PHPCart (www.phpcart.net) to generate the code for an "ADD TO CART" button that I would add beside each of my items in the tables. I tested this and it worked fine, except that updating a lot of pricing was going to be labor-intensive. I would need to change the price in the HTML table listing and then change the pricing of the PHPCart button as well. So I decided it would be nice to have some dynamic tables through MySQL/PHP so that we could make bulk updates quickly in excel and also to add new items this way to the tables. That seems to be working well. At this point, I can update the pricing (and other information) quickly and easily using the database but since the PHPCart button is not linked to the database, I would need to also make the adjustment for that. Also, the thought of hand entering 1000 items to make the order button begs me to research this before going through with that. Ideally, I would like to be able to have the order button call my database and determine the pricing and item description from that. Is this possible? PHP? Software? I am competent in HTML and just getting started in PHP/MySQL. It is essential to keep the look of the site nearly identical and hopefully use our current database. Any insights greatly appreciated. Sincerely, Colin |
Brian Chandler |
Apr 5 2012, 10:54 PM
Post
#2
|
Jocular coder Group: Members Posts: 2,460 Joined: 31-August 06 Member No.: 43 |
Well, yes, you need to add some program to generate the 'add to cart' button, which needs to refer to the db, and you need to implement the cart, which means remembering the current cart selection, either using cookies, or passing around arguments, or passing around an id to a database cart table.
I don't see how adding a field to the product table helps in any way. It is straightforward programming, but you need to be able to look at the existing program to add it in. There is no simple "piece of code" anyone can give you which just "drops in". |
Lo-Fi Version | Time is now: 28th March 2024 - 07:11 AM |