Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Print feature missing products #3

KrzysztofPajak5ef221175c31
diff --git a/src/Web/Grand.Web/Views/Order/Details.cshtml b/src/Web/Grand.Web/Views/Order/Details.cshtml
index 528a09eb5..17b44ae08 100644
--- a/src/Web/Grand.Web/Views/Order/Details.cshtml
+++ b/src/Web/Grand.Web/Views/Order/Details.cshtml
@@ -17,8 +17,10 @@
}
@if (Model.PrintMode)
{
- <script asp-location="Footer">
- window.print();
+ <script>
+ document.addEventListener("DOMContentLoaded", function () {
+ window.print();
+ });
</script>
}
<div class="page order-details-page mb-3">
diff --git a/src/Web/Grand.Web/Views/Shared/_Print.cshtml b/src/Web/Grand.Web/Views/Shared/_Print.cshtml
index 33cd3b011..e0653fb24 100644
--- a/src/Web/Grand.Web/Views/Shared/_Print.cshtml
+++ b/src/Web/Grand.Web/Views/Shared/_Print.cshtml
@@ -2,10 +2,20 @@
<html>
<head>
<title asp-default-title="true"></title>
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<link href="/theme/css/print.css" rel="stylesheet" type="text/css">
+ <link rel="stylesheet" type="text/css" href="/theme/bootstrap-vue/bootstrap.min.css">
+ <link rel="stylesheet" type="text/css" href="/theme/bootstrap-vue/bootstrap-vue.min.css">
+ <script src="/theme/lib/vue.min.js"></script>
+ <script src="/theme/lib/bootstrap-vue.min.js"></script>
</head>
<body>
@RenderBody()
+ <script asp-location="Footer" asp-src="/theme/script/menu.js"></script>
+ <script asp-location="Footer" asp-src="/theme/lib/popper.min.js"></script>
+ <script asp-location="Footer" asp-src="/theme/script/app.js"></script>
+
</body>
</html>