Skip to content

Commit d7868f9

Browse files
committed
Added 4 new widget zones to backend: admin_menu_exportcatalog_top, admin_menu_exportcatalog_bottom, admin_menu_exportorders_top, admin_menu_exportorders_bottom. This way you can 'hook in' your custom catalog/order exporter.
1 parent a35977b commit d7868f9

3 files changed

Lines changed: 13 additions & 10 deletions

File tree

src/Presentation/SmartStore.Web/Administration/Views/Order/List.cshtml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<span class="fa fa-caret-down"></span>
2424
</a>
2525
<ul class="dropdown-menu">
26+
@Html.Widget("admin_menu_exportorders_top")
2627
<li>
2728
<a href="@Url.Action("ExportXmlAll")">
2829
<i class="fa fa-fw fa-code"></i>
@@ -60,6 +61,7 @@
6061
@T("Admin.Common.ExportToPdf.Selected")
6162
</a>
6263
</li>
64+
@Html.Widget("admin_menu_exportorders_bottom")
6365
</ul>
6466
</div>
6567
</div>

src/Presentation/SmartStore.Web/Administration/Views/Product/List.cshtml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
<span class="fa fa-caret-down"></span>
3131
</a>
3232
<ul class="dropdown-menu export-catalog">
33-
<li>
33+
@Html.Widget("admin_menu_exportcatalog_top")
34+
<li>
3435
<a href="@Url.Action("ExportXmlAll")">
3536
<i class="fa fa-fw fa-code"></i>
3637
@T("Admin.Common.ExportToXml.All")
@@ -77,6 +78,7 @@
7778
</a>
7879
</li>
7980
}
81+
@Html.Widget("admin_menu_exportcatalog_bottom")
8082
</ul>
8183
</div>
8284

@@ -248,7 +250,7 @@
248250
e.preventDefault();
249251
var form = $('#ProductExportForm');
250252
form.find('[name=selectedIds]').val(selectedIds.join(','));
251-
form.attr('action', $(this).attr('data-url'));
253+
form.attr('action', $(this).data('url'));
252254
form.submit();
253255
return false;
254256
});

src/Presentation/SmartStore.Web/Controllers/CatalogController.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ public ActionResult Search(SearchModel model, SearchPagingFilteringModel command
10551055
if (model == null)
10561056
model = new SearchModel();
10571057

1058-
//'Continue shopping' URL
1058+
// 'Continue shopping' URL
10591059
_genericAttributeService.SaveAttribute(_services.WorkContext.CurrentCustomer,
10601060
SystemCustomerAttributeNames.LastContinueShoppingPage,
10611061
_services.WebHelper.GetThisPageUrl(false),
@@ -1079,7 +1079,7 @@ public ActionResult Search(SearchModel model, SearchPagingFilteringModel command
10791079

10801080
// Build AvailableCategories
10811081
// first empty entry
1082-
model.AvailableCategories.Add(new SelectListItem()
1082+
model.AvailableCategories.Add(new SelectListItem
10831083
{
10841084
Value = "0",
10851085
Text = T("Common.All")
@@ -1095,7 +1095,7 @@ public ActionResult Search(SearchModel model, SearchPagingFilteringModel command
10951095
int id = node.Value.EntityId;
10961096
var breadcrumb = node.GetBreadcrumb().Select(x => x.Text).ToArray();
10971097

1098-
model.AvailableCategories.Add(new SelectListItem()
1098+
model.AvailableCategories.Add(new SelectListItem
10991099
{
11001100
Value = id.ToString(),
11011101
Text = String.Join(" > ", breadcrumb),
@@ -1137,29 +1137,28 @@ public ActionResult Search(SearchModel model, SearchPagingFilteringModel command
11371137
bool searchInDescriptions = false;
11381138
if (model.As)
11391139
{
1140-
//advanced search
1140+
// advanced search
11411141
var categoryId = model.Cid;
11421142
if (categoryId > 0)
11431143
{
11441144
categoryIds.Add(categoryId);
11451145
if (model.Isc)
11461146
{
1147-
//include subcategories
1147+
// include subcategories
11481148
categoryIds.AddRange(_helper.GetChildCategoryIds(categoryId));
11491149
}
11501150
}
11511151

1152-
11531152
manufacturerId = model.Mid;
11541153

1155-
//min price
1154+
// min price
11561155
if (!string.IsNullOrEmpty(model.Pf))
11571156
{
11581157
decimal minPrice = decimal.Zero;
11591158
if (decimal.TryParse(model.Pf, out minPrice))
11601159
minPriceConverted = _currencyService.ConvertToPrimaryStoreCurrency(minPrice, _services.WorkContext.WorkingCurrency);
11611160
}
1162-
//max price
1161+
// max price
11631162
if (!string.IsNullOrEmpty(model.Pt))
11641163
{
11651164
decimal maxPrice = decimal.Zero;

0 commit comments

Comments
 (0)