cyprich.com

Occasionally Relevant Insights from a Software Builder

By

Create a Custom Help File in uStore

You can define custom help or context sensitive help in uStore by creating an HTML file and entering it in the appropriate text box. This section is found when you login to uStoreAdmin and then do the following steps:

  1. Open the store.
  2. Go to Store Setting.
  3. Select Set Up Store.
  4. Go to the Advanced tab.
  5. In the Storefront Help Info section, you enter name of the help file(s) in Custom Help File or Context Senstive Help.

image
Click image to enlarge.

Its easy to create an HTML help file, but if you use the same file for multiple stores, its a good idea to make this file a redirect page which takes the user to the actual help file. The reason for this is that sometime down the road, you may decide to use a page with a different name, or in my case, the page could be hosted in a Joomla site where the name for a new help file that I create will be different.

If you only have one store, then it doesn’t matter what you name the file since its easy to replace, but if your hosting hundreds of stores it will not be a small task to replace all of the links with a new filename.

A simple solution is to make the help file an .ASPX redirect page. Each store will have the same file and if you create a new help file, the only thing you need to do is modify your .ASPX redirect file

The following page is an an .ASPX file which is saved in your XMPie installation at \XMPie\uStore\App\CustomerApp. Modify the red text to the actual URL of the help text.

—[ Help.aspx ]——————————–

<%@ Page Language=”C#” %>

<!DOCTYPE html>

<script runat=”server”>
</script>

<html>
  <head runat=”server”>
    <title>
uStore Help</title>

    <meta http-equiv=”Refresh” content=”0; url=http://mycms/ustore/help-12102013/>

    <!– If the meta tag doesn’t work, try JavaScript to redirect. –>
    <script type=”text/javascript”>
      window.location.href = “
http://mycms/ustore/help-12102013
    </script>
  </head>

  <body>
    <form id=”form1″ runat=”server”>
      <div>
        <!– If JavaScript doesn’t work, give a link to click on to redirect. –>
        <p>If you are not redirected automatically, click <a href=’
http://mycms/ustore/help-12102013‘>here</a>.</p>
      </div>
    </form>
  </body>
</html>

By

QLingo for Notepad++

Writing code in QLingo for XMPie uStore in InDesign is challenging since it can be difficult to read due to the font and lack of colours to highlight key areas. I prefer to write code outside of InDesign so that I can save it in an easy to reference format.

My programming editor of choice and editor for general usage is Notepad++. It supports multiple programming languages and gives the option of adding your own custom language. I created a QLingo language addon that you can download from the following link: QLingo for Notepad++.

Comments in your code are deleted when you import into your InDesign document, but its useful to keep in your saved source code for when your debugging it 3 months from now.

QLingo for NotePad++

By

Backing up MySQL Databases with PowerShell

I created this PowerShell utility to backup MySQL databases to a path. You execute it in by right clicking on the script in Windows Explorer and select Run with PowerShell or run it with the PowerShell command line:

./MySQL_Backup.ps1

The script can be downloaded here: MySQL_Backup.ps1.

By

Redirecting ASP.NET Pages

You can redirect an ASP.NET page using one of three methods. The first method is through metatag redirection. If that fails, then it will try to redirect with JavaScript. If that fails, a URL will be displayed that the user can click on to redirect the page.

An HTML 5 only version of this redirect page can be found in the post Redirecting Pages in HTML 5.

— ASP.NET code below —

 <%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">
</script>

<html>
  <head runat="server">
    <title>Page Title</title>

    <meta http-equiv="Refresh" content="0; url=http://www.website.com">

    <!-- If the meta tag doesn't work, try JavaScript to redirect. -->

    <script type="text/javascript">
      window.location.href = "http://www.website.com"
    </script>
  </head>

  <body>
    <form id="form1" runat="server">
      <div>
        <!-- If JavaScript doesn't work, give a link to click on to redirect. -->

        <p>If you are not redirected automatically, click <a href='http://www.website.com'>here</a>.</p>
      </div>
    </form>
  </body>
</html>

By

How to Delete a Windows Service

Uninstalling a program in Windows doesn’t always delete the services that it was using. There is no way to delete a service from the interface in the Windows administrative tools, but you can do this manually through the command prompt.

Open the command prompt by press the Windows key and R (or alternately opening the Start menu and selecting the Run option).

Type sc delete ServiceName and press enter. If the service has spaces in its name, enclose ServiceName in double quotes, i.e. “Weather Monitor”.

The service will then be deleted from Windows.