New Zenner
- Join Date:
- Feb 2010
- Posts:
- 18
- Plugin Contributions:
- 0
I want to add another New Button on Product Information page
Hi,
I am currently modifying my store and need to place a button on the Product Information Pages in addition to the Add to Cart Button.
I believe the correct location is /includes/templates/MY_TEMPLATE/templates/tpl_product_info_display.php
What I have at the moment is a standalone HTML solution
<?php
require('includes/application_top.php');
// create a product list
$product = $db->Execute("select p.products_id, pd.products_name, p.products_price, p.products_priced_by_attribute
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
");
?>
<html>
<form method="post" action="auctionit.php">
<div>
<select class="selectBox" name="select" size="10">
<?php
while(!$product->EOF) {
echo '<option value="' . $product->fields['products_id'] . '">' . $product->fields['products_name'] . '</option>';
$product->MoveNext();
}
?>
</select>
<input type="submit" name="Submit" value="Create Listing">
</div>
</form>
</html>
This creates a selection list box with every product in, you can select a product and click submit and auctionit.php loads and I can use $result = $_POST['select']; to pick up the product id and continue with the task.
What I want to achieve is have the button on the product information page which then loads auctionit.php with access to the products id.
Since the Add to Cart button is in an Add to Cart form in the Product Display file how do I add a new button with a separate form?
Do I simply nest a form within the add to cart form?
I would also like to launch auctionit.php in a new window?
For info I run a dropshipping website so the button creates a fully formatted eBay ready listing with product information placed within a template and custom payment/shipping/contact text which I have modifed the Account area and used a new table to store.
Thanks,
Matt