You have no items in your shopping cart.

Profile: steveembry66@gmail.com

Avatar
Statistics

    That would be very helpful!

    Thank you!

    9 years ago

    OK, thank you for finding that problem!

    We want to try it because in our business we already use endicia to print our shipping labels, but we must copy/paste the shipment info from nopcommerce order screen into endicia screen for each shipment in order to generate the labels. This plugin has the label generator within nopcommerce so you can print labels without leaving the nopcommerce admin screen...

    9 years ago

    Hello-

    Yesterday, I installed a plugin from another developer ( http://www.nopcommerce.com/p/1106/calculate-print-usps-labels.aspx ).

    Now, I cannot access the articles list or articles group list in the administration area. Page not found...404.
    I can access the configure screen OK, and the public pages work OK, too.

    I tried un-installing the other plugin, but the problem remains.

    Do you have a suggestion for me?

    Thanks,
    Steve

    9 years ago

    I think this is the right solution, but for people with more than 2 stores, you would need to use if/elseif logic, or in the case of more than 5, maybe a case/switch for better readability.

    Maybe at some point, the option for having a separate stylesheet could be added into the plugin configuration as a feature?

    ..this would at least allow for simple design differences to the List.cshtml, Search.cshtml, and ArticlePost.cshtml views for each store. For most users of the plugin, this would be sufficient.

    The "Printer-friendly" version (ArticlePostPrint.cshtml) is different, and already requires manual customization for most people anyway to make it more or less "friendly". (e.g: removing related product-box's and adding their company logo)

    Anyway...we love the plugin and appreciate your continued efforts to provide needed functionality!

    Steve

    10 years ago

    Problem solved. This is the code I used on ArticlePostPrint.cshtml:

    I changed this:

    <link href="/Plugins/FoxNetSoft.Articles/Styles/styles-print.css" rel="stylesheet" type="text/css" />


    ...to this:

    @{
    string currentstore=HttpContext.Current.Request.ServerVariables["HTTP_HOST"];
    string imgsrc="";
    string alttag="";

    if (currentstore == "www.mydomain.com")
    {
    <link href="/Plugins/FoxNetSoft.Articles/Styles/styles-store1-print.css" rel="stylesheet" type="text/css" />
    imgsrc="/content/images/uploaded/store1_logo.jpg";
    alttag="Store 1 Name";
    }
    else
    {
    <link href="/Plugins/FoxNetSoft.Articles/Styles/styles-store2-print.css" rel="stylesheet" type="text/css" />
    imgsrc="/content/images/uploaded/store2_logo.jpg";
    alttag="Store 2 Name";
    }

    }



    Then, below that, I changed this:

    <a href="@Url.RouteUrl("HomePage")" class="logo"><img  alt="Store 1 Name" src="/path/to/my/images/store1_logo.jpg"></a>


    ...to this:

    <a href="@Url.RouteUrl("HomePage")" class="logo"><img  alt="@alttag" src="@imgsrc"></a>

    Works perfectly-

    Steve
    10 years ago

    Actually, only the imgsrc variable I create is the problem, because the error is further down the page, where I call it:

    <a href="@Url.RouteUrl("HomePage")" class="logo"><img  alt="" src="@imgsrc"></a>

    10 years ago

    I forgot about the ArticlePostPrint.cshtml

    I also need for it to have it's own styling, and the second store's logo to appear on it.

    I have written this code for that view, but it is not working:

    @{
    string currentstore=HttpContext.Current.Request.ServerVariables["HTTP_HOST"];


    if (currentstore == "www.mydomain.com")
    {
    <link href="/Plugins/FoxNetSoft.Articles/Styles/styles-print.css" rel="stylesheet" type="text/css" />

    string imgsrc="/content/images/uploaded/store1_Logo_Print_Friendly.jpg";
    }
    else
    {
    <link href="/Plugins/FoxNetSoft.Articles/Styles/styles-NATURALS-print.css" rel="stylesheet" type="text/css" />
    string imgsrc="/content/images/uploaded/store2_Logo_print_friendly.gif";
    }

    }


    But I get this error in log:

    error CS0103: The name 'imgsrc' does not exist in the current context

    I suppose it is because that "imgsrc" string is defined inside of a code block, and it doesn't see it further down the page??

    Can this be done?

    Thanks,
    Steve
    10 years ago

    OK...nevermind....I finally figured out a solution:


    I replaced this line on those two views:

      

      Html.AddCssFileParts("~/Plugins/FoxNetSoft.Articles/Styles/styles.css"); 



    ...with this code:


    string currentstore=HttpContext.Current.Request.ServerVariables["HTTP_HOST"];


    if (currentstore == "www.mydomain.com")
    {
            Html.AddCssFileParts("~/Plugins/FoxNetSoft.Articles/Styles/styles1.css");
    }
    else
    {
            Html.AddCssFileParts("~/Plugins/FoxNetSoft.Articles/Styles/styles2.css");
    }




    10 years ago

    steveembry66@gmail.com wrote:

    Or maybe it is best to just use host headers to determine which stylesheet to use?

    Something like this?

    currentstore = Page.Context.Request.Headers.GetValues("Host");

    if (currentstore == 'OriginalStoreDomainName.com')
    {
            Html.AddCssFileParts("~/Plugins/FoxNetSoft.Articles/Styles/store1-styles.css");
    }
    else
    {
            Html.AddCssFileParts("~/Plugins/FoxNetSoft.Articles/Styles/store2-styles.css");
    }

    Thanks for your help!
    Steve


    I tried this, but it did not work...I got this error in log:

    c:\inetpub\wwwroot\mywebsite\Plugins\FoxNetSoft.Articles\Views\ArticleRead\List.cshtml(11): error CS1012: Too many characters in character literal

    The details for the log entry.Full message:  System.Web.HttpCompileException (0x80004005): c:\inetpub\wwwroot\mywebsite\Plugins\FoxNetSoft.Articles\Views\ArticleRead\List.cshtml(11): error CS1012: Too many characters in character literal at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath) at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext cont
    10 years ago

    Or maybe it is best to just use host headers to determine which stylesheet to use?

    Something like this?

    currentstore = Page.Context.Request.Headers.GetValues("Host");

    if (currentstore == 'OriginalStoreDomainName.com')
    {
            Html.AddCssFileParts("~/Plugins/FoxNetSoft.Articles/Styles/store1-styles.css");
    }
    else
    {
            Html.AddCssFileParts("~/Plugins/FoxNetSoft.Articles/Styles/store2-styles.css");
    }

    Thanks for your help!
    Steve

    10 years ago

    Powered by nopCommerce

    Copyright © 2023 FoxNetSoft. All rights reserved