Miva Merchant Ecommerce Blog

Implementing New Features From Miva Merchant Wombat

Posted by Miva Merchant to Design & Development on June 10th, 2010

With the new Miva Merchant (Wombat / PR7) release barely a month old, if you haven’t implemented the new features into your store, here’s a guide to get you started in the right direction.

To ensure that Miva Merchant upgrades won’t change or break the look & feel of your store, all new updates never make any template changes to existing stores. So, in order to take advantage of new features of the software you will have to go in and make the template changes manually. Here’s a little help to smooth the process as you go in and make the changes yourself.

This guide assumes you have already upgraded your store to Miva Merchant 5.5 PR7 (Wombat) through the admin. You can verify this by logging into your admin and looking at the bottom left corner for the update box. It should say “Software Up-To-Date”. If it doesn’t you will need to click that box and run through the updates before you can implement these new features. During this process you will most likely have to upgrade some of your modules to the newest versions so they work with Miva’s new features.

Address Line 2
The ability to show and collect data from a second address line is now available in the new release. All the backend functionality and database changes are automatically implemented when you run the updates from your Miva Merchant admin. Now go in and make template changes to all the pages that collect or show the customer address. This includes the following pages (by default):

OCST, ACAD, ACED, OSEL, OPAY, INVC

Here is an example of the changes that have to be made to OCST. Similar changes will need to be made on the rest of the pages above and full details on this can be found in this forum post. http://extranet.mivamerchant.com/forums/showthread.php?t=100231

Edit page OCST and click customer fields:

replace:

[code lang=“html”]
<mvt:if expr="NOT g.ShipAddress_Invalid">

with:

[code lang=“html”]
<mvt:if expr="NOT g.ShipAddress1_Invalid">

Also replace:

[code lang=“html”]
<input type="text" name="ShipAddress" size=25 value =
"&mvte:global:ShipAddress;">

with:

[code lang=“html”]
<input type="text" name="ShipAddress1" size=25 value =
"&mvte:global:ShipAddress1;"> </mvt:item>
</td></tr>
<tr><td align="left" valign="middle">
<mvt:item name="fonts" param="body_font">
<mvt:if expr="NOT g.ShipAddress2_Invalid">
<i>Address 2 (ex. Suite#, Floor#, Apt.#):</i>
<mvt:else>
<font color="red">
<i>Address 2 (ex. Suite#, Floor#, Apt.#):</i>
</font>
</mvt:if>
</mvt:item>
</td><td align="left" valign="middle">
<mvt:item name="fonts" param="body_font">
<input type="text" name="ShipAddress2" size=25 value =
"&mvte:global:ShipAddress2;">

Order Status / Order History / New Account Landing Page

Miva Merchant now has the ability to show order status and order history to your customers. In order to use these new features you will need to link to the new pages that were automatically created during the upgrade process and format them to match the look and feel of your website.

The new pages created for this are:

ACLN – Customer Account
ORDL – Order: Customer Login
ORDH – Order History List
ORDS – Order Status
ORHL – Lookup Order History

To use these pages you will need to change your LOGN page:

replace:

[code lang=“html”]
<input type="hidden" name="Screen"  value="ACED">

with:

[code lang=“html”]
<input type="hidden" name="Screen"  value="ACLN">

Somewhere in your global header (or if you use the customer link) you will need this code. This will add a sign in link and an order status link:

[code lang=“html”]
<a
href="&mvt:global:secure_sessionurl;Screen=LOGN&Order=0&Store_Code=&mvte:global:Store_Code;">Sign
In</a><br> <a
href="&mvt:global:secure_sessionurl;Screen=ORHL&Store_Code=&mvte:global:Store_Code;">Order
History</a> <br><br>

Inventory at the Attribute Level

Miva Merchant now has a completely new inventory system which allows you to track inventory down to the attribute level (size / color)

In order to implement this you need to make the following changes to your templates.

1. Add the attribute machine item to your PATR (missing product attributes) page in the head tag.

[code lang=“html”]
<head>
        <title>&mvt:store:name;: Missing Product Attributes</title>
        <base href="&mvt:global:basehref;">
        <mvt:item name="head" param="head_tag" />
</head>

with:

[code lang=“html”]
<head>
        <title>&mvt:store:name;: Missing Product Attributes</title>
        <base href="&mvt:global:basehref;">
        <mvt:item name="head" param="head_tag" />
        <mvt:item name="attributemachine" param="head" />
</head>

2. Further down the page make these changes:

replace:

[code lang=“html”]
Attributes in <b>bold</b> are required.

with:

[code lang=“html”]
<mvt:item name="messages" />

Also replace:

[code lang=“html”]
<mvt:item name="buttons" param="Continue" />
</form>

</mvt:item>
</blockquote>

with:

[code lang=“html”]
<mvt:item name="buttons" param="Continue" />
</form>

</mvt:item>
</blockquote>
<mvt:item name="attributemachine" param="body" />

3. We also need to add the new attributemachine item to the PROD (product) page.

replace:

[code lang=“html”]
<head>
        <title>&mvt:store:name;: &mvt:product:name;</title>
        <base href="&mvt:global:basehref;">
        <mvt:item name="prodctgy_meta" param="prod" />
        <mvt:item name="head" param="head_tag" />
</head>

with:

[code lang=“html”]
<head>
        <title>&mvt:store:name;: &mvt:product:name;</title>
        <base href="&mvt:global:basehref;">
        <mvt:item name="prodctgy_meta" param="prod" />
        <mvt:item name="head" param="head_tag" />
        <mvt:item name="attributemachine" param="head" />
</head>

replace:

[code lang=“html”]
<blockquote>
<mvt:item name="prod_ctgy_hdft" param="prod_header" /><br>
<mvt:item name="product_display" />

<mvt:if expr="l.settings:product_count NE 0">

with:

[code lang=“html”]
<blockquote>
<mvt:item name="prod_ctgy_hdft" param="prod_header" /><br>
<mvt:item name="product_display" />
<mvt:item name="attributemachine" param="body" />

<mvt:if expr="l.settings:product_count NE 0">

Adding those two new tokens will allow for the new inventory system to work and hide attributes when a product is out of stock.

If you would like the inventory message to show the number left in stock and also would like the price to update automatically on the page when a more expensive attribute is selected you will have to make these changes as well. We recommend wrapping the inventory message in a div (or span) with an id:

[code lang=“html”]
<div id="inventory-message">
  <mvt:if expr="l.settings:product:inv_active">
  &mvt:product:inv_long;
  </mvt:if>
</div>

Wrap the price with a span tag and element id:

[code lang=“html”]
<span id="price-value">&mvt:product:formatted_price;</span>

There will now be a new inventory tab in the PROD page called Attribute Inventory.

Here you will want to put in the id of the inventory element: in our case it is “inventory-message” and the price element which is “price-value”

This tells Miva Merchant which areas to control when the JavaScript is changing the price and inventory message dynamically as the customer selects different attributes.

Logout Link

Session management was completely re-written in Wombat to be more robust and more secure. Because of this the logout link needs to be a secure page. You will need to change the logout link anywhere the logout link appears (by default it is only on ACED).

replace:

[code lang=“html”]
<a
href="&mvt:global:sessionurl;Action=LOGO&Screen=SFNT&Store_Code=&mvta:global:Store_Code;">Logout</a><br>

with:

[code lang=“html”]
<a
href="&mvt:global:secure_sessionurl;Action=LOGO&Screen=SFNT&Store_Code=&mvta:global:Store_Code;">Logout</a><br>

Hidden Variable of Attribute Count

This variable is no longer used and can be removed from the following pages:

PROD, PATR, UATR, OUS1

This line should be removed from all pages above:

[code lang=“html”]
<input type="hidden" name="Product_Attribute_Count" value="&mvte:global:Product_Attribute_Count;">

All these code changes are documented in more detail in this forum post:

http://extranet.mivamerchant.com/forums/showthread.php?t=100231

Join the Discussion

There are no comments on this article, be the first to leave one!

Leave a Comment

Notify me of follow-up comments?