Tasker, on Nov 2 2005, 05:08 PM, said:
This is just a small modification to place an extra "Add to cart" button under the product image.
Open catalog/product_info.php
Find :
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
Add After:
<TR><td align="center" class="main"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
That's it, I came up with this after not finding a way on the web, or anywhere else, hope it is of use and
I've coded it correctly. Just backup and try.

How do I make a link to add a product to the shopping cart, bypassing the description page?
I only have one product for sale. My main page has a picture of that product, with no link. I want a buynow button that adds my product to the cart and pulls the cart page.
I tryed linking the picture with the following but I don't think its the right way and it goes to the description page instead of the shopping cart page. I want shopping cart page with product already added.
<META HTTP-EQUIV="Refresh"
CONTENT="0; URL=http://localhost/catalog/product_info.php?products_id=3?osCsid=">
I think the above screws up the osCid if someone is signed in
Also take me to the product info page.... and that's not what I want.
I want it to go to the page just past that one. The one with the product in the shopping cart on the cart/checkout page.
any sugestions?