OK, I know I must be trying everyone's patience right now - I added the button where you suggested, and it seemed to refresh the cart yet not add anything to it (I changed the id to the product id I want to sell).
I actually want the button on the checkout_payment page, so I put it there also, and this just sends me to the checkout_confirmation page when I click it, without adding the extra item to the cart? D: I am using v2.3.1 - I wonder if this is something to do with it not working?
@kymation Thank you also for getting back to me!
Thank you for explaining the process to me further, I've been using Oscommerce for a long time, and I basically do what proper coders would hate, in that I look at code on other pages and twiddle with it until I get it to do what I want it to ... but I can't write this stuff from scratch, because I don't quite understand what it all means, I don't understand the structure of PHP.
With the tep_href_link code and the product_id code - how do I "attach" this to a button? I've tried looking at the product_info page to see how it might all fit together but I just can't figure it out.
Is it to do with CSS - like the button is created using CSS?
For example, this is what the code for the add to cart button looks like on the product_info page:
<div> <?php echo '<span style="font-size:14px; color:#141414; margin-right:5px;">'.TEXT_QTY.'</span>'.tep_draw_input_field('products_quantity', '1', 'size=2 style="border:1px solid #ccc; padding: 3px 5px;"'); ?> <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']); ?> <div style="margin-top:10px; margin-bottom:50px"><input type="submit" class="orangebutton" value="Add to basket"></div> </div>
With my meagre brain, I can see this code says add a box to put item quantity in, explains the colours/design used, then it is asking the php to look for the products id, I think, judging by the code @Chris H gave me, it then creates a button that says "add to basket" on it. The class bit "orangebutton" will access the CSS to "design" the look of the button. The input type bit - "submit" - I don't understand how that is defined, does it look to the CSS or another external file to determine what "submit" is?
Can you see how I try and figure everything out now?! Daft, I know!!!
If everyone has had enough of trying to explain this to me, don't worry.
Thank you again everyone for your time and patience!