Improvement: Quantity and Add to Cart button showing twice on Compare Products page
Thanks, Ritesh Kumar and Dikpal Kanungo for your contribution.
@@ -46,45 +46,6 @@ under the License.
<#if "Y" = product.isVirtual!> ${uiLabelMap.CommonFrom} </#if><span class="${priceStyle}"><@ofbizCurrency amount=price.price isoCode=price.currencyUsed/></span>
</#if>
</#if>
- <div class="productbuy">
- <#-- check to see if introductionDate hasn't passed yet -->
- <#if product.introductionDate?? && nowTimestamp.before(product.introductionDate)>
- <div style="color: red;">${uiLabelMap.ProductNotYetAvailable}</div>
- <#-- check to see if salesDiscontinuationDate has passed -->
- <#elseif product.salesDiscontinuationDate?? && nowTimestamp.after(product.salesDiscontinuationDate)/>
- <div style="color: red;">${uiLabelMap.ProductNoLongerAvailable}</div>
- <#-- check to see if it is a rental item; will enter parameters on the detail screen-->
- <#elseif "ASSET_USAGE" == product.productTypeId!/>
- <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderMakeBooking}...</a>
- <#elseif "ASSET_USAGE_OUT_IN" == product.productTypeId!/>
- <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderRent}...</a>
- <#-- check to see if it is an aggregated or configurable product; will enter parameters on the detail screen-->
- <#elseif "AGGREGATED" == product.productTypeId! || "AGGREGATED_SERVICE" == product.productTypeId!/>
- <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderConfigure}...</a>
- <#-- check to see if the product is a virtual product -->
- <#elseif product.isVirtual?? && "Y" == product.isVirtual/>
- <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderChooseVariations}...</a>
- <#-- check to see if the product requires an amount -->
- <#elseif product.requireAmount?? && "Y" == product.requireAmount/>
- <a href="javascript:doGetViaParent('${productUrl}');" class="buttontext">${uiLabelMap.OrderChooseAmount}...</a>
- <#else>
- <form method="post" action="<@ofbizUrl secure="${request.isSecure()?string}">additem</@ofbizUrl>" name="compareFormAdd${product_index}">
- <input type="hidden" name="add_product_id" value="${product.productId}"/>
- <input type="text" size="5" name="quantity" value="1"/>
- <input type="hidden" name="clearSearch" value="N"/>
- </form>
- <a href="javascript:doPostViaParent('compareFormAdd${product_index}');" class="buttontext">${uiLabelMap.OrderAddToCart}</a>
-
- <#if prodCatMem?? && prodCatMem.quantity?? && 0.00 < prodCatMem.quantity?double>
- <form method="post" action="<@ofbizUrl secure="${request.isSecure()?string}">additem</@ofbizUrl>" name="compareFormAddDefault${product_index}" style="margin: 0;">
- <input type="hidden" name="add_product_id" value="${prodCatMem.productId!}"/>
- <input type="hidden" name="quantity" value="${prodCatMem.quantity!}"/>
- <input type="hidden" name="clearSearch" value="N"/>
- </form>
- <a href="javascript:doPostViaParent('compareFormAddDefault${product_index}');" class="buttontext">${uiLabelMap.CommonAddDefault}(${prodCatMem.quantity?string.number}) ${uiLabelMap.OrderToCart}</a>
- </#if>
- </#if>
- </div>
</td>
</#list>
</tr>
