<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Musings From the Throne &#187; Store Morph Technology</title>
	<atom:link href="http://www.tinyqueen.com/category/store-morph-technology/feed" rel="self" type="application/rss+xml" />
	<link>http://www.tinyqueen.com</link>
	<description>Random Ramblings from the Tiny Queen</description>
	<lastBuildDate>Sun, 23 May 2010 22:12:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=7744</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Miva Merchant Quick Tip: Styling Your Category Tree</title>
		<link>http://www.tinyqueen.com/miva-merchant/miva-merchant-quick-tip-styling-your-category-tree</link>
		<comments>http://www.tinyqueen.com/miva-merchant/miva-merchant-quick-tip-styling-your-category-tree#comments</comments>
		<pubDate>Sun, 21 Feb 2010 16:58:15 +0000</pubDate>
		<dc:creator>Tiny Queen</dc:creator>
				<category><![CDATA[Miva Merchant]]></category>
		<category><![CDATA[Store Morph Technology]]></category>
		<category><![CDATA[category tree]]></category>
		<category><![CDATA[css-based category tree]]></category>
		<category><![CDATA[list-based category tree]]></category>

		<guid isPermaLink="false">http://www.tinyqueen.com/?p=540</guid>
		<description><![CDATA[
There have been several posts on the forums lately from people looking to style their category trees.  Many of them need the tree to be in an unordered list format in order to implement a flyout or dropdown menu of some sort.
There are numerous methods available for creating accessible, cross-browser compatible flyout or dropdown [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tinyqueen.com/wp-content/uploads/2010/02/cattree.jpg"><img src="http://www.tinyqueen.com/wp-content/uploads/2010/02/cattree.jpg" alt="Styling the Miva Merchant Category Tree" title="cattree" width="215" height="333" class="alignright size-full wp-image-546"></a>
<p>There have been several posts on the forums lately from people looking to style their category trees.  Many of them need the tree to be in an unordered list format in order to implement a flyout or dropdown menu of some sort.</p>
<p>There are numerous methods available for creating accessible, cross-browser compatible flyout or dropdown menus, so I&#8217;ll leave it to you to search out the one that works best for your needs.  What I will do here, however, is to provide you with the code you need for your category tree to create those unordered lists from your categories and subcategories.</p>
<p>The tree code below does not contain the conditional that removes the link from the current category &#8212; I&#8217;ve always thought that was a bit nonsensical.  It does, however, include a css class that will allow you to highlight the current category in the list, making your Miva Merchant site more user friendly.</p>
<p>Some of the lines in the code below are pretty long &#8212; that&#8217;s just because I hate seeing &#8220;orphaned&#8221; &lt;li&gt; tags on their own line in the source code.  If you need to break it out to make it more readable for yourself, by all means do so.</p>
<pre title="code" class="html">
&lt;mvt:if expr=&quot;l.settings:cattree:stack EQ 0&quot;&gt;
  &lt;mvt:item name=&quot;category_tree&quot; param=&quot;cattree_header&quot; /&gt;
&lt;/mvt:if&gt;

&lt;mvt:if expr=&quot;l.settings:nextcount GT 0&quot;&gt;
  &lt;ul id=&quot;catlevel&amp;mvt:cattree:stack;&quot;&gt;
    &lt;mvt:item name=&quot;category_tree&quot; param=&quot;nextlevel&quot;&gt;
      &lt;mvt:foreach iterator=&quot;cattree_category&quot; array=&quot;categories&quot;&gt;
          &lt;mvt:if expr=&quot;l.settings:cattree_category:image&quot;&gt;
            &lt;li&gt;&lt;a href=&quot;&amp;mvt:global:sessionurl;Screen=CTGY&amp;Store_Code=&amp;mvta:store:code;&amp;Category_Code=&amp;mvta:cattree_category:code;&quot;&gt;&lt;img src=&quot;&amp;mvte:cattree_category:image;&quot; alt=&quot;&amp;mvte:cattree_category:name;&quot;&gt;&lt;/a&gt;&lt;mvt:if expr=&quot;l.settings:cattree_category:id NE l.settings:cattreenext&quot;&gt;&lt;/li&gt;&lt;/mvt:if&gt;
          &lt;mvt:else&gt;
            &lt;mvt:if expr=&quot;l.settings:cattree_category:code EQ g.Category_code&quot;&gt;
		&lt;li class=&quot;thiscat&quot;&gt;&lt;a href=&quot;&amp;mvt:global:sessionurl;Screen=CTGY&amp;Store_Code=&amp;mvta:store:code;&amp;Category_Code=&amp;mvta:cattree_category:code;&quot;&gt;&amp;mvt:cattree_category:name;&lt;/a&gt;&lt;mvt:if expr=&quot;l.settings:cattree_category:id NE l.settings:cattreenext&quot;&gt;&lt;/li&gt;&lt;/mvt:if&gt;
	    &lt;mvt:else&gt;
		&lt;li&gt;&lt;a href=&quot;&amp;mvt:global:sessionurl;Screen=CTGY&amp;Store_Code=&amp;mvta:store:code;&amp;Category_Code=&amp;mvta:cattree_category:code;&quot;&gt;&amp;mvt:cattree_category:name;&lt;/a&gt;&lt;mvt:if expr=&quot;l.settings:cattree_category:id NE l.settings:cattreenext&quot;&gt;&lt;/li&gt;&lt;/mvt:if&gt;
	    &lt;/mvt:if&gt;
          &lt;/mvt:if&gt;
          &lt;mvt:if expr=&quot;l.settings:cattree_category:id EQ l.settings:cattreenext&quot;&gt;
		&lt;mvt:item name=&quot;category_tree&quot;/&gt;
		&lt;/li&gt;
          &lt;/mvt:if&gt;
      &lt;/mvt:foreach&gt;
    &lt;/mvt:item&gt;
  &lt;/ul&gt;
&lt;/mvt:if&gt;

&lt;mvt:if expr=&quot;l.settings:cattree:stack EQ 0&quot;&gt;
  &lt;mvt:item name=&quot;category_tree&quot; param=&quot;cattree_footer&quot; /&gt;
&lt;/mvt:if&gt;
</pre>
<p>This code will give you a tidy set of nested unordered lists that you can style in your css file using the id of the list item.  When the tree is generated, each list will have an id of catlevel, with a number appended to it indicating which level of the category tree is being displayed (i.e. catlevel, catlevel1, catlevel2, etc).</p>
<p>As an example, the code below will get you a category tree that resembles the picture at the top of this post.</p>
<pre title="code" class="css">
ul#catlevel {
list-style-type:none;
margin-left:0;
padding-left:0;
font-weight:bold;
}

ul#catlevel li a {
display:block;
border-bottom:1px dotted #ccc;
padding:5px 3px;
margin-right:5px;
font-size:1.1em;
color:#18316b;
}

ul#catlevel1, ul#catlevel2, ul#catlevel3, ul#catlevel4 {
list-style:none;
margin:5px 0;
padding:5px 0;
}

ul#catlevel li ul li, ul#catlevel li ul ul li, ul#catlevel li ul ul ul li{
padding:2px 0 2px 5px;
}

ul#catlevel li ul a, ul#catlevel li ul ul a, ul#catlevel li ul ul ul a {
border:none;
padding:3px 5px;
}

ul#catlevel1 {
border-bottom:1px dotted #ccc
}

li.thiscat a {
color: #cc0000;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tinyqueen.com/miva-merchant/miva-merchant-quick-tip-styling-your-category-tree/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Miva Merchant Quick Tip: Some Handy Conditionals</title>
		<link>http://www.tinyqueen.com/miva-merchant/miva-merchant-quick-tip-some-handy-conditionals</link>
		<comments>http://www.tinyqueen.com/miva-merchant/miva-merchant-quick-tip-some-handy-conditionals#comments</comments>
		<pubDate>Thu, 16 Jul 2009 02:33:23 +0000</pubDate>
		<dc:creator>Tiny Queen</dc:creator>
				<category><![CDATA[Miva Merchant]]></category>
		<category><![CDATA[Store Morph Technology]]></category>

		<guid isPermaLink="false">http://www.tinyqueen.com/?p=456</guid>
		<description><![CDATA[Miva Merchant users and developers frequently post on the Miva Merchant User Forums looking for guidance with some commonly desired conditionals to control the display of content on their ecommerce sites.
Below is a list of some of the more common requests, gathered together in one handy spot.  Who knows, you may even see something [...]]]></description>
			<content:encoded><![CDATA[<p>Miva Merchant users and developers frequently post on the <a href="extranet.mivamerchant.com/forums">Miva Merchant User Forums</a> looking for guidance with some commonly desired conditionals to control the display of content on their ecommerce sites.</p>
<p>Below is a list of some of the more common requests, gathered together in one handy spot.  Who knows, you may even see something here that sparks an idea for modifying your own store.</p>
<h3>Conditionals for displaying products and their information</h3>
<p>Only show certain content for a single product</p>
<pre title="code" class="html">
&lt;mvt:if expr=&quot;l.settings:product:code EQ 'MyProductCode'&quot;&gt;
My special content here
&lt;mvt:else&gt;
The content for all the other products
&lt;/mvt:if&gt;
</pre>
<p>Hide a product from display (for instance, in search results or on a category page</p>
<pre title="code" class="html">
&lt;mvt:foreach iterator=&quot;product&quot; array=&quot;products&quot;&gt;
&lt;mvt:if expr=&quot;l.settings:product:code NE 'MyProductCode'&quot;&gt;
Product Display Information Here
&lt;/mvt:if&gt;
&lt;/mvt:foreach&gt;
</pre>
<p>Hide a set of products from display. If you name each product with a specific prefix (this example assumes the prefix is separated from the code by a hyphen), hiding them from display can be easy</p>
<pre title="code" class="html">
&lt;mvt:if expr=&quot;NOT('MySpecialPrefix-' CIN l.settings:product:code)&quot;&gt;
Display some content
&lt;/mvt:if&gt;
</pre>
<p>Display certain content only if a product has attributes</p>
<pre title="code" class="html">
&lt;mvt:if expr=&quot;l.settings:attr_count GE 1&quot;&gt;
Display this content only if the product has attributes
&lt;/mvt:if&gt;
</pre>
<h3>Logged in Customers</h3>
<p>Display certain content if a shopper is logged in to an account</p>
<pre title="code" class="html">
&lt;mvt:if expr=&quot;basket:cust_id&quot;&gt;
You're logged in.
&lt;/mvt:if&gt;
</pre>
<p>Display certain content if a shopper is logged in, and alternate content if they are not</p>
<pre title="code" class="html">
&lt;mvt:if expr=&quot;basket:cust_id&quot;&gt;
You're logged in.
&lt;mvt:else&gt;
You're not logged in.
&lt;/mvt:if&gt;
</pre>
<h3>Secure page content</h3>
<p>Exclude content from secure Miva Merchant pages</p>
<pre title="code" class="html">
&lt;mvt:if expr=&quot;NOT g.Secure&quot;&gt;
My content that I don't want on secure pages
&lt;/mvt:if&gt;
</pre>
<p>Include content only on secure Miva Merchant pages</p>
<pre title="code" class="html">
&lt;mvt:if expr=&quot;g.Secure&quot;&gt;
My content that I only want on secure pages
&lt;/mvt:if&gt;
</pre>
<h3>Controlling Content on Specific Pages/Screens</h3>
<p>Include content only on a specific screen</p>
<pre title="code" class="html">
&lt;mvt:if expr=&quot;g.Screen EQ &apos;MyScreen&apos;&quot;&gt;
My content that I only want on a specific page
&lt;/mvt:if&gt;
</pre>
<p>Exclude content from a specific screen</p>
<pre title="code" class="html">
&lt;mvt:if expr=&quot;g.Screen NE &apos;MyScreen&apos;&quot;&gt;
My content that I only want on a specific page
&lt;/mvt:if&gt;
</pre>
<p>Include content on several specific screens</p>
<pre title="code" class="html">
&lt;mvt:if expr=&quot;g.Screen IN &apos;MyScreen,MyScreen2,MyScreen3,MyScreen4&apos;&quot;&gt;
My content that I only want on a specific page
&lt;/mvt:if&gt;
</pre>
<p>Exclude content from several specific screens</p>
<pre title="code" class="html">
&lt;mvt:if expr=&quot;NOT(g.Screen IN &apos;MyScreen,MyScreen2,MyScreen3,MyScreen4&apos;)&quot;&gt;
My content that I only want on a specific page
&lt;/mvt:if&gt;
</pre>
<p>I hope to add to this post as I think of additional common needs for Miva Merchant store morph technology conditionals, so be sure to subscribe and get any updates.</p>
<p><small>P.S. Special thanks to the fine folk at <a href="http://accessify.com">accessify.com</a> for their brilliant Quick Escape tool which <a href="http://accessify.com/tools-and-wizards/developer-tools/quick-escape/default.php">converts raw HTML to escape characters</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tinyqueen.com/miva-merchant/miva-merchant-quick-tip-some-handy-conditionals/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Miva Merchant Quick Tip: Matching Multiple Variables in a Conditional</title>
		<link>http://www.tinyqueen.com/ecommerce/miva-merchant-quick-tip-matching-multiple-variables-in-a-conditional</link>
		<comments>http://www.tinyqueen.com/ecommerce/miva-merchant-quick-tip-matching-multiple-variables-in-a-conditional#comments</comments>
		<pubDate>Thu, 28 May 2009 03:00:00 +0000</pubDate>
		<dc:creator>Tiny Queen</dc:creator>
				<category><![CDATA[Ecommerce]]></category>
		<category><![CDATA[Miva Merchant]]></category>
		<category><![CDATA[Store Morph Technology]]></category>

		<guid isPermaLink="false">http://localhost/TinyQueen/wordpress/?p=43</guid>
		<description><![CDATA[This morning I was working on a small project to modify the layout of the attributes on a product page template, and it occurred to me that others might find this little trick about writing conditionals where you need to match a multitude of variables useful.
In this particular project, I needed conditionals for two purposes: [...]]]></description>
			<content:encoded><![CDATA[<p>This morning I was working on a small project to modify the layout of the attributes on a product page template, and it occurred to me that others might find this little trick about writing conditionals where you need to match a multitude of variables useful.</p>
<p>In this particular project, I needed conditionals for two purposes:  one in one location of the template to check to see if the attribute template code was either the word &#8220;Length&#8221; or the word &#8220;Width&#8221; and the second in a separate location to check to see if the template code was either &#8220;LengthFraction&#8221; or &#8220;WidthFraction.&#8221;</p>
<p>Since I was trying to match the code against a list of variables, I could have written my conditional like so:</p>
<pre title="code" class="html">
&lt;mvt:if expr="l.settings:attribute:template_code IN 'LengthFraction, WidthFraction'"&gt;</pre>
<p>Anyone else see a problem with this though?  The above conditional, which checks to see if the content of the template code variable exists in either the words LengthFraction or WidthFraction will return true not only if the template code is actually LengthFraction or WidthFraction, but also if the template code is merely Length or Width.</p>
<p>So, we need to be a little more specific. Since I was only trying to match one of two different variables, I could have written my conditional like this instead:</p>
<pre title="code" class="html">
&lt;mvt:if expr="((l.settings:attribute:template_code EQ 'LengthFraction') OR (l.settings:attribute:template_code EQ 'WidthFraction'))"&gt;</pre>
<p>That&#8217;s fine when you only have a couple of variables to test against, but if you have several codes you want to match up, there&#8217;s a much cleaner and easier way.  By making use of Store Morph Technology&#8217;s (SMT) concatenating feature, you can use the IN expression to check against a list of several codes, without the risk of inexact matches.</p>
<p>Here&#8217;s the code:</p>
<pre title="code" class="html">&lt;mvt:if expr="'|'$l.settings:attribute:template:code$'|' IN '|Length|Width|'"&gt;</pre>
<p>And here&#8217;s how it works.</p>
<p>The very first element in the conditional is a string (enclosed by single quotes) consisting of a pipe character, aka | .  Next to the string is a $ sign.  In many scripting languages the $ sign is used to indicate a variable, but in SMT, the $ sign is a concatenator.  That is, it takes whatever string or variable is in front of it, and joins it to whatever string or variable is after it.</p>
<p>The next element in our conditional is the SMT variable we are wanting to test, in this case, the attribute template code.  It&#8217;s followed by another $ sign and another string consisting of a pipe character.  The result is that the first part of our conditional expression consists of the template code surrounded by pipes:<br /> |Length| <br />
|LengthFraction| <br />
|Width| <br />
|WidthFraction| etc.</p>
<p>The second element in the conditional is a string, consisting of a list of the codes we want to match.  The list begins and ends with a pipe character, and the codes in the list are also separated with pipe characters.</p>
<p>What this means is that if the conditional tries to match |Length| to |LengthFraction| it will now return false, since there isn&#8217;t an exact character to character match &#8212; although the |Length part of the first element is found in |LengthFraction| the pipe at the end of |Length| does not appear in that same position in |LengthFraction| and so the conditional will return false.</p>
<p>So there you have it.  A complex conditional made short and sweet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tinyqueen.com/ecommerce/miva-merchant-quick-tip-matching-multiple-variables-in-a-conditional/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Miva Merchant: Customer Account Creation on INVC Page</title>
		<link>http://www.tinyqueen.com/ecommerce/miva-merchant-customer-account-creation-on-invc-page</link>
		<comments>http://www.tinyqueen.com/ecommerce/miva-merchant-customer-account-creation-on-invc-page#comments</comments>
		<pubDate>Thu, 26 Feb 2009 20:04:00 +0000</pubDate>
		<dc:creator>Tiny Queen</dc:creator>
				<category><![CDATA[Ecommerce]]></category>
		<category><![CDATA[Miva Merchant]]></category>
		<category><![CDATA[Shopping Cart Usability]]></category>
		<category><![CDATA[Store Morph Technology]]></category>

		<guid isPermaLink="false">http://localhost/TinyQueen/wordpress/?p=41</guid>
		<description><![CDATA[Recently there&#8217;s been lots of buzz on the Miva Merchant User Support Forum about moving the account creation process to the end of the checkout. There are a number of good reasons for doing this. First, you eliminate one of the checkout screens, and streamline the checkout process. Second, and more importantly, you eliminate a [...]]]></description>
			<content:encoded><![CDATA[<p>Recently there&#8217;s been lots of buzz on the <a href="http://extranet.mivamerchant.com/forums">Miva Merchant User Support Forum</a> about moving the account creation process to the end of the checkout. There are a number of good reasons for doing this. First, you eliminate one of the checkout screens, and streamline the checkout process. Second, and more importantly, you <span style="font-weight: bold;">eliminate a decision</span> from the checkout process.</p>
<p>There&#8217;s a <a href="http://www.amazon.com/Think-Common-Sense-Approach-Usability/dp/0789723107">great usability book</a> out there by a fellow named Steve Krug, called &#8220;Don&#8217;t Make Me Think&#8221; That book title couldn&#8217;t be more apt for the checkout process in a shopping cart. When your shoppers commit enough to hit the checkout button, don&#8217;t present them with a new decision to have to make before they can get started.</p>
<p>As one person put it, your shoppers aren&#8217;t looking to develop a relationship with you. You have something they want, and they want to give you their money so you can send it to them. Since you want to get their money and send them things, it seems you have a common goal. So why not make it easier to achieve that goal? Get the sale, <span style="font-style: italic;"> and then</span> offer them the opportunity to create an account if they think they&#8217;d like to come back and shop again. But don&#8217;t clutter the checkout process with an unnecessary decision.</p>
<p>So, to the meat of the matter. How does one go about creating an account for a customer using the information available on the INVC page? Since they&#8217;ve already provided their shipping and billing information, there are only two additional bits you need from them: a user name, and a password. The rest you can feed to the form from what they&#8217;ve already told you.</p>
<p>In your INVC page template, decide where you want to present the account creation option, and add the following code. The hidden input for PrevPage isn&#8217;t required, but it gives you a global variable to test against if you want to customize the ACED page to display a &#8220;Thank you for creating your account&#8221; message instead of the account edit form.</p>
<p>You&#8217;ll have to do your own form styling, but this should give you the bare bones you need to get started.</p>
<pre title="code" class="html">
&lt;form method="post" action="&amp;mvt:global:secure_sessionurl;"&gt;
&lt;input type="hidden" name="Store_Code" value="&amp;mvte:global:Store_Code;"&gt;
&lt;input type="hidden" name="Action" value="ICST"&gt;
&lt;input type="hidden" name="Screen" value="ACED"&gt;
&lt;input type="hidden" name="PrevPage" value="INVC"&gt;
&lt;label for="login"&gt;User Name&lt;/label&gt;
&lt;input type="text" id="login" name="Customer_Login" value="&amp;mvte:global:Customer_Login;"&gt;
&lt;label for="pass"&gt;Password&lt;/label&gt;
&lt;input type="password" id="pass" name="Customer_Password" size="25" value="&amp;mvte:global:Customer_Password;"&gt;
&lt;label for="verifypass"&gt;Confirm Password&lt;/label&gt;
&lt;input type="password" id="verifypass" name="Customer_VerifyPassword" size="25" value="&amp;mvte:global:Customer_VerifyPassword;"&gt;
&lt;input type="hidden" name="Customer_PasswordEmail" value="&amp;mvte:order:bill_email;"&gt;
&lt;input type="hidden" name="Customer_ShipFirstName" value="&amp;mvte:order:ship_fname;"&gt;
&lt;input type="hidden" name="Customer_ShipLastName" value="&amp;mvte:order:ship_lname;"&gt;
&lt;input type="hidden" name="Customer_ShipEmail" value="&amp;mvte:order:ship_email;"&gt;
&lt;input type="hidden" name="Customer_ShipPhone" value="&amp;mvte:order:ship_phone;"&gt;
&lt;input type="hidden" name="Customer_ShipFax" value="&amp;mvte:order:ship_fax;"&gt;
&lt;input type="hidden" name="Customer_ShipAddress" value="&amp;mvte:order:bill_addr;"&gt;
&lt;input type="hidden" name="Customer_ShipCompany" value="&amp;mvte:order:ship_comp;"&gt;
&lt;input type="hidden" name="Customer_ShipCity" value="&amp;mvte:order:ship_city;"&gt;
&lt;input type="hidden" name="Customer_ShipState" value="&amp;mvte:order:ship_state;"&gt;
&lt;input type="hidden" name="Customer_ShipZip" value="&amp;mvte:order:ship_zip;"&gt;
&lt;input type="hidden" name="Customer_ShipCountry" value="&amp;mvte:order:ship_cntry;"&gt;
&lt;input type="hidden" name="Customer_BillFirstName" value="&amp;mvte:order:bill_fname;"&gt;
&lt;input type="hidden" name="Customer_BillLastName" value="&amp;mvte:order:bill_lname;"&gt;
&lt;input type="hidden" name="Customer_BillEmail" value="&amp;mvte:order:bill_email;"&gt;
&lt;input type="hidden" name="Customer_BillPhone" value="&amp;mvte:order:bill_phone;"&gt;
&lt;input type="hidden" name="Customer_BillFax" value="&amp;mvte:order:bill_fax;"&gt;
&lt;input type="hidden" name="Customer_BillAddress" value="&amp;mvte:order:bill_addr;"&gt;
&lt;input type="hidden" name="Customer_BillCompany" value="&amp;mvte:order:bill_comp;"&gt;
&lt;input type="hidden" name="Customer_BillCity" value="&amp;mvte:order:bill_city;"&gt;
&lt;input type="hidden" name="Customer_BillState" value="&amp;mvte:order:bill_state;"&gt;
&lt;input type="hidden" name="Customer_BillZip" value="&amp;mvte:order:bill_zip;"&gt;
&lt;input type="hidden" name="Customer_BillCountry" value="&amp;mvte:order:bill_cntry;"&gt;
&lt;mvt:item name="buttons" param="Save" /&gt;
&lt;/form&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tinyqueen.com/ecommerce/miva-merchant-customer-account-creation-on-invc-page/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Miva Merchant: A Store Morph Technology Mini-Primer</title>
		<link>http://www.tinyqueen.com/ecommerce/miva-merchant-a-store-morph-technology-mini-primer</link>
		<comments>http://www.tinyqueen.com/ecommerce/miva-merchant-a-store-morph-technology-mini-primer#comments</comments>
		<pubDate>Sun, 09 Nov 2008 17:17:00 +0000</pubDate>
		<dc:creator>Tiny Queen</dc:creator>
				<category><![CDATA[Ecommerce]]></category>
		<category><![CDATA[Miva Merchant]]></category>
		<category><![CDATA[Store Morph Technology]]></category>

		<guid isPermaLink="false">http://localhost/TinyQueen/wordpress/?p=39</guid>
		<description><![CDATA[When Miva Merchant released MM5, they revolutionized the way the software worked "out of the box" and opened a whole new world of customization to ecommerce store owners.  Using Store Morph Technology (SMT), store owners could completely and...well, I was going to say easily customize their stores to suit their needs, but the truth is that at first glance, SMT isn't in fact all that easy.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.tinyqueen.com/images/blog/smt-727962.jpg" alt="Store Morph Technology" class="alignright"><br />When Miva Merchant released MM5, they revolutionized the way the software worked &#8220;out of the box&#8221; and opened a whole new world of customization to ecommerce store owners.  Using Store Morph Technology (SMT), store owners could completely and&#8230;well, I was going to say easily customize their stores to suit their needs, but the truth is that at first glance, SMT isn&#8217;t in fact all that easy.</p>
<p>One of the common complaints from new developers of MM sites, is the lack of documentation about SMT and how it works.  The new owners of Miva Merchant are working hard to remedy the documentation void, but in the meantime, here&#8217;s a mini primer on SMT and some examples of the things you can do with it.</p>
<p>You&#8217;ll see SMT in MM&#8217;s page templates in a variety of different forms.</p>
<p>
<h2 style="color: rgb(141, 169, 32);">Variables</h2>
<p>There are two types of variables in SMT:  local variables, specific to the page you&#8217;re on, and global variables, which are available sitewide.  The best way to find out what variables are available on a given page is to download the free Store Helper Module from <a href="http://store.latu.net/">Latu.net</a>.</p>
<p>Variables are displayed on MM pages in a variety of ways.  Note that variables always begin with an ampersand (&amp;) and end with a semicolon (;).</p>
<p>&amp;mvt:product:code;<br />
&amp;mvte:product:code;<br />
&amp;mvta:product:code;</p>
<p>Variables that begin with &amp;mvte are &#8220;entity encoded.&#8221;  This means that any characters they contain will be displayed on the page in their exact form &#8212; they will not be interpreted by the browser.</p>
<p>Variables that begin with &amp;mvta are &#8220;attribute encoded.&#8221;  This means that any characters they contain will be converted to the correct format for use in a link.</p>
<h2 style="color: rgb(141, 169, 32);">Tags</h2>
<p>SMT tags look similar to XHTML tags in that they are surrounded by &lt; &gt;, they include name / value pairs, with the values surrounded by double quotes, and all SMT tags must be closed, either by using a trailing slash, or with a separate closing tag.</p>
<h3 style="color: rgb(141, 169, 32);">Items</h3>
<p>SMT tags may call in specific page items.  These tags start with mvt:item, and use name=&#8221;xyz&#8221; to identify which page item is being called.  They may also include parameters that more specifically identify the content to be called in.  They are frequently self closing, but may have a separate closing tag depending on their form.</p>
<pre title="code" class="html">
&lt;mvt:item name="html_profile" /&gt;

&lt;mvt:item name="fonts" param="body_font" /&gt;
Some content here
&lt;/mvt:item&gt;
</pre>
<h3 style="color: rgb(141, 169, 32);">Loops and arrays</h3>
<p>SMT tags may be used to loop through an array, and display specific data associated with that array.  Common uses for these tags include such things as displaying the products in a category or search result, listing all of the products in the basket, or listing available shipping methods. All loops must be closed with a separate closing tag after you&#8217;ve worked with the content you&#8217;re pulling from the array.</p>
<pre title="code" class="html">
&lt;mvt:foreach iterator="product" array="products"&gt;
Some stuff about each of the items in this array
&lt;/mvt:foreach&gt;
</pre>
<h3 style="color: rgb(141, 169, 32);">Conditionals</h3>
<p>Finally, SMT tags may be used to create conditionals.  This is far and away one of the most useful aspects of SMT, and is the building block of the store owner&#8217;s ability to customize his or her store (at least in my opinion!).  Writing conditionals is probably worthy of a post all its own, but here are some basics.</p>
<p>All conditionals start with mvt:if and contain an expression to test for.  A very basic conditional might look like this.  This conditional checks to see if the product code is equal to the string 12345, and if it is, displays some text.  Note that the string is enclosed in single quotes.</p>
<pre title="code" class="html">
&lt;mvt:if expr="l.settings:product:code EQ '12345'"&gt;
Display some text.
&lt;/mvt:if&gt;
</pre>
<p>Conditionals can also be set up to do one thing if the condition is true, and another thing if it is false.</p>
<pre title="code" class="html">
&lt;mvt:if expr="l.settings:product:code EQ '12345'"&gt;
Display some text.
&lt;mvt:else&gt;
Display some other text.
&lt;/mvt:if&gt;
</pre>
<p>Or even&#8230;</p>
<pre title="code" class="html">
&lt;mvt:if expr="l.settings:product:code EQ '12345'"&gt;
Display some text.
&lt;mvt:elseif expr="l.settings:product:code EQ '45678'"&gt;
Display some other text.
&lt;mvt:else&gt;
Display yet some other text.
&lt;/mvt:if&gt;
</pre>
<p>Expressions can be combined to create extremely specific situations to test against.  For instance, if you want to display some text only if the product code is 12345 and the customer is logged in, you would write your conditional something like this:</p>
<pre title="code" class="html">&lt;mvt:if expr="((l.settings:product:code EQ '12345') AND (g.Basket:Cust_id))"&gt;
Display some text
&lt;/mvt:if&gt;
</pre>
<p>You can also easily test for a match in a single string or a series of strings, by using CIN or IN.  CIN is case insensitive; IN is case sensitive.  The strings to test against are enclosed in single quotes, and if there is more than one, they are separated by commas or some other delimiter such as a pipe.  The conditional below will return true if the product code is 12345 or 45678 or 67890.</p>
<pre title="code" class="html">
&lt;mvt:if expr="l.settings:product:code IN '12345,45678,67890'"&gt;
Display some text.
&lt;/mvt:if&gt;
</pre>
<p>Note that the conditional above will also return true if the product code is 1234567, 012345, or 98712356789.  It checks merely to see if the content of the first variable is included in the second.  If you need to look for an exact match, you would be better to use a conditional like the following.</p>
<pre title="code" class="html">
&lt;mvt:if expr="((l.settings:product:code EQ '12345') OR (l.settings:product:code EQ '45678') OR (l.settings:product:code EQ '67890'))"&gt;
Display some text.
&lt;/mvt:if&gt;
</pre>
<p>Once you get the hang of them, you&#8217;ll wonder how you ever did without the power of conditionals to control your shopper&#8217;s experience on your site.  Below are some of the most common conditional operators, along with what they do.</p>
<table>
<tbody>
<tr>
<th style="text-align: left; width: 120px;">Operator</th>
<th style="text-align: left; width: 100%;">Function</th>
</tr>
<tr>
<td>NOT</td>
<td>Returns true if the condition does not match the variable</td>
</tr>
<tr>
<td>ISNULL</td>
<td>Returns true if the variable is empty</td>
</tr>
<tr>
<td>AND</td>
<td>Returns true if both conditions are true</td>
</tr>
<tr>
<td>OR</td>
<td>Returns true if any of the conditions is true</td>
</tr>
<tr>
<td>EQ</td>
<td>Returns true if the variable matches the string</td>
</tr>
<tr>
<td>NE</td>
<td>Returns true if the variable does not match the string</td>
</tr>
<tr>
<td>GT</td>
<td>Returns true if the variable is greater than the string</td>
</tr>
<tr>
<td>LT</td>
<td>Returns true if the variable is less than the string</td>
</tr>
<tr>
<td>GE</td>
<td>Returns true if the variable is greater than or equal to the string</td>
</tr>
<tr>
<td>LE</td>
<td>Returns true if the variable is less than or equal to the string</td>
</tr>
<tr>
<td>IN</td>
<td>Returns the first position of string_a in string_b.  Case sensitive</td>
</tr>
<tr>
<td>CIN</td>
<td>Returns the first position of string_a in string_b.  Case insensitive</td>
</tr>
</tbody>
</table>
<h3 style="color: rgb(141, 169, 32);">Comments</h3>
<p>Finally, one of the most useful, and underused in my opinion, features of SMT is the comment feature.  By carefully commenting your work, you make it so much easier on yourself or another developer when it comes time to try to make updates or changes to existing customizations.  SMT comments take the following form.  They are not parsed by the server, and won&#8217;t appear in your html source code.</p>
<pre title="code" class="html">
&lt;mvt:comment&gt;
Here is an explanation of what this section of code is going to do.
&lt;/mvt:comment&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tinyqueen.com/ecommerce/miva-merchant-a-store-morph-technology-mini-primer/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restrict Access to a Product Page in Miva Merchant</title>
		<link>http://www.tinyqueen.com/ecommerce/restrict-access-to-a-product-page-in-miva-merchant</link>
		<comments>http://www.tinyqueen.com/ecommerce/restrict-access-to-a-product-page-in-miva-merchant#comments</comments>
		<pubDate>Wed, 23 Jul 2008 03:37:00 +0000</pubDate>
		<dc:creator>Tiny Queen</dc:creator>
				<category><![CDATA[Ecommerce]]></category>
		<category><![CDATA[Miva Merchant]]></category>
		<category><![CDATA[Store Morph Technology]]></category>

		<guid isPermaLink="false">http://localhost/TinyQueen/wordpress/?p=35</guid>
		<description><![CDATA[I have received numerous requests for some code I wrote to password protect a product page in Miva Merchant 5 (or 5.5), so I thought I&#8217;d share it here.  This code was originally written for a site that wanted to implement custom product pricing using the Emporium Plus External Product Purchase module, but wanted [...]]]></description>
			<content:encoded><![CDATA[<p>I have received numerous requests for some code I wrote to password protect a product page in Miva Merchant 5 (or 5.5), so I thought I&#8217;d share it here.  This code was originally written for a site that wanted to implement custom product pricing using the <a href="http://www.emporiumplus.com/go/wcw/PROD/1AAG/1AA00078">Emporium Plus External Product Purchase</a> module, but wanted to ensure that only staff members could access the page.</p>
<p><span style="font-weight: bold;">Note:</span>  This code requires the <a href="http://www.emporiumplus.com/merchant2/merchant.mvc?Screen=PROD&amp;Store_Code=wcw&amp;Product_Code=1AA00223&amp;Category_Code=1AAG">Tool Kit from Emporium Plus</a>.  If you have a Miva Merchant 5 (or 5.5) store, the Tool Kit is an immensely valuable module that allows developers and store owners enormous flexibility in customizing their stores.  It is beyond worth the money (and no, I don&#8217;t get anything for saying so except the satisfaction of spreading the word about an extremely useful tool).</p>
<p>To use the code below:</p>
<ol>
<li>Set up an availability group, and assign authorized customers to this group.</li>
<li>Substitute your desired product code where indicated by the text YOUR_PRODUCT_CODE_HERE (2 places).</li>
<li>Substitute your availability group name (not code!) for the AVAILABILITY_GROUP_NAME in the code below.</li>
</ol>
<p>This code is designed to work on the main screen of the regular PROD page.  If you&#8217;re using a template manager, you can remove the conditional that tests for the product code.</p>
<p>If you&#8217;re using Miva 5 (instead of 5.5), you&#8217;ll want to replace &lt;mvt:item name=&#8221;html_profile&#8221; /&gt;  with  &lt;html&gt; and &lt;mvt:item name=&#8221;head&#8221; param=&#8221;head_tag&#8221; /&gt; with  &lt;mvt:item name=&#8221;head&#8221; /&gt;</p>
<pre title="code" class="html">
&lt;mvt:item name="html_profile" /&gt;
&lt;head&gt;
&lt;title&gt;&amp;mvt:store:name;: &amp;mvt:product:name;&lt;/title&gt;
&lt;base href="&amp;mvt:global:basehref;"&gt;
&lt;mvt:item name="head" param="head_tag" /&gt;
&lt;/head&gt;

&lt;mvt:item name="body"&gt;
&lt;mvt:item name="hdft" param="global_header" /&gt;

&lt;tr&gt;&lt;td align="left" valign="bottom"&gt;
   &lt;mvt:item name="hdft" param="header" /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align="left" valign="top" bgcolor="&amp;mvt:colors:ctgy_bg;"&gt;
   &lt;table border="0" cellpadding="10" cellspacing="0"&gt;
      &lt;tr&gt;&lt;td align="left" valign="top" nowrap&gt;
      &lt;mvt:item name="fonts" param="ctgy_font"&gt;
      &lt;mvt:item name="customerlink" /&gt;
      &lt;mvt:item name="affiliatelink" /&gt;
      &lt;mvt:item name="category_tree" /&gt;
      &lt;/mvt:item&gt;
      &lt;/td&gt;&lt;/tr&gt;
   &lt;/table&gt;
&lt;/td&gt;&lt;td align="left" valign="top" width="80%"&gt;
   &lt;br&gt;
   &lt;blockquote&gt;

      &lt;mvt:comment&gt;Test for desired product code&lt;/mvt:comment&gt;
        &lt;mvt:if expr="l.settings:product:code EQ 'YOUR_PRODUCT_CODE_HERE'"&gt;

      &lt;mvt:comment&gt;Check to see if customer is logged in&lt;/mvt:comment&gt;
      &lt;mvt:if expr="g.Basket:CUST_ID"&gt;

      &lt;mvt:comment&gt;Check to see if customer is a member of your availability group&lt;/mvt:comment&gt;
      &lt;mvt:item name="toolkit" param="agroup|acount" /&gt;
      &lt;mvt:foreach iterator="customer_agroup" array="customer_agroups"&gt;

      &lt;mvt:comment&gt;Set test variable for use later in the page&lt;/mvt:comment&gt;
      &lt;mvt:if expr="l.settings:customer_agroup:name EQ 'YOUR_AVAILABILITY_GROUP'"&gt;
      &lt;mvt:item name="toolkit" param="sassign|staffid|1" /&gt;
      &lt;mvt:item name="prod_ctgy_hdft" param="prod_header" /&gt;
      &lt;mvt:item name="prod_ctgy_hdft" param="prod_header" /&gt;
      &lt;mvt:item name="product_display" /&gt;

      &lt;mvt:if expr="l.settings:product_count NE 0"&gt;
      &lt;br&gt;&lt;br&gt;
      &lt;mvt:item name="fonts" param="hdr_font"&gt;
      &lt;b&gt;Related Item(s)&lt;/b&gt;&lt;br&gt;
      &lt;/mvt:item&gt;

      &lt;mvt:item name="product_list" /&gt;
      &lt;/mvt:if&gt;
      &lt;mvt:item name="prod_ctgy_hdft" param="prod_footer" /&gt;
      &lt;/blockquote&gt;

      &lt;/mvt:if&gt;
      &lt;/mvt:foreach&gt; &lt;mvt:comment&gt;End Availability Group Array&lt;/mvt:comment&gt;
      &lt;/mvt:if&gt; &lt;mvt:comment&gt;End display product details if in Availability Group&lt;/mvt:comment&gt;

      &lt;mvt:comment&gt;If customer is logged in but staffid variable not set, display continue shopping link&lt;/mvt:comment&gt;
      &lt;mvt:if expr="g.Basket:CUST_ID AND (g.staffid NE '1')"&gt;
      &lt;p&gt;This page is for internal use only.&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
     &lt;p&gt;&lt;a href="http://domain.com"&gt;&lt;img src="graphics/00000001/continue_shopping.jpg" alt="Continue Shopping"&gt;&lt;/a&gt;&lt;/p&gt;

     &lt;mvt:comment&gt;Otherwise, if customer is not logged in, display login&lt;/mvt:comment&gt;
      &lt;mvt:elseif expr="g.staffid NE '1'"&gt;

      &lt;p&gt;This page is for internal use only.  Staff members may log in below.&lt;/p&gt;
      &lt;form method="post" action="&amp;mvt:global:secure_sessionurl;"&gt;
      &lt;input type="hidden" name="Store_Code" value="&amp;mvte:store:code;"&gt;
      &lt;input type="hidden" name="Screen" value="PROD"&gt;
      &lt;input type="hidden" name="Product_Code" value="YOUR_PRODUCT_CODE_HERE"&gt;
      &lt;label for="user"&gt;Username&lt;/label&gt;
      &lt;input type="text" id="user" size="20" name="Customer_Login" value="&amp;mvte:global:Customer_Login;"&gt;
      &lt;br&gt;&lt;br&gt;
      &lt;input type="radio" name="Action" value="LOGN" checked="checked" style="display: none;"&gt;
      &lt;label for="pass"&gt;Password:&lt;/label&gt;
      &lt;input type="password" id="pass" size="20" name="Customer_Password"&gt;
      &lt;br&gt;&lt;br&gt;
      &lt;mvt:item name="buttons" param="Login" /&gt;
      &lt;br&gt;&lt;br&gt;
      &lt;/form&gt;

      &lt;/mvt:if&gt;

      &lt;mvt:comment&gt;For all other products, display the regular layout&lt;/mvt:comment&gt;
      &lt;mvt:else&gt;

      &lt;mvt:item name="product_display" /&gt;

      &lt;mvt:if expr="l.settings:product_count NE 0"&gt;
      &lt;br&gt;&lt;br&gt;
      &lt;mvt:item name="fonts" param="hdr_font"&gt;
      &lt;b&gt;Related Item(s)&lt;/b&gt;
      &lt;br&gt;
      &lt;/mvt:item&gt;

      &lt;mvt:item name="product_list" /&gt;
      &lt;/mvt:if&gt;

      &lt;mvt:item name="prod_ctgy_hdft" param="prod_footer" /&gt;

      &lt;/blockquote&gt;

      &lt;/mvt:if&gt; &lt;mvt:comment&gt;End conditional to test for product code&lt;mvt:comment&gt;

      &lt;/td&gt;&lt;/tr&gt;

      &lt;tr&gt;&lt;td align="left" valign="bottom"&gt;
      &lt;mvt:item name="hdft" param="footer" /&gt;
      &lt;/td&gt;&lt;/tr&gt;
   &lt;/table&gt;

&lt;mvt:item name="hdft" param="global_footer" /&gt;
&lt;/mvt:item&gt;
&lt;/html&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tinyqueen.com/ecommerce/restrict-access-to-a-product-page-in-miva-merchant/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
