コード例 #1
0
        public override string Name()
        {
            var objCtrl = new NBrightBuyController();
            var info    = objCtrl.GetPluginSinglePageData("OS_AllShipping", "SHIPPING", Utils.GetCurrentCulture());
            //var rtn = info.GetXmlProperty("genxml/lang/genxml/textbox/name");
            //if (rtn == "") rtn = info.GetXmlProperty("genxml/textbox/name");
            //if (rtn == "") rtn = "OS_AllShipping";


            var shippingName = string.Empty;;

            if (Merchant.IsEnable && Merchant.Type == "B")
            {
                shippingName = $"宅配( {NBrightBuyUtils.FormatToStoreCurrency(Merchant.HomeCost)} )";
            }

            return(shippingName);
        }
コード例 #2
0
 public override string Name() => $"7-11取貨( {NBrightBuyUtils.FormatToStoreCurrency(Merchant.UniMartCost)} )";
コード例 #3
0
 public override string Name() => $"全家取貨( {NBrightBuyUtils.FormatToStoreCurrency(Merchant.FamiCost)} )";
コード例 #4
0
        public IEncodedString CurrencyOf(Double x)
        {
            var strOut = NBrightBuyUtils.FormatToStoreCurrency(x);

            return(new RawString(strOut));
        }
コード例 #5
0
        public IEncodedString ProductOption(ProductData productdata, int index, String attributes = "", Boolean required = false)
        {
            var strOut = "";

            var objL = productdata.Options;

            if (objL.Count > index)
            {
                var obj        = objL[index];
                var optid      = obj.GetXmlProperty("genxml/hidden/optionid");
                var optvalList = productdata.GetOptionValuesById(optid);

                strOut += "<div  class='option option" + (index + 1) + "' " + attributes + ">";
                strOut += "<span class='optionname optionname" + (index + 1) + "'>" + obj.GetXmlProperty("genxml/lang/genxml/textbox/txtoptiondesc") + "</span>";
                strOut += "<span class='optionvalue optionvalue" + (index + 1) + "'>";

                if (optvalList.Count > 1)
                {
                    //dropdown
                    strOut += "<select id='optionddl" + (index + 1) + "' update='save'>";
                    foreach (var optval in optvalList)
                    {
                        var addcost          = optval.GetXmlPropertyDouble("genxml/textbox/txtaddedcost");
                        var addedcostdisplay = "";
                        if (addcost > 0)
                        {
                            addedcostdisplay = "    (+" + NBrightBuyUtils.FormatToStoreCurrency(addcost) + ")";
                        }


                        strOut += "    <option value='" + optval.GetXmlProperty("genxml/hidden/optionvalueid") + "'>" + optval.GetXmlProperty("genxml/lang/genxml/textbox/txtoptionvaluedesc") + addedcostdisplay + "</option>";
                    }
                    strOut += "</select>";
                }
                if (optvalList.Count == 1)
                {
                    //checkbox
                    foreach (var optval in optvalList)
                    {
                        var addcost          = optval.GetXmlPropertyDouble("genxml/textbox/txtaddedcost");
                        var addedcostdisplay = "";
                        if (addcost > 0)
                        {
                            addedcostdisplay = "    (+" + NBrightBuyUtils.FormatToStoreCurrency(addcost) + ")";
                        }

                        strOut += "    <input id='optionchk" + (index + 1) + "' type='checkbox' " + attributes + " update='save' /><label>" + optval.GetXmlProperty("genxml/lang/genxml/textbox/txtoptionvaluedesc") + addedcostdisplay + "</label>";
                    }
                }
                if (optvalList.Count == 0)
                {
                    // textbox
                    var requiredattr = "";
                    if (required)
                    {
                        requiredattr = " required='' name='optiontxt" + (index + 1) + "'";           // name also needs to be added for JQuery Validation to work correctly
                    }
                    strOut += "<input id='optiontxt" + (index + 1) + "' " + requiredattr + " update='save' type='text' />";
                }
                strOut += "<input id='optionid" + (index + 1) + "' update='save' type='hidden' value='" + optid + "' />";
                strOut += "</span>";
                strOut += "</div>";
            }


            return(new RawString(strOut));
        }
コード例 #6
0
 public override string Name() => $"萊爾富取貨( {NBrightBuyUtils.FormatToStoreCurrency(Merchant.HiLifeCost)} )";