Integration Guide

From Sweet Tooth Magento Reward Points Wiki

Jump to: navigation, search

For Sweet Tooth to be usable, its display components must be available to customers who are visiting the front-end. To offer maximum flexibility, store administrators can decide on where and how these components are visible in the front-end through injection of some code into Magento's design files. The integration guide will walk you through this process. It's worth mentioning that as of Sweet Tooth 1.5, we offer a standard way to have the display components integrated into the front-end without having to inject any code into the files. This doesn't offer a lot of flexibility, but if you'd like to get Sweet Tooth up and running as fast as possible, this feature can come in very handy. The screenshot below shows where you can find these settings:

Continue reading to learn how to carry through the manual integration.

File:Integrated content section in config.png


To do a manual integration, as mentioned before, some code will have to be injected into Magento's design files. We provide an example in folder: app/design/frontend/default/default_sweet_tooth/template/ here you can see how the code might look after it has been incorporated into a default Magento template system (default/default). This is not for the blank template, it is just an example!.

Note: The listed line number match with unchanged Magento design files and perhaps a version different then yours. If you have modified your store's design, the line number may not match, but please use them as a general guide.

If you're having any problems you may want to check out the Integration Troubleshooting section.


Contents

Before Making Any Modifications to Your Templates

Warning: Do not modify files in default/default. Not only will Magento overwrite these files during an update, upgrades for Sweet Tooth also overwrites these files. Instead, follow these instructions:

  1. Create a theme directory: default/<your_theme>
  2. Copy ONLY the files you wish to modify into the exact same folder structure as they appear in the default/default directory.
    For example, to modify the product view page phtml file,
    copy>> app/design/frontend/<your_package>/default/template/catalog/product/view.phtml
    to>> app/design/frontend/<your_package>/<your_theme>/template/catalog/product/view.phtml.
  3. Set your theme in Magento by going to back-end > System > Configuration > Design in the admin main menu.

If Magento cannot find the phtml files in the default/<your_theme> directory it will automatically check the default/default directory. That's why you can transfer over only the files you wish to modify to your target theme and leave the ones you didn't modify in the default/default directory. If you have a custom theme, remember to transfer over default design files to your custom package.

Store Integration Instructions

In order to gain the full benefit of your Sweet Tooth rewards program on your store, we have added these steps that will integrate certain aspects into your own store's custom design. You don't have to do all of these. Instead, we recommend that you only do the ones you need/want.


Additional Resources Guides

Summary of templates modified for integration

Template path hints

An useful tool that many Magento designers use is template path hints. It is available from the back-end. It helps you discover what phtml file is loading in each template block. This can help show you what file needs to be customized moved or replaced.


Other Design Guides

You might find these unrelated design guides also helpful for setting up the integrated design in your store.

Personal tools