Mini-basket Display | ![]() Copyright © 2000, William Weiland |
Overview Displays a brief summary of items currently in each customer's basket as they shop within a MIVA Merchant 5.x store. |
|
Initial Setup You will install two modules (minibask.mvc and cim_log.mvc). Install minibask.mvc 1) In admin, click Add Modules link (fig 2) 2) Click the file upload button 3) Browse to find the minibask.mvc file on your hard drive and upload (fig 3) 4) Click Add to add it to the domain 5) Then in admin click on the plus to the left of Stores 6) Click the plus to the left of your store name 7) Click on the word Utilities under your store (fig 9) 8) Check the box next to the Mini-basket Display 9) Click Update 10) Click Pages link to get to the User Interface (fig 4) 11) Click Items link at the top of the User Interface page (fig 5) 12) Click the Add Item button (fig 6) 13) Enter minibask for the code (fig 8) 14) Look up and scroll to the last page of items and Mini-basket Display should be at the end of the list of items 15) Select Mini-basket Display 16) Click the Add button to assign the module 17) The CIM Activity Log (cim_log.mvc) may already be in your store as it is used by many of our modules. Check under the Modules link to see if it is already there. If it is there, skip to 26. If not, then go to 18. Install cim_log.mvc 18) Again, click Add Modules link 19) Click the file upload button 20) Browse to find the cim_log.mvc file on your hard drive and upload 21) Click Add to add it to the domain 22) Click on the Logging Configuration Link 23) Check the box next to the CIM Activity Log 24) Click Update 25) Skip to 31 Update cim_log.mvc 26) Click Modules link 27) Scroll down to CIM Activity Log and click the link 28) Click the file upload button 29) Browse to find the cim_log.mvc file on your hard drive and upload 30) Click Update to update the module Configure the module 31) Return to the store Utility menu and click the link for Mini-basket Display to enter the configuration settings Editing Requirements 32) Go to the editing requirements section for instructions on placing the mini-basket where you want it to be viewed |
|
Configuration Settings Enter data into the applicable input fields. Title Column Headings Text and Background Characteristics Table Width CSS Options Empty Basket Label Product Column Data Image After Addition Delete Product Checkout Shipping Ship To Address Sort Shipping Recent Visit History Screen Exclusions |
|
Editing Requirements The module is called within specific template screens with render tokens. They are in the format of <mvt:item name="itemcode" param="xxxx" /> The templates are listed at the Pages link. You will edit the template by inserting the token and clicking the Update (fig 7). Important: After adding the render token to a template page, you must click the Items link for that page, scroll down to the item name and assign it to the page (fig 8). These two steps are repeated for every page that a module's render token is used on. This module has two basic layout tokens available <mvt:item name="minibask" param="basket" /> and <mvt:item name="minibask" param="history" /> If you include the recent visit history in the mini-basket, you will not need to use the separate history token. Just use the basket token and place it on each page you want it on. Beginning with mini-basket module version 5.0080, we include advanced template layout control of the mini-basket. It provides template control of each section of the mini-basket. You can keep the sections together or separate them. The module creates default templates that you can edit to change the look and feel of the mini-basket. If you don't want want this level of control, use the basic layout token(s) listed above. If you want template level control, the following tokens are available:
Scroll through the page template list and decide which screens you want to show the mini-basket on. Screens sfnt, prod, and ctgy are primary screens you would expect to find the mini-basket on. There is also a token that can be used on pages to show what the subtotal of a specific item is in the basket. As example, you can display the category page with all the products in that category. For those products that have been added to the basket, you can display the subtotal of each of them next to the listing in the category page. The token is <mvt:item name="minibask" param="individual" /> |
|
Placing the Mini-basket on a static page You can put the basic layout mini-basket (not advanced template layout) on a static html page using an iframe. Add a product. Then return to this static page. Refresh the static page to view the mini-basket update. | |
In your MIVA Merchant 5 admin create a new page called MINI.
The only text that needs to be in that page template is: <html> <body> <mvt:item name="minibask" param="basket" /> </body> </html> If you are unfamiliar with making an iframe on a static page, here is an example of the iframe that is putting the mini-basket in this install doc which you are reading. <iframe src="http://www.pinemporium.com/mm5/merchant.mvc?Store_Code=PE&Screen=MINI" name="mini-basket" frameborder="0" style="border:2px;border-style:solid;border-color:#ffffff;width:250px;height:300px;margin:1px" align="center"> </iframe> |
|
Frequently Asked Questions Q: When I add a product to the shopping basket and click on "Shipping Options?" in the Minibasket window it says "Login in". A: You have set your admin to hide one of the following customer fields (state, country, or zip code). Go to admin:stores and click on the store name to Edit the store. Click the tab for Customer Fields. You need to make sure none of them are hidden as some shipping modules require one, two or three of those elements. Hence, the minibasket requires that all be available if you want to use the shipping preview feature. Q: The recent visit history is not showing up after I visit product pages. A: Make sure you uploaded and assigned the CIM Activity Log per the instructions above. Q: When using the advanced template layout, how can I include a delete link to remove items from the basket? A: You can add a link like <a href="&mvt:global:sessionurl;Screen=PROD&Product_Code=&mvt:item:code;&Store_Code=&mvta:global:Store_Code;&Action=RPRD&Basket_Line=&mvt:item:line_id;"> X</a> Q: How do I sort the shipping options when using the advanced template layout? A: Beginning with version 5.030 of the mini-basket module you can add a second parameter to the token to designate the sort order. <mvt:item name="minibask" param="shipping|cost" /> - sort by cost <mvt:item name="minibask" param="shipping|name" /> - sort by method name <mvt:item name="minibask" param="shipping|code" /> - sort by method code <mvt:item name="minibask" param="shipping|module" /> - sort by module name Q: I just upgraded to Merchant 5.5 and the category column is wider when products are in the minibasket. A: If your category column has suddenly become wider, locate the line <td align="left" valign="top" nowrap> at the beginning of the category column. Remove the nowrap. When Miva added the doctype to every page in Merchant, it forgot to remove the nowrap tag at the top of the category column. With that doctype, everything in the category column is no longer wrapping. "nowrap" is not a legitimate value in the "td" tag with that doctype. It produces unexpected results, e.g. much wider cells. Q: I am using the advanced template layout for the shipping, token <mvt:item name="minibask" param="shipping" /> However, the prompts for state, zip and country do not appear to be editable. A: If you look at the shipping advanced template you will see two occurences of the variable &mvt:minibask:shipping_prompts; I used that token to abstract some fairly complex store morph code. You can replace both instances of that variable with the following store morph code and you will have full edit capability of the shipping prompts section. If you don't want to include state and province inputs (e.g. none of your shipping modules need it) you can remove them and replace them with a single hidden input for Customer_ShipStateSelect with a value of NA. Likewise, if you only ship to the US, you can remove the country input and replace it with a hidden input for Customer_ShipCountry with a value of US. <mvt:if expr="(standardfields:mode_state EQ 'H') OR (standardfields:mode_zip EQ 'H') OR (standardfields:mode_cntry EQ 'H')"> Login First <mvt:exit /> </mvt:if> <form method="post" action="&mvt:global:sessionurl;"> <input type="hidden" name="Store_Code" value="&mvt:Store:code;"> <input type="hidden" name="Action" value="NEW"> <input type="hidden" name="ShowShip" value="1"> <mvt:if expr="g.Screen EQ 'CTGY'"> <input type="hidden" name="Screen" value="CTGY"> <input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;"> <input type="hidden" name="Offset" value="&mvte:global:Offset;"> <mvt:else> <mvt:if expr="g.Screen CIN 'PLST|SRCH|MINI|BASK'"> <input type="hidden" name="Screen" value="&mvte:global:Screen;"> <input type="hidden" name="Offset" value="&mvte:global:Offset;"> <mvt:else> <mvt:if expr="g.Screen EQ 'PROD'"> <input type="hidden" name="Screen" value="PROD"> <input type="hidden" name="Product_Code" value="&mvte:global:Product_Code;"> <mvt:else> <input type="hidden" name="Screen" value="SFNT"> </mvt:if> </mvt:if> </mvt:if> <b> Ship To:</b> <br /> State/Province: <br /> <select name="Customer_ShipStateSelect"> <mvt:foreach iterator="state" array="global:states"> <mvt:if expr="l.settings:state:code EQ g.Customer_ShipStateSelect"> <option value="&mvt:state:code;" selected> &mvte:state:name;</option> <mvt:else> <option value="&mvt:state:code;"> &mvte:state:name;</option> </mvt:if> </mvt:foreach> </select> <br /> Other State/Province:<br /> <input type="text" name="Customer_ShipState" size=15 value="&mvte:global:Customer_ShipState;"> <br /> ZIP/Postal Code:<br /> <input type="text" name="Customer_ShipZip" size=10 value="&mvte:global:Customer_ShipZip;"> <br /> Country:<br /> <select name="Customer_ShipCountry"> <option value=""> Select One</option> <mvt:foreach iterator="country" array="global:storecountries"> <mvt:if expr="l.settings:country:alpha EQ g.Customer_ShipCountry"> <option value="&mvt:country:alpha;" selected> &mvte:country:name;</option> <mvt:else> <mvt:if expr="l.settings:country:alpha EQ g.Store:country"> <option value="&mvt:country:alpha;" selected> &mvte:country:name;</option> <mvt:else> <option value="&mvt:country:alpha;"> &mvte:country:name;</option> </mvt:if> </mvt:if> </mvt:foreach> </select> <br /> <input type="submit" value="Update"> </form> Still have a question? |
Fig 1: Main admin screen
![]() Fig 2: Add a new module ![]() Fig 3: Upload the module to the server ![]() Fig 4: Template page selection ![]() Fig 5: Items list ![]() Fig 6: Add a new item ![]() Fig 7: Editing a template page ![]() Fig 8: Assign a page item to the template ![]() Fig 9: Assigning a module to the store ![]() |