MMv4 KB
 
Variables that can be used in Storefront URLs
  Last Edited - 01/30/2013 3:57pm PST
  Category Path - Developer's Guide > Variables Structure
 
The purpose of this article is to provide a list of variables that can be included in links used on various pages of your storefront to perform special actions.

Each of the variables listed below can be used on any storefront page, unless otherwise specified.

Each of the variables listed below can be used together in the same URL and in any order, unless otherwise specified.

sample storefront url
In each of the examples below, the default URL of http://www.example.com is used.

When using these variables in your own store, change this to the URL that hosts your shopping cart. If your store is located in a subdirectory on your website, be sure to include that as well.



Action: Apply the specified coupon to the current shopping session.
Variable: coupon_codes
Value: Comma separated list of coupon codes of the coupon events to be applied
Example: http://www.example.com?coupon_codes=DISCOUNT13,123SAVE
Result: The event which has the coupon code DISCOUNT13 and the event which has the coupon code 123SAVE will be applied to the current open order, overwriting any other coupons that may have already been applied to the shopping session. If coupon usage is restricted to one coupon per order in the Event Engine module settings, only the first coupon code in the list will be applied. Any inactive events will not be applied.



Action: Empty the customer's basket
Variable: empty
Value: Y
Example: http://www.example.com?empty=Y
Result: All products will be removed from the customer's order. This will be the first action taken, so other variables can also be included in the URL to then add products to the customer's order.



Action: Log a customer out.
Variable: logout
Value: Y
Example: http://www.example.com?logout=Y
Result: The customer will be logged out of the storefront's Customer Account, Affiliate Account and Digital Object Download areas. The customer must log back in to access these areas again.



Action: Set the user's Template Package back to the store's live one.
Variable: reset_template_package
Value: Y
Example: http://www.example.com?reset_template_package=Y
Result: The Template Package applied to the user's browsing session will be reset back to the store's live one.



Action: Assign a Template Package to the user's browsing session.
Variable: template_package
Value: Name of desired Template Package
Example: http://www.example.com?template_package=hot_sauce
Result: Instead of the store's live Template Package, one titled hot_sauce will be applied to the storefront for that specific browsing session. It will remain in affect until either it is changed by another variable, or until the user closes their web browser.

An in-depth tutorial for using the template_package variable is also available.



Action: Assign an affiliate Tracking ID number to a user's shopping sesison.
Variable: tid
Value: System ID number of an affiliate Tracking ID
Example: http://www.example.com?tid=123
Result: The specified affiliate's Tracking ID number will become associated with user's shopping session. Any purchase the user makes will be associated with the Tracking ID number, potentially earning a commission for the affiliate that owns it.
Powered by ModularKB