New Zenner
- Join Date:
- Oct 2025
- Location:
- Albuquerque, NM
- Posts:
- 11
- Plugin Contributions:
- 0
California Prop 65 Warning
I sell stuff that falls under California Prop 65 Warning, so to make my life easy and not having to make sure I add the warning to the right place to every single item I use this code to put the warning.
The code will put the warning on all products in a category and any sub categories. All you need to is change the "102, // example parent category" to the category number that you want the warning to be displayed in. You can see it in action on my site if you want to see how it looks https://shop.nmtaserandmore.com or I have included a screen shot.
To place this code put it at
includes/templates/Your_template/tpl_product_info_display.php
<div class="prop65-warning" style="margin:15px 0; padding:12px; border:1px solid #cc0000; background:#fff8f8; font-size:14px; line-height:1.5;">
<strong>⚠ WARNING:</strong>
This product can expose you to chemicals including lead and other substances known to the State of California to cause cancer and birth defects or other reproductive harm.
For more information visit
<a href="https://www.P65Warnings.ca.gov" target="_blank" rel="noopener noreferrer">www.P65Warnings.ca.gov</a>.
</div>
<?php
}
?>