ModularMerchant
Knowledge Base
Shopping Cart Software Online Manual
Display a message if a customer has already purchased a product
Disabling featured product display Display a slideshow on any store page
Location Home > Shopping Cart Software Components > Administration Area > Design > FAQs & Tutorials

Display a message if a customer has already purchased a product

Current versions of most of the stock template packages include a feature to display a message to let customers know if they have previously purchased a product, are currently subscribed to a product, or have already added the product to the basket. This feature is implemented through three sets of QuickCode Tags that may also be added to older template packages and custom template packages, to provide the same functionality.
 
Display a message if a customer has already added the product to the basket

To display a message if a customer has already added the product to the basket, use the following set of QuickCode Tags:
{IF-PRODUCT-IN-BASKET-BEGIN}
{PRODUCT-IN-BASKET-SUMMARY}
{IF-PRODUCT-IN-BASKET-END}

These QuickCode Tags are primarily used in the product template (product.tpl), but may also be used in templates for pages that display lists of products, as long as they are inserted in the appropriate block.

For instance, to use these QuickCode Tags in the category template (category.tpl), they would need to be inserted between {CATEGORY-RESULTS-BLOCK-BEGIN} and {CATEGORY-RESULTS-BLOCK-END}.
 
Display a message if a customer has previously purchased the product

To display a message if a customer has previously purchased the product, use the following set of QuickCode Tags:
{IF-PRODUCT-IN-ORDER-HISTORY-BEGIN}
{PRODUCT-IN-ORDER-HISTORY-SUMMARY}
{IF-PRODUCT-IN-ORDER-HISTORY-END}

These QuickCode Tags are primarily used in the product template (product.tpl), but may also be used in templates for pages that display lists of products, as long as they are inserted in the appropriate block.

For instance, to use these QuickCode Tags in the vendor template (vendor.tpl), they would need to be inserted between {VENDOR-RESULTS-BLOCK-BEGIN} and {VENDOR-RESULTS-BLOCK-END}.

login required
This set of order history summary QuickCode Tags is only able to display a message if the customer is currently logged into the customer account associated with the previous purchase of the product. If the customer is not logged into a customer account at all, or has since created a different customer account, the shopping cart will not be able to associate the previous purchase of the product with the current visitor, to display a message.
 
Display a message if a customer is currently subscribed to the product

To display a message if a customer is currently subscribed to the product, use the following set of QuickCode Tags:
{IF-PRODUCT-IN-SUBSCRIPTION-BEGIN}
{PRODUCT-IN-SUBSCRIPTION-SUMMARY}
{IF-PRODUCT-IN-SUBSCRIPTION-END}

These QuickCode Tags are primarily used in the product template (product.tpl), but may also be used in templates for pages that display lists of products, as long as they are inserted in the appropriate block.

For instance, to use these QuickCode Tags in the store home page template (index.tpl), they would need to be inserted between {FEATURED-PRODUCT-BLOCK-BEGIN} and {FEATURED-PRODUCT-BLOCK-END}.

login required
This set of subscription summary QuickCode Tags is only able to display a message if the customer is currently logged into the customer account associated with the subscription to the product. If the customer is not logged into a customer account at all, or has since created a different customer account, the shopping cart will not be able to associate the subscription to the product with the current visitor, to display a message.
 
Customizing the appearance of the messages

The "summary" QuickCode Tag may be wrapped in HTML code to allow CSS styles to be applied. 

example
The "summary" QuickCode Tag is wrapped in a span that has a class assigned to it, so that CSS rules for that class may be added to the template package's stylesheet, customizing the appearance of the "product in basket" message.

 


— Last Edited - 01/9/2014 9:14am PST
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...

Add "Search by Price" links to the storefront

Add a "Terms of Service" agreement to a store page

Add a favicon

Add images to an email template

Adding a Company Name field to the storefront

Can QuickCode Tags Be Used in PHP Statements?

Can QuickCode Tags be used on non-store webpages?

Common customizations for the Order Receipt email

Copy a template package

Create a custom version of any QuickCode Tag

Create reusable headers/footer with Custom QuickCode Tags

Creating a Customer Registration Form

Creating templates with content viewable only by specific Customer Groups

Customize the category template to display subcategories in a grid

Customize the navigation header of a responsive template

Customize the navigation header of a responsive template

Customize the tabbed content area of a responsive product template

Disabling featured product display

Display a message if a customer has already purchased a product

Display a slideshow on any store page

Display sale prices in red text

Have your store match a website that links to it

Introduction to editing responsive template packages

Link your company logo to a different website

List of available Templates for use in Template Packages

Playing Flash video instead of downloading it

Require service agreement when a specific product is purchased

The difference between templates and web pages

Troubleshooting Missing Images

Untranslated Red QuickCode Tags

Using "Add to Cart" links on your website.

Using comments in Custom QuickCode Tags

Using the Custom Webpage Editor to add links to your Storefront

Your storefront on smartphones & mobile devices

Creating Template Packages: Part 1 of 4

Creating Template Packages: Part 2 of 4

Creating Template Packages: Part 3 of 4

Creating Template Packages: Part 4 of 4