Jump to content

[SOLVED] How to change input button


Recommended Posts

Hi everybody,

 

I just did some analysis to improve revenue and I need to do one easy change.

 

I need to change input button for "add to cart", maybe just with some css.

 

Look at my input button now:

 

http://onlinenabytok.sk/lacne-kuchyne/4786-kuchyna-bianca-240-s-vyklopom.html

 

You see that only clickable area is that with text "Do kosika". 

 

But many customers are trying to click at the orange-green button close to the text, and it is just an image, doing nothing. So as you may see, I need that the image with the text "do kosika" will be integrated. No change to appearance, just change in functionality. 

 

I will be happy for your help. 

 

Thank you a lot.

Link to comment
Share on other sites

Hi,

 

this is doind that when I click on the button, it gives me right away to the checkout page with product added in the basket... But I just need to add product to the card.

 

Thank you.

 

 

 

 

 

open product.tpl file and add this code:

onclick="buy_block.submit();"

to:

<span class="icon-addcart" ></span>

full code:

<span class="icon-addcart" onclick="buy_block.submit();"></span>
Link to comment
Share on other sites

You cant see couse I removed that code... 

 

Ajax is working you can see when you add product to the cart... But when I add your code, at the area of the basket image it works in the way I wrote you.. that when you click you go to the checkout page...

your add to cart button works the same

i think that you have to turn on "ajax cart" option, it's disabled?

Link to comment
Share on other sites

thank you :)

i've got solution

 

use this:

		$('.icon-addcart, #add_to_cart input').unbind('click').click(function(){
			ajaxCart.add( $('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null);
			return false;
		});

instead of:
 

		//for product page 'add' button...
		$('.#add_to_cart input').unbind('click').click(function(){
			ajaxCart.add( $('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null);
			return false;
		});

code above it's a part of /modules/blockcart/ajax-cart.js file

Link to comment
Share on other sites

thank you :)

i've got solution

 

use this:

		$('.icon-addcart, #add_to_cart input').unbind('click').click(function(){
			ajaxCart.add( $('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null);
			return false;
		});

instead of:

 

		//for product page 'add' button...
		$('.#add_to_cart input').unbind('click').click(function(){
			ajaxCart.add( $('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null);
			return false;
		});

code above it's a part of /modules/blockcart/ajax-cart.js file

 

Thanks a lot :)

 

It works... 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...