Jump to content



Latest News: (loading..)

kittycat01

Member Since 21 Aug 2009
OFFLINE Last Active Jun 17 2013 05:56 PM
-----

Posts I've Made

In Topic: Add to cart/buy now button

12 June 2013 - 09:06 AM

@Chris H Thanks you for getting back to me!

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!
Kitty :)

In Topic: Add to cart/buy now button

11 June 2013 - 06:35 PM

Hi Kellie!

It's not that I want the buy now button to look different, but the buy_now code doesn't seem to work on the site... I don't understand why :(
I'd just like the button I've created to add an item to the cart, and if the buy_now function works like that normally, I don't understand why I need extra script to make it happen?
I'm confused! D:

I've basically added some html to the checkout page, that includes a picture of the item I want to sell at checkout and a button - I just want the customer to be able to press this button then the item be added to the cart and then they can continue to checkout from the cart...

I'm very interested in learning how everything works on oscommerce, and I'm willing to implement things myself, I just need help in understanding exactly what it is that I'm doing!
Thanks for replying,
Kitty :)


View Postzefeena, on 11 June 2013 - 05:40 PM, said:

Hi,  maybe i'm being a little simple here, but if its just you want your button to look different then can you not just rename YOUR button pic the same as the default one, then overwrite it it with your own (or delete the file and re-upload yours with the same name. My button is here:
includes/languages/english/images/buttons/button_buy_now.gif  

In Topic: Add to cart/buy now button

11 June 2013 - 05:08 PM

Hi Jim!

Hmm, think I might be in a little over my head now! No idea how to define a product as you mentioned... I've been looking around other files to see how it might work, but I'm lost...

Thank you anyway, Kitty :)

In Topic: Add to cart/buy now button

10 June 2013 - 08:24 PM

Hello Jim!

Could you please show me what the php would look like so I can do this? Or is it very complicated?

Thanks in advance,
Kitty :)

In Topic: Super Simple Checkout Upsell Contrib?

06 June 2013 - 08:04 AM

Ahh OK :) Thank you for all your help, Kitty :)