Miva
Install the Miva module for Credit Key
Installing the Module on your Domain
- The name of the module is creditkey.mvc. Extract it from the ZIP file provided, if necessary.
- Log into your Miva Merchant administration backend (for example, https://www.domain.com/mm5/admin.mvc).
- Navigate to Settings > Domain Settings.
- Click on the Modules tab.
- Click the Add Module button.
- On the next screen, labeled "Add Module", click the Upload button.
- In the popup window, click the Choose File button (depending on your browser, the button label may be different).
- Navigate to the creditkey.mvc file on your hard drive and select it.
- Click the Upload button on the popup window.
- The popup window will disappear, returning you to the Add Module screen. Click the Add button near the top right.
Assigning the Module to your Store
- Navigate to Settings > Payment Settings.
- Click the ... button in the upper right, then choose Add/Remove Modules.
- Locate the Credit Key module. Click the Install button inside its box.
- If you have multiple stores on your domain, repeat steps 1–3 above for each store that you want to integrate with Credit Key.
Configuring the Module
- Go to Settings > Payment Settings and then click the Credit Key tab. It may be located under the "More" tab.
- Choose Staging or Production for the environment you want to use.
- Enter your public and private keys in the appropriate boxes.
- If desired, enter the minimum amounts at which promotional messaging will be displayed on the product detail page (PROD), the basket page (BASK) and during checkout (OSEL).
- Choose an alignment for the promotional messaging: right, left, or centered. This only affects the basket (BASK) page.
- Click the "Update" button in the top right to save your settings.
Create the User Interface Item
This should have been done for you when you installed the module. If not, perform the steps below.
- Click User Interface in the left column.
- Click Templates under the Advanced header in the middle column.
- Click on the Items tab.
- Click the "Add Item" button
- In the "Code" box, enter "creditkey".
- Click the "Look Up" button to find the Credit Key module.
- Click the "Add" button to create the item.
Assign the Item to the Pages
This should have been done for you when you installed the module. If not, perform the steps below.
- Click User Interface in the left column.
- Click Templates under the Advanced header in the middle column.
- Click the Items tab
- Search the Items list for an item with the code "creditkey"
- Click that item to edit it (click under the "Module" column)
- Click the "Pages" tab
- Assign the item to the pages "PROD" and "BASK" using the toggles in the "Assigned" column.
- If you do not see these pages, click the Filters dropdown in the upper right and choose "Show All".
Editing Placement of the Promotional Messaging
By default, the code for promotional messaging should have been added to the PROD and BASK pages on your store. These are controlled by placing the following tag in your store’s PROD and BASK page templates:
<mvt:item name="creditkey" param="container" />To check whether this was added, or to move the tag to a new location on the page, perform the following steps:
- Click User Interface in the left column
- Click Templates under the Advanced header in the middle column.
- Search the page list for "PROD"
- Click "Product Display" – the page with "PROD" as its code
- Search the "Product Display Layout" template (not the main template) for the above tag
- If it's not there, add it. The suggested location is above the add to cart button
- If you wish to move the tag, you can delete its original location and add it in a new location. The promotional graphic will appear wherever you have added the tag
Editing Placement of the Promotional Messaging on BASK Page
Nearly identical steps are used for the basket page:
- Click User Interface in the left column
- Click Templates under the Advanced header in the middle column.
- Search the page list for "BASK"
- Click "Basket Contents" – the page with "BASK" as its code
- Search the "Basket Contents" template (not the main template) for the above tag
- If it's not there, add it. The suggested location is above the checkout button
- If you wish to move the tag, you can delete its original location and add it in a new location. The promotional graphic will appear wherever you have added the tag
Editing Placement of the Promotional Messaging on PROD Page With Page Builder
More recent installations of the Shadows ReadyTheme have the PROD page controlled by Page Builder instead of directly in the template. If this is true on your site, you must take additional steps to get the CreditKey messaging to appear.
First, make sure you are using version 10.06 or newer of the CreditKey module. Then complete the steps below.
Add the JavaScript Resource
- In the Miva admin, go to User Interface > Resources. Click the "JavaScript Resources" tab.
- Click the Add JavaScript Resource button
- In the box labelled Code, enter creditkey
- Change the Type dropdown to External File
- In the box labelled File Path, enter this value: https://unpkg.com/@credit-key/creditkey-js@latest/umd/creditkey-js.js
- Toggle off Global, but leave Active toggled on
- Click the Add button
- The creditkey resource should now appear in the list. Check the box next to it.
- Click the "…" button and choose Pages. Find PROD in the list and toggle it on. Then click the Close button
- Click the "…" button a second time and choose Resource Groups. Find footer_js in the list and toggle it on. Then click the Close button
Add the Fragment
- In the left column, under User Interface in the Advanced section, click Templates
- On the right side, click the tab called Fragments
- Click the Add Fragment button
- In the box labelled Name, enter CreditKey Marketing. In the box labelled Code, enter creditkey_marketing. Leave Start With set to Blank Fragment, and then click the Add Fragment button.
- On the next screen, check the box next to Public. Then enter the following code into the template box:
<mvt:item name="creditkey" param="container|PROD" /> - Then click the Update button.
- Click the Items tab. In the list on the page, toggle the "creditkey" item to on.
Configure Page Builder
- Next, under User Interface in the left column, click Page Builder
- In the list, find "PROD" and you'll see on the same line that "Product Display" is a link. Click that link.
- Change the dropdown to "Sequence (sequence)" if it defaults to something else.
- Click Product Details
- Click Main Content
- Click Details. You should now see a list of "Details" starting with code, name, prices, etc.
- Click the link Add Detail: Level 3. It will add a new "Detail Name Here" at the bottom of the list.
- Click Detail Name Here. Change the Detail Name to something descriptive, such as "CreditKey Marketing"
- In the Type dropdown, select Feature: Fragment
- In the box labelled Fragment, enter creditkey_marketing, or use the Look Up button to find the fragment you added earlier.
- If you wish to change the location of the widget, click the left arrow icon near the top of the left column, beside the words "Detail: Level 3", to return to the previous page.
- In the list of details, it should show CreditKey Marketing at the bottom. Use the button with 6 dots to drag it to the desired place in the list.
- Click the Save button in the top right corner, Then you can close out of Page Builder by clicking the "X" in the top right corner.
Upgrading the Module on your Domain
The process to upgrade the Credit Key module on your store is similar to the installation process.
- Extract creditkey.mvc from the ZIP file provided.
- Log into your Miva Merchant administration backend (for example, https://www.domain.com/mm5/admin.mvc)
- Navigate to Settings > Domain Settings.
- Click on the Modules tab
- In the box labeled "Search Modules...", type in Credit Key and then click the Enter button.
- Click the entry in the table, in the Name column, where it says "Credit Key"
- On the next screen, click the "Files" tab.
- Click the "Upload" button.
- In the popup window, click the "Choose File" button (depending on your browser, the button label may be different.)
- Navigate to the new version of creditkey.mvc file on your hard drive and select it.
- Check the "Overwrite" checkbox.
- Click the "Upload" button on the popup window.
- The popup window will disappear, returning you to the Edit Module screen. Click the "Update" button near the top right.
Uninstalling the Module from your Store/Domain
Before you can uninstall the module, you will need to archive or delete any orders that use it. See https://docs.miva.com/reference-guide/regular-archiving for more information about archiving orders.
If you don't want to delete or archive orders, you won't be able to delete the module, but you can deactivate it altogether or disable the payment method in Payment Method Settings. See https://docs.miva.com/how-to-guides/how-to-payment-method-rules
Once that has been done, complete the following steps.
- Click User Interface
- Click Templates under the Advanced header in the middle column.
- Choose the Items tab
- Search for "creditkey". In the Code column, click "Credit Key".
- Click the Pages tab. Unassign the item from all pages to which it's assigned.
- Click the Item tab. Click the "…" button and choose Delete Item from the dropdown.
- Go to Settings > Modules
- Locate the "Credit Key" box, click the "…" button within its box, and choose "Uninstall". If you receive any errors, make sure you have completed the steps above.
- Repeat above steps for additional stores, if you have more than one on your domain.
- Go to Settings > Domain Settings.
- Click the Modules tab.
- In the "Search Modules..." box, type in Credit Key and click the Enter button
- Click the entry in the table, in the Name column, where it says "Credit Key"
- In the upper right of the next screen, click the "..." button, and choose "Delete Module"
- If you wish to leave the creditkey.mvc file on your server, uncheck the "Delete module file /mm5/5.00/modules/payment/creditkey.mvc" checkbox. Otherwise, leave it checked.
- Click the orange "Delete" button in the upper right.
Questions? Contact Credit Key Support
