Knowledge Base
User:
Password:
|
Article ID | : |
KB142 |
Keyword Name | : |
Buy Now |
Created | : |
December 06, 2011 |
Viewed | : |
9839 |
Buy Now Button adding sizes or colors
The code for the buy now buttons can be found in the Marketing Notions List, when you open a Marketing Notion there is Java Script (only needed once per page, no matter how many buttons are on the page) and HTML code. The HTML code is unique per item.
But if you want you can add many items to a single buy now button, with a little modification. Below is the standard code for item 15 in a database. That item 15 is a X-Large Tuxedo T-shirt - items 14,13 and 10 are the other sizes of the same product (also the sizes have different pricing.
<form name="cartbutton-15" onsubmit='javascript:addtocart(this);location.href=fullurl.value;return false'> <div>Tuxedo T-shirt X-Large</div> <span>QTY</span><input type="hidden" name="clientid" value="demononprofit" /> <input type="hidden" name="notionid" value="15" /> <input type="hidden" name="returnurl" value="http://www.ReplaceThisDomain.com/" /> <input type="hidden" name="confirmurl" value="http://www.ReplaceThisDomain.com/thankyou.htm" /> <input type="hidden" name="fullurl" /> <input name="qty" value="1" size="3" type="text" /> <input src="images/addtocart.png" type="image" alt="Add To Cart" name="_AddToCart" />
That item 15 is a X-Large Tuxedo T-shirt - items 14,13 and 10 are the other sizes of the same product (also the sizes have different pricing). Slight changes to add those items in (delete in red, add in blue):
<form name="cartbutton-15" onsubmit='javascript:addtocart(this);location.href=fullurl.value;return false'> <!-- <div>Tuxedo T-shirt X-Large </div> --> <div>Tuxedo T-shirt $20 each, X-Large $22 </div> <input type="hidden" name="clientid" value="demononprofit" /> <!--<input type="hidden" name="notionid" value="15" />--> <span>Size</span>
| | <select name="notionid">
| | <option value="10">Small</option>
| | <option value="13">Medium</option>
| | <option value="14">Large</option>
| | <option value="15">XL</option>
| | </select> | |
|
<span>Qty</span> <input type="hidden" name="returnurl" value="http://www.ReplaceThisDomain.com/" /> <input type="hidden" name="confirmurl" value="http://www.ReplaceThisDomain.com/thankyou.htm" /> <input type="hidden" name="fullurl" /> <input name="qty" value="1" size="3" type="text" /> <input src="images/addtocart.png" type="image" alt="Add To Cart" name="_AddToCart" />
All we really did was change a little text for the item description and removed the 'input' TAG that held the value for notionid replacing that with a 'select' TAG that holds variables for notionid values.
|