Integration Guide
From Sweet Tooth Magento Reward Points Wiki
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.
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:
- Create a theme directory: default/<your_theme>
- 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.
- For example, to modify the product view page phtml file,
- 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.
- Catalog listing pages
- Product info pages
- Shopping cart
- One page checkout
- Newsletter sign-up sidebox
- Customer: Account dashboard
- Customer: Store page header
- Customer: Order view for Magento 1.3 stores.
- Magento 1.4+ stores will automatically show points in the customer order history view.
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.
- Modern Theme Tips
- Hellominty Theme Tips
- Customize Global Points String Display
- Display 100 TOKENS instead of 100 TOKEN POINTS, or other points display changes.
- Customize product view - "You will earn X for buying this product"
- How do I remove the send points to a friend feature?
- How do I remove the redemption catalog?
- Customizing and showing the points slider.
- Installing Sweet Tooth Into A Custom Design Package
- Points Currency Troubleshooting
- How To Turn Off The Points Columns In The Shopping Cart


