ModularMerchant
Knowledge Base
Shopping Cart Software Online Manual
Working with RMV System Errors
Controlling the RMV System's Behavior with Variables Working with RMV XML Data
Location Home > Shopping Cart Software Components > Administration Area > Modules > Subscription Products > Memberships & Remote Member Validation (RMV) System

Working with RMV System Errors

Modular Merchant's Remote Membership Validation (RMV) system makes it simple to set up a "members-only" area on your website where your customers can log in to access content that they have purchased. When a customer purchases an eligible product, they will automatically gain access to the protected membership area on your website. Anyone who has not purchased that product won't have access to the website!

There are two ways to communicate with the RMV system, simple mode and XML mode. But, whichever method your script is using to communicate with it, the RMV system will return a list of any error messages it encounters when the customer tries to log in.

How are the error messages formatted?

  • When using the simple mode, the errors are returned as a pipe-delimited string.
  • When using the XML mode, the errors are returned in a section of the XML data.
  • However, whether using simple or XML mode, the mm_membership_validator.php file will also create an array named $errors, which will contain all errors returned by the RMV system. This array can make it easier to evaluate and display any error messages encountered, because no matter which system you're using, the format of the $errors array will always be the same.
 
Example of displaying error messages

Here is some PHP code that can be used on your RMA login page to display any errors generated during the login process. This same code will work whether you're using the simple mode or XML mode.

code
<?php
    
if(count($errors) > 0) {
        echo(
'<p>The following errors were encountered when attempting to log in:</p>');
        echo(
implode('<br />'$errors));   
    }
    
?>

The code above does the following things:

  • First, it counts the size of the $errors array, to see if it contains anything. If its size is greater than zero, then we know that there are error messages to be displayed.
  • The implode() function will allow us to display each error message in the array, no matter how many there are. Each error message will be separated by "<br />", which is a line break.

The sample code above provides a simple way to determine whether errors were encountered during the customer's attempt to log in to your website's Membership Area, and then display any error messages that were encountered. This sample is meant to be used as a starting point. You're welcome to expand on this concept to make the error reporting in your own RMV script as elaborate as you like.



— Last Edited - 06/26/2012 10:32am PDT
Related Articles
Create Members-Only Websites: RMV Method

Category: Shopping Cart Software Components
Rank and add a comment to this article
Only logged in users may leave comments and rank articles. Log in to have your say!
  Knowledge Base Home

  QuickCode™ Tag Glossary

  Modular Merchant.com Homepage

Not Logged in.
Either Log in or create a User Account.

Other articles in this category...

Create a Multi-Level RMV Login

Creating Members-Only Websites: Introduction

Troubleshooting RMV installations

Create Members-Only Websites: Simple Method

Create Members-Only Websites: RMV Method

Controlling the RMV System's Behavior with Variables

Working with RMV System Errors

Working with RMV XML Data