Enough of you have asked for this sort of a modification to where I had to address it personally. Changing the AddToCart button to be the image you wish it to be is indeed possible within the XMLPackage without altering the method AddToCartForm, or having the source code. While many CSS stylesheet "mods" have been discussed on the forums, they all incorporate the background image property of the button itself. This doesn't help you if you want a non-rectuangular button, or your button to be fully predictable across multiple browser platforms. This is an example of using the XMLPackage technology offered by ASPDNSF to customize your site the way you would like.
Open your products.VariantsInRightBar.xml.config file and navigate down the code to approximately line 460 or so. You're looking for
The above code is the XSLT where AddtoCartForm method in the source code returns HTML that includes the pricing data, the "add to cart" and "add to wish list" buttons, the quantity field, and the validator and method calls for the onClick events. All the code is there in the return of the above line.Code:<xsl:value-of select="aspdnsf:AddtoCartForm(ProductID, VariantID, 1)" disable-output-escaping="yes"/>
Now what you want to do is comment that out, NEVER DELETE, and right below it we're going to add in this
Afterwards, change the "MYIMAGEURL" part with the relative path to your desired image file for the button.Code:<xsl:variable name="returnhtml" select="aspdnsf:AddtoCartForm(ProductID, VariantID, 1)" /> <xsl:variable name="buttonlocation" select="'input type="button" class="AddToCartButton"'"/> <xsl:variable name="imageHTMLSnippet" select="'img src="MYIMAGEURL"'"/> <xsl:value-of select="concat(substring-before($returnhtml, $buttonlocation), $imageHTMLSnippet, substring-after($returnhtml, $buttonlocation))" disable-output-escaping="yes"/>
What we're doing is loading up an XSLT variable "returnhtml" with the HTML from the method. We're declaring another variable to find the location of the "AddToCart" input tag, and loading yet a third variable with our replacement for that tag. Our replacement happens to be an <img> tag which will preserve all of the methods and properties of the button while allowing us to use customized images. The fourth and final line of XSLT does minor string manipulation to alter the HTML with our new tag as opposed to the tag we are looking to replace. Using this method, one can see how it is possible to use your XMLPackage to form the data from your application in any way you'd like, up to and including changing out a button for a picture. Since it is an XMLPackage you don't need the source code, and since it can be a complete overhaul of the return html you are capable of adding any valid HTML to the return. This method can be used to modify your storefront's appearance in almost any way you can imagine.