
07-09-2013, 11:45 AM
|
 |
Ecwid Team
|
|
Join Date: Feb 2010
Location: Ecwid headquarter
Posts: 5,876
|
|
Quote:
Originally Posted by elpiano1
Hello,
I would like to insert a custom text with a link and a logo just above the button "place order" on place order screen.
I assume I need to insert a HTML code to do all that (or Javascript one) Could you let me know, how I can achieve my objective?
Thank you!
MJ
|
Hello MJ,
Yes, it is totally possible using simple Javascript code:
Code:
<script type="text/javascript">
Ecwid.OnPageLoaded.add(function(page){
if (page.type == "CHECKOUT_PLACE_ORDER") {
custom_elements = jQuery("<a href='http://link_to_the_site'>Sample link</a><br /><img src='http://example.com/simple-image,jpg' />")
jQuery(custom_elements).insertBefore('div.ecwid-Checkout-placeOrderButton');
}
})
</script>
You will need to place the HTML code that should be shown above "Place order" button inside custom_elements variable. This code should be placed to the source of the page, where Ecwid store is installed.
Please, note that this script requires jQuery library installed on your site for correctly. If you have not installed it yet, you should just paste following script before </head> tag on your site:
Code:
<script src='https://ajax.googleapis.com/ajax/libs/jquery/2.0.1/jquery.min.js'></script>
__________________
Maya N., Ecwid Team
------------------
Welcome to our new Help Center!
|