Skip to content

Commit 8c8d55f

Browse files
committed
* Html to Pdf converter (5)
* Fixes smartstore#577
1 parent 13dbd5d commit 8c8d55f

16 files changed

Lines changed: 420 additions & 203 deletions

File tree

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
* #538 Spcification attribute labels in product filter mask are not displayed localized
3232
* #540 AmazonPay: Multistore configuration might be lost if "All stores" are left empty
3333
* #532 AmazonPay: Reflect refunds made at amazon seller central when using data polling
34+
* #577 Exception thrown because of missing TaxRate table when opening tax by region provider configuration
3435
* Added IIS rewrite rule for `/productreviews/{id}` > `/product/reviews/{id}`
3536
* Email a friend redirects to "not found"
3637
* #567 Products marked as 'Featured' should also be included in regular lists

src/Libraries/SmartStore.Data/Setup/MigrateDatabaseInitializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public virtual void InitializeDatabase(TContext context)
8989
// prior integrating EF Migrations.
9090
// Running the Migrator with initial DDL would crash in this case as
9191
// the db objects exist already. Therefore we set a suppression flag
92-
// which we read in the corresposnding InitialMigration to exit early.
92+
// which we read in the corresponding InitialMigration to exit early.
9393
DbMigrationContext.Current.SetSuppressInitialCreate<TContext>(true);
9494
}
9595
}

src/Plugins/SmartStore.Tax/Data/Migrations/201403112350417_Initial.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Plugins/SmartStore.Tax/SmartStore.Tax.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
</PropertyGroup>
6565
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'EFMigrations|AnyCPU'">
6666
<DebugSymbols>true</DebugSymbols>
67-
<OutputPath>bin\EFMigrations\</OutputPath>
67+
<OutputPath>..\..\Presentation\SmartStore.Web\bin\</OutputPath>
6868
<DefineConstants>DEBUG;TRACE</DefineConstants>
6969
<DebugType>full</DebugType>
7070
<PlatformTarget>AnyCPU</PlatformTarget>

src/Plugins/SmartStore.Tax/web.config

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- We use this file to make razor intellisense work in the class library -->
33
<configuration>
4-
<configSections>
5-
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
6-
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
7-
</configSections>
84
<appSettings>
95
<add key="webpages:Version" value="3.0.0.0" />
106
<add key="webpages:Enabled" value="false" />
@@ -118,10 +114,4 @@
118114
</dependentAssembly>
119115
</assemblyBinding>
120116
</runtime>
121-
<entityFramework>
122-
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
123-
<providers>
124-
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
125-
</providers>
126-
</entityFramework>
127117
</configuration>

src/Presentation/SmartStore.Web.Framework/Controllers/AdminThemedAttribute.cs

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Web.Mvc;
6-
using System.Threading.Tasks;
7-
using System.Web;
1+
using System.Web.Mvc;
82

93
namespace SmartStore.Web.Framework.Controllers
104
{
@@ -22,31 +16,17 @@ namespace SmartStore.Web.Framework.Controllers
2216
public class AdminThemedAttribute : ActionFilterAttribute
2317
{
2418

25-
public override void OnActionExecuted(ActionExecutedContext filterContext)
19+
public override void OnActionExecuting(ActionExecutingContext filterContext)
2620
{
2721
if (filterContext == null)
2822
return;
2923

3024
// add extra view location formats to all view results (even the partial ones)
31-
var viewResultBase = filterContext.Result as ViewResultBase;
32-
if (viewResultBase != null)
25+
filterContext.RouteData.DataTokens["ExtraAreaViewLocations"] = new string[]
3326
{
34-
filterContext.RouteData.DataTokens["ExtraAreaViewLocations"] = new string[]
35-
{
36-
"~/Administration/Views/{1}/{0}.cshtml",
37-
"~/Administration/Views/Shared/{0}.cshtml"
38-
};
39-
}
40-
41-
//// set MasterName (aka Layout) to view results if not explicitly specified
42-
//if (!filterContext.IsChildAction)
43-
//{
44-
// var viewResult = filterContext.Result as ViewResult;
45-
// if (viewResult != null && viewResult.MasterName.IsEmpty())
46-
// {
47-
// viewResult.MasterName = "_AdminLayout";
48-
// }
49-
//}
27+
"~/Administration/Views/{1}/{0}.cshtml",
28+
"~/Administration/Views/Shared/{0}.cshtml"
29+
};
5030
}
5131

5232
}

src/Presentation/SmartStore.Web/Administration/Controllers/ProductController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,7 @@ public ActionResult Create(ProductModel model, bool continueEditing, FormCollect
10011001
product.AllowCustomerReviews = true;
10021002
product.Published = true;
10031003
product.VisibleIndividually = true;
1004+
product.MaximumCustomerEnteredPrice = 1000;
10041005

10051006
if (product.ProductType == ProductType.BundledProduct)
10061007
{

src/Presentation/SmartStore.Web/Administration/Views/Product/_CreateOrUpdate.Info.cshtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
$("#@Html.FieldIdFor(model => model.ProductTypeId)").change(toggleProductType);
1919
$("#@Html.FieldIdFor(model => model.RequireOtherProducts)").click(toggleRequireOtherProducts);
2020
$("#@Html.FieldIdFor(model => model.IsGiftCard)").click(toggleGiftCard);
21-
$("#@Html.FieldIdFor(model => model.CustomerEntersPrice)").click(toggleCustomerEntersPrice);
2221
$("#@Html.FieldIdFor(model => model.IsDownload)").click(toggleDownloadableProduct);
2322
$("#@Html.FieldIdFor(model => model.UnlimitedDownloads)").click(toggleDownloadableProduct);
2423
$("#@Html.FieldIdFor(model => model.HasSampleDownload)").click(toggleDownloadableProduct);
@@ -30,7 +29,6 @@
3029
toggleProductType();
3130
toggleRequireOtherProducts();
3231
toggleGiftCard();
33-
toggleCustomerEntersPrice();
3432
toggleDownloadableProduct();
3533
toggleRecurring();
3634
toggleShipping();

src/Presentation/SmartStore.Web/Administration/Views/Product/_CreateOrUpdate.Price.cshtml

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
var fieldBasePriceBaseAmount;
99
1010
$(function () {
11+
$("#@Html.FieldIdFor(model => model.CustomerEntersPrice)").click(toggleCustomerEntersPrice);
1112
$("#@Html.FieldIdFor(model => model.BasePriceEnabled)").click(toggleBasePrice);
1213
1314
fieldBasePriceMeasureUnit = $("#@Html.FieldIdFor(model => model.BasePriceMeasureUnit)");
@@ -19,6 +20,7 @@
1920
fieldBasePriceAmount.on("blur", getCurrentBasePrice);
2021
fieldBasePriceBaseAmount.on("blur", getCurrentBasePrice);
2122
23+
toggleCustomerEntersPrice();
2224
getCurrentBasePrice();
2325
toggleBasePrice();
2426
@@ -34,27 +36,39 @@
3436
"basePriceAmount": fieldBasePriceAmount.val(),
3537
"basePriceBaseAmount": fieldBasePriceBaseAmount.val()
3638
},
37-
success: function (data) {
38-
$("#BasePriceAmountInfo").html(data.BasePrice);
39-
},
40-
error: function (xhr, ajaxOptions, thrownError){
41-
alert(thrownError);
42-
}
43-
});
39+
success: function (data) {
40+
$("#BasePriceAmountInfo").html(data.BasePrice);
41+
},
42+
error: function (xhr, ajaxOptions, thrownError){
43+
alert(thrownError);
44+
}
45+
});
46+
}
47+
return false;
4448
}
45-
return false;
46-
}
4749
48-
function toggleBasePrice() {
49-
if ($('#@Html.FieldIdFor(model => model.BasePriceEnabled)').is(':checked')) {
50-
$('#pnlBasePriceBaseAmount').show();
51-
$('#pnlBasePriceAmount').show();
50+
function toggleBasePrice() {
51+
if ($('#@Html.FieldIdFor(model => model.BasePriceEnabled)').is(':checked')) {
52+
$('#pnlBasePriceBaseAmount').show();
53+
$('#pnlBasePriceAmount').show();
54+
}
55+
else {
56+
$('#pnlBasePriceBaseAmount').hide();
57+
$('#pnlBasePriceAmount').hide();
58+
}
5259
}
53-
else {
54-
$('#pnlBasePriceBaseAmount').hide();
55-
$('#pnlBasePriceAmount').hide();
60+
61+
function toggleCustomerEntersPrice() {
62+
var src = $('#@Html.FieldIdFor(model => model.CustomerEntersPrice)');
63+
if (src.is(':checked')) {
64+
$('#pnlMinimumCustomerEnteredPrice').show();
65+
$('#pnlMaximumCustomerEnteredPrice').show();
66+
}
67+
else {
68+
$('#pnlMinimumCustomerEnteredPrice').hide();
69+
$('#pnlMaximumCustomerEnteredPrice').hide();
70+
}
5671
}
57-
}
5872
})
5973
</script>
6074

0 commit comments

Comments
 (0)