电子商务/费用盒标签不合适

时间:2014-01-29 19:11:55

标签: jquery html bigcommerce

我无法弄清楚为什么这不适用于我的网站。这应该创建一个包含文本和费用信息的框。这些费用来自定制产品领域。由于某种原因,缺少选项卡,并且选项卡内容位于页面底部。怪异。

以下是我商店的链接:http://inflatableboats.net/ab-alumina-alx-15-alx-with-yamaha-f50lb-four-stroke/

这是盒子的css:

#shippingInfo {margin: 20px auto 20px;padding: 10px;border: 1px dashed #ccc;background: #eee;}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/">
%%Panel.HTMLHead%%
<body>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <div id="Container">
    %%Panel.Header%%

    <div id="Wrapper">
        %%Panel.WrapperBanner%%
        <div class="Left" id="LayoutColumn1">
            %%Panel.SideCategoryList%%
            %%Panel.SideNewProducts%%
            %%Panel.SideNewsletterBox%%
            %%Panel.SideLiveChatServices%%
        </div>
        <div class="Content" id="LayoutColumn2">
            %%Panel.ProductBreadcrumb%%
            %%Panel.ProductDetails%%
            %%Panel.ProductTabs%%
            %%Panel.ProductDescription%%
            %%Panel.ProductVideos%%
            %%Panel.ProductWarranty%%
            %%Panel.ProductOtherDetails%%
            %%Panel.SimilarProductsByTag%%
            %%Panel.ProductByCategory%%
            %%Panel.ProductVendorsOtherProducts%%
            %%Panel.SimilarProductsByCustomerViews%%
        </div>
        <div class="Right" id="LayoutColumn3">
            %%Panel.SideCurrencySelector%%
            %%Panel.SideProductAddToWishList%%
            %%Panel.SideProductRelated%%
            %%Panel.SideProductRecentlyViewed%%
        </div>
        <br class="Clear" />
    </div>
    %%Panel.Footer%%
</div>
<!-- productotherdetailsinformation -->

    <script>
        $(document).ready(function(){
            var otherDetails = $('#ProductTabs #ProductOtherDetails_Tab');
            if ( otherDetails .length){
                $('#ProductOtherDetails .ProductDetailsGrid .DetailRow').each(function() {
                  var shipsTruck = $('#ProductOtherDetails .ProductDetailsGrid .Value').html();
                  if ("shipsTruck:contains('truck')") {
                      var checkEstimate = 'true';
                    $('.productAddToCartRight').append('<p style="margin-left:140px;"><strong><em>This product ships by truck only. <a href="#shippingInfo">See shipping notes</a> below for more information.</em></strong></p>');
                    $('.ProductDescription, .ProductOtherDetails').append('<div id="shippingInfo">' <p><strong>NOTE:</strong>THIS PRODUCT CANNOT SHIP STANDARD GROUND. It must be shipped via a boat hauler, hand delivered by company personnel, or through a professional freight company and requires special handling and prepping to ship. Please e-mail <a href="mailto:ibs@inflatableboats.net">ibs@inflatableboats.net</a> for a valid shipping and handling cost estimate.</p>
    <p><strong>PLEASE NOTE:</strong></p>
    <p>The price displayed above is the base selling price for the boat and Motor ONLY.</p>
    <p class="pdifee"><strong>PDI (Dealer Prep and Testing) includes the following: Validates all warranties, fill fluids in outboard, complete system check, install AGM Marine battery, electrical check, test run, sea trial:</strong></p>
    <p class="dffee"><strong>Destination Fee (Freight in to Inflatable Boat Specialists Warehouse): </strong></p></div>');
                    return false;
                  }
                });
 for(var index = 0; index < $('#ProductOtherDetails .ProductDetailsGrid .DetailRow').length; index++){
                    var thisOther = $('#ProductOtherDetails .ProductDetailsGrid .DetailRow .Label').eq(index).html();                    
                    if (thisOther == 'PDI') {
                        var estimateCost = $('#ProductOtherDetails .ProductDetailsGrid .DetailRow .Value').eq(index).html();
                        if (estimateCost) {
                            $('.pdifee').append(estimateCost);
                        } else {
                            $('.pdifee').append('call');
                        }
                    }
                }
for(var index = 0; index < $('#ProductOtherDetails .ProductDetailsGrid .DetailRow').length; index++){
                    var thisOther = $('#ProductOtherDetails .ProductDetailsGrid .DetailRow .Label').eq(index).html();                    
                    if (thisOther == 'DF') {
                        var estimateCost = $('#ProductOtherDetails .ProductDetailsGrid .DetailRow .Value').eq(index).html();
                        if (estimateCost) {
                            $('.dffee').append(estimateCost);
                        } else {
                            $('.dffee').append('call');
                        }
                        return false;
                    }
                }

            }


        });
</script>

</body>
</html>

1 个答案:

答案 0 :(得分:2)

我看到的第一个明显的事情是你试图通过脚本标记而不是实际的JS文件来包含文件夹。

<script type="text/javascript" src="http://inflatableboats.net/js/"></script>

此外,根据您粘贴的代码,处理以下行时会出错:

if ( otherDetails .length){

应该是:

if ( otherDetails.length){

希望这有帮助!