|
Pasting HTML into DotNetNuke?
DotNetNuke is an open source ASP.NET content management system and .NET web application development framework.
The DotNetNuke system does not allow you to paste HTML forms directly into their system. Because of this you must make minor edits to the shopping cart HTML before pasting the code into your DotNetNuke template.
A basic cart button would look like this:<form action="https://860218.2uaerguo.asia/cgi-bin/cart.cgi">
<input type="hidden" name="AddItem" value="jter|Test|4.95|1">
<input type="submit" alt="Add to cart" value="Add To Cart">
</form>
Here is an edited version for DotNetNuke:<div action="https://860218.2uaerguo.asia/cgi-bin/cart.cgi">
<input type="hidden" name="AddItem" value="jter|Test|4.95|1">
<input onclick="this.form.action='https://860218.2uaerguo.asia/cgi-bin/cart.cgi';this.form.submit();" type="submit" alt="Add to cart" value="Add To Cart">
</div>
Summary of edits:- DotNetNuke wraps the entire page in a large form. In order to avoid nesting forms you need to change the two form tags to be div tags.
- Now you need to add a small snip to your add to cart button so that DotNetNuke submits the data to our servers. Add the onclick="this.form.action='https://860218.2uaerguo.asia/cgi-bin/cart.cgi';this.form.submit();" attribute to the submit button.
Note: Because of how DotNetNuke works you can only use a single add to cart form per page. You can still use multiple buttons as long as the additional buttons use a link. |
|