Knowledgebase/Tips & Tricks

Using Custom Button Graphics for DPD Add-to-Cart, Buy Now, and Checkout buttons

Jason Chance
posted this on May 08, 2010 17:44

ll DPD buttons are plain HTML for maximum compatibility with every web page.

 

DPD buttons are comprised of the following parts:

All buttons contain the link to the DPD action, which is the <a> tag

All buttons contain the image tag which loads the button images, which is the <img> tag

View Cart / Checkout buttons also contain a javascript reference that makes the lightbox cart work on your site

 

An example of a DPD add to cart button:


<a href="http://getdpd.com/cart/add/1/3062?remote=1" class="dpdcart iframe"><img alt="Add to Cart" src="https://getdpd.com/images/buy_buttons/atc/dpd_addtocart_3.png" border="0"></a>

 

to change the image used in a button, you simply need to change the <img> tag's src value to your own button graphic's location on your own website. 

 

For example, if my button is located at "http://wwww.mysite.com/button.jpg" the same button code above would look like:

 

<a href="http://getdpd.com/cart/add/1/3062?remote=1" class="dpdcart iframe"><img alt="Add to Cart" src="http://wwww.mysite.com/button.jpg" border="0"></a>

 

That's all there is to it!

 

It is important that you never change the contents of the <a> tag (the link) or change the javascript reference included after view cart / checkout buttons- these are the required part of the button that makes DPD work!