martin.grencik Posted January 23, 2014 Share Posted January 23, 2014 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 More sharing options...
vekia Posted January 23, 2014 Share Posted January 23, 2014 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 More sharing options...
martin.grencik Posted January 24, 2014 Author Share Posted January 24, 2014 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 More sharing options...
vekia Posted January 24, 2014 Share Posted January 24, 2014 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 More sharing options...
martin.grencik Posted January 24, 2014 Author Share Posted January 24, 2014 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 More sharing options...
vekia Posted January 24, 2014 Share Posted January 24, 2014 ohh dear you've got right, my bad. unfortunately, your ajax-cart.js file is minified with other files, so i can't check sources can you temporary disable CCC for js files? Link to comment Share on other sites More sharing options...
martin.grencik Posted January 25, 2014 Author Share Posted January 25, 2014 I disabled ccc for JS, so you can check it now. Thank you Vekia Link to comment Share on other sites More sharing options...
vekia Posted January 26, 2014 Share Posted January 26, 2014 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 More sharing options...
martin.grencik Posted January 27, 2014 Author Share Posted January 27, 2014 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 More sharing options...
vekia Posted January 27, 2014 Share Posted January 27, 2014 glad to hear it i marked whole topic as [solved] with regards, MIlos Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now