Guest Posted August 10, 2008 Share Posted August 10, 2008 Hello all, I am relatively new to php coding - I've become decent at dissecting the code I'm looking at; however, I have never been good at all the logic behind it all and writing code from complete scratch. I have a problem I have been trying to resolve on my own reading through the board and searching google and yahoo but I come up blank every single time. Like I said I'm not great at coding from scratch so if anyone is kind enough to help me with my problem I'd need as straightforward and simple an answer as possible. My issue is that I'd like to create a custom page for my site(also the code I require would go into an email newsletter) that displays MANY products on it. It really won't have an product information displayed other than the price and an add to cart button. I've found the way to add a specific item to the cart with the following code from the HTML output of a specific test product info page: <form name="cart_quantity" action="http://frag-addicts.com/store/product_info.php?products_id=1&action=add_product" method="post"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody> <tr> <td><table class="infoBox" border="0" cellpadding="2" cellspacing="1" width="100%"> <tbody><tr class="infoBoxContents"> <td><table border="0" cellpadding="2" cellspacing="0" width="100%"> <tbody><tr> <td> <input name="products_id" value="1" type="hidden"> <input src="product_info.php_files/button_in_cart.gif" alt="Add to Cart" title=" Add to Cart " border="0" type="image"></td> </tr> </tbody></table></td> </tr> </tbody></table></td> </tr> </tbody></table> </form> The thing I do NOT know how to do is call that very same specific items price from the database. The whole OSC setup is written to call all the information on the page load...I'm just not bright enough to figure out how the heck to code it so it displays the product price... I'd also like to be able to take the price and multiply it by a percentage to achieve a new price(reason being is I need the same products price displayed twice...both times changed by a percentage basically for a "what we'd buy it for" price and then a "what we'd sell it for" price) if this is even possible. Can anyone please help? I've been looking all over and feel like a complete idiot since it's the one thing I can't seem to figure out. Thanks in advance. - Scott Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.