Fix Move All to Wish List "Invalid Wish List" Error in Miva Merchant

Miva Merchant Modules and Development
There is a bug in current Miva Merchant templates that gives you an "Invalid Wish List" error when a customer without an account tries to move all items in the basket to a wish list.

Fix Move All to Wish List "Invalid Wish List" Error in Miva Merchant

Fix the dreaded "Invalid Wish List" error.


There is a bug in current Miva Merchant templates that gives you an "Invalid Wish List" error when a customer without an account tries to move all items in the basket to a wish list.

by Scot Ranney • June 09, 2021

Miva Merchant, Miva Merchant Storemorph


Scenario: A new customer without an account tries to move all items from their basket into a wish list while on the basket page.

Result: An error "Invalid Wish List" is displayed after they create an account.

This happens because a wish list is not being created when they create their account so there isn't anywhere for the basket items to go and the form for them to create their account is missing actions that are necessary for this to happen.

Fixing it is pretty easy.

Step 1.

Log into your Miva Merchant admin.

Step 2.

Open up the Customer Create (ACAD) page in the User Interface.

Step 3.

Find the form for creating an account. In modern stores the form tag will look something like the code below. The conditionals above the form tag set the URL based on what is going on. In this situation, the url is set to the wish list page because of g.wishlist.

<mvt:if expr="g.Order">
    <mvt:assign name="l.settings:url" value="l.settings:urls:OINF:secure" />
<mvt:elseif expr="g.Redeem">
    <mvt:assign name="l.settings:url" value="l.settings:urls:RGFT:secure" />
<mvt:elseif expr="g.WishList">
    <mvt:assign name="l.settings:url" value="l.settings:urls:WISH:secure" />
<mvt:else>
    <mvt:assign name="l.settings:url" value="l.settings:urls:ACED:secure" />
</mvt:if>

<form id="acad_form" method="post" action="&mvte:url;" autocomplete="off"> <input type="hidden" name="Action" value="ICST" />

If your template code looks different you might have an older or newer or custom setup for wish lists and will need to do something else to get it working.

Step 4.

Replace the last line in the code above, the hidden input, with:

<mvt:if expr="g.wishlist">
    <input type="hidden" name="Action" value="ICST,IWSH,MAWL">
    <input type="hidden" name="WishList_Title" id="WishList_Title" value="My Wish List">
<mvt:else>
    <input type="hidden" name="Action" value="ICST" />
</mvt:if>

What this does is set a name for a new wish list and adds the required action codes to go through the process of moving all items from the basket to the wish list when the customer is in the create a new account flow.


overall rating:
my rating: log in to rate

Miva 10 miva merchant stormorph

The blog posts on Scot's Scripts are made using by Scot's Blogger, a full featured Wordpress replacement Miva Merchant blogging module.