• Welcome to KonaKart Community Forum. Please login or sign up.
 

JSP/HTML Error fix for EditCartBody.jsp

Started by pyr0t3chnician, January 30, 2012, 05:51:57 pm

Previous topic - Next topic

pyr0t3chnician

Around line 75 is the cart logic for checking an empty shopping cart in the EditCartBody.jsp file:


<div class="body-content-div">
    <logic:empty  property="itemList" name="EditCartForm">
        <div class="msg-box"><bean:message key="edit.cart.body.emptycart"/></div>
    </logic:empty>
    <logic:notEmpty property="itemList" name="EditCartForm">
        //Everything else happens here
        </div>
    </logic:notEmpty>
</html:form>


The nesting is incorrect, so if your cart is empty, you will be missing your closing tag for the 'body-content-div'.
The two fixes for this are adding a closing </div> tag to the <logic:empty> section:

<div class="body-content-div">
    <logic:empty  property="itemList" name="EditCartForm">
        <div class="msg-box"><bean:message key="edit.cart.body.emptycart"/></div>
    </div>
    </logic:empty>
    <logic:notEmpty property="itemList" name="EditCartForm">
        //Everything else happens here
        </div>
    </logic:notEmpty>
</html:form>

OR taking the last </div> in the <logic:notEmpty> tag and putting it just outside the tag:

<div class="body-content-div">
    <logic:empty  property="itemList" name="EditCartForm">
        <div class="msg-box"><bean:message key="edit.cart.body.emptycart"/></div>
    </div>
    </logic:empty>
    <logic:notEmpty property="itemList" name="EditCartForm">
        //Everything else happens here
    </logic:notEmpty>
    </div>
</html:form>


That should help fix any layout issues you may be having with this page.