Glossary Item Box
Overview
The Related Products feature allows you to associated related products to a product. Those related products can then be shown to your customer when they view the product's page in your store.
With the optional add-on products feature, your customers can add a product and one or more related products to the cart with a single operation.
Assigning Related Products
Deciding Where to Show Related Products
There are two places you can show related products by default.
Below Your Product Description
By default, related products should appear automatically after you assign them to a product (see above). The default location for this is below the product's description and pricing:
You should not normally have to do anything to make this happen, other than assigning the related products as described above.
![]() |
Not working? If you have assigned related products to a product, and don't see them in this location, you may need to add this to your product_detail.tpl.php template file:
For more info on how to modify template files, see this topic. |
When using this method, you can control how many related products appear in total, how many appear per row, and whether or not they appear in random order. You can find settings for that on the Visual Settings page of the control panel, inside the Products (Related) fieldset.
Related Products Navigation Block
If you prefer, you can show related products using the Related Products navigation block:
To do so, add the built-in Related Products navigation block to your storefront.
Controlling How Related Products Appear in the Nav Block
Related products are displayed in the nav block via this code that appears in the Content field on the Related Products nav block record in the control panel:
<?php
print sc_related_products(false,0,1,0,4);
?>
By default, up to a maximum of 4 related products will appear. To change that number, just change the last parameter in the nav block's Content field from a 4 as you see above to the number you wish to display. To display up to 10 related products, the code would look like this:
<?php
print sc_related_products(false,0,1,0,10);
?>
The 4th parameter in this function can be used to change the sort order. When set to 0 as shown above, related products appear in the order they are assigned on the product's record. If you would prefer to show products in a random order, change this 0 to a 1:
<?php
print sc_related_products(false,0,1,1,10);
?>
The code above will display up to 10 related products. It will choose them at random from the list of related products that you've assigned to the product being viewed.
Add-On Products
Related products can be configured to be offered as "add-on products". Add-on products act like options for another product. For example, you may have a phone product and wish to offer other products as add-ons, such as chargers, cases, etc...
You can optionally add a quantity field for the add-ons. If you don't turn on the quantity fields, (which is the default behavior), a checkbox will appear to add the add-on to the cart as shown above.
It works with the QuickTotal module, which will display a grand total below the Add to Cart button. When you add the parent product to the cart, it looks like this:
By default, no thumbnails are shown during checkout (they can optionally be turned on). When clicking the modify button, the customer is taken back to the parent product record to modify the item and its add-ons.
When you remove the parent product from the cart, the add-ons are also removed.
How Add-On Products Differ from Product Options
Squirrelcart has very robust product option features (see Managing Your Store > Products > Product Options) which can be used to gather customization info for a product, such as size, color, etc... Options can also be used to offer extras for a product, with optional costs.
Add-On Products work very much like product options, with one important distinction - the add-on products are also sold separately and have their own product records.
If you wish to offer a product for sale and also would like to offer it as an add-on for another product, use the Add-On Products feature.
If you wish to offer an option for a product that does not also need to be sold on its own and does not require it's own product page, use our product option feature itself.
Because add-on products are also regular products, they can also have options themselves. For example, you may have a computer product and want to offer a hard drive as an add-on. That hard drive could have a capacity option to choose the size of the drive.
Enabling Add-On Products for a Single Parent Product
Enabling Add-On Products Storewide
You can make all related products act as add-on products, storewide.
Specifying a Default Quantity
To specify a default quantity for an add-on, use the Add-On Default Qty field on the add-on product's record.
© 2001-2017 Lighthouse Development. All Rights Reserved.