MMv4 KB
 
Allow Customers to Edit Their Subscriptions
  Last Edited - 08/15/2013 3:01pm PDT
  Category Path - Shopping Cart Software Components > Administration Area > Modules > Subscription Products > FAQs & Tutorials
 
can customers edit their own subscriptions?
Is is possible to allow customers to edit the bill date and/or hold status of the products that they're subscribed to?

Yes. It's possible to make these options available to your customers, allowing them to manage the status of their subscriptions themselves.

This article will demonstrate how to update your store's Customer Account Area to allow your customers to edit the bill date, hold status and quantity of each of the products in their subscription. Options to edit each of these three things can be added independently. (For example, you could add the ability for customers to edit their bill date, but keep the quantity non-editable.)

prerequisites
This article assumes that the user has familiarity with:
• Working with HTML code.
• The shopping cart software's template package system.
• Making basic edits to an HTML template.

Here's how to add these options to the Customer Account Area in your online store.
 
Step 1: Add the template (if necessary)

The template that is typically used to display the customer's subscription in their account area is customer_account_1.tpl. If the template package you're working with does not include this template file, follow these steps to add it:
  1. Open the Template Package Sandbox in your store's Administration Area at: [Design > Template Package Sandbox].
  2. In the sandbox, click the Populate Templates link to open the option to add one or more template files to the template package.
  3. In the Populate Templates window, select the checkbox for the customer_account_1.tpl template file.
  4. Click the Populate Selected Templates button. The selected template file will be added to that package.
  5. Close the popup window to return to the Template Package Sandbox. The customer_account_1.tpl file will now be included in the list of templates in the package. The template file is now present and ready for editing in the next step.
 
Step 2: Edit desired QuickCode Tags

Making Bill Date Editable
In the source code of the customer_account_1.tpl template file, locate this QuickCode Tag:
{PRODUCT-BILL-DATE}
and replace it with:
{FIELD-PRODUCT-BILL-DATE}

This will change the display of the subscription's bill date from regular text to a field that can be edited by the customer.


When the date field is clicked, a calendar is displayed
for the user to select the desired date.

Making Hold Status Editable
In the source code of the customer_account_1.tpl template file, locate this QuickCode Tag:
{PRODUCT-ON-HOLD}
and replace it with:
{FIELD-PRODUCT-ON-HOLD}

This will change the display of the subscription's hold status from regular "Yes/No" text to a menu that can be edited by the customer.

Making Quantity Editable
In the source code of the customer_account_1.tpl template file, locate this QuickCode Tag:
{PRODUCT-QUANTITY}
and replace it with:
{FIELD-PRODUCT-QUANTITY}

This will change the display of the product's quantity from regular text to a field that can be edited by the customer.
 
Step 3: Add a submit button to the form

After changing either the bill date, hold status or quantity to editable form fields, be sure to add a submit button to the form that contains them. Without a submit button, the customer won't have any way to save the changes that they make to their subscription.

An example of a submit button is:
<input type="submit" name="submit_1" value="Update Subscription" />

Place this submit button anywhere between the opening and closing <form> tags on the page that contain the list of products that the customer is subscribed to.
 
What happens when a customer makes changes

When a customer uses these fields to make changes to their subscription, those changes will take affect immediately and a record of the change will be saved in the Account Activity report, available in the Reports section of your store's Administration Area.

Here are some examples of how the changes are recorded in the Account Activity report:

examples
Changes to bill date:
Customer SID 123 changed the bill date of their subscription to product SID 10 from 08/30/2014 to 03/11/2015 from within their customer account area.

Changes to hold status:
Customer SID 123 changed the hold status of their subscription to product SID 10 from Y to N from within their customer account area.

Changes to product quantity:
Customer SID 123 changed their subscription to product SID 10 from 100 to 200 units from within their customer account area.



Using the steps listed above, options can be added to your online store's Customer Account Area to allow your customers to edit the bill date, hold status and/or quantity of the products that they are subscribed to.

preventing specific customers from having this access
If you want to provide the ability for most customers to edit these subscriptions fields, with a select few who cannot, the Prevent Specific Customers from Editing Their Subscriptions article will provide the steps to make that customization.
Powered by ModularKB