Frequently Asked Questions and Troubleshooting in Content Cart (FAQ)
Frequently Asked Questions and Troubleshooting
Answers to the most common questions about working with Content Cart
General Questions
Cart is empty after page reload
Reasons:
- JavaScript is disabled in the browser
- localStorage is blocked by privacy settings
- Cart storage duration (TTL) has expired
- JavaScript errors on the page
Solution:
- Open browser console (F12) and check for JavaScript errors
- Make sure localStorage is accessible (type in console:
localStorage.setItem('test', '1')) - Check plugin settings - "Cart storage time (days)" field
- Clear browser cache and try again
Quick Check
Open browser console and execute:
If you see null - the cart is empty or localStorage is unavailable
"Add to Cart" button is not displayed
Check plugin settings:
- Plugin is activated - System -> Plugins -> Content - Cart (status: enabled)
- Categories are configured correctly:
- Filtering type: "Include" - item must be in selected categories
- Filtering type: "Exclude" - item must NOT be in selected categories
- Areas of application - the correct area is selected (Articles, Category Blog, etc.)
- Custom price field - if you use prices, check:
- "Use price?" option = Yes
- Correct price field ID
- The item has the price field filled in
Debug Mode
Enable Joomla debug mode to view diagnostic messages:
System -> Global Configuration -> System -> System Debug = Yes
Product price displays as 0 or is not displayed
Reasons and solutions:
| Problem | Solution |
|---|---|
| Incorrect price field ID | Check the custom field ID in Content -> Fields |
| Price field not filled in | Open the article and fill in the custom price field |
| Incorrect field type | The field must be of type "Text" with "Integer" or "Floating point number" filter |
| "Use price?" option is disabled | In plugin settings, set "Use price?" = Yes |
Order Issues
Orders are not received via email
Step-by-step diagnostics:
- Check Joomla mail settings:
- System -> Global Configuration -> Server -> Mail
- Send a test email via Users -> Mass Mail
- Check administrator email:
- System -> Global Configuration -> Server -> E-mail
- Make sure the address is entered correctly
- Check spam folder - emails may go to spam
- Check server logs - emails may not be sent due to SMTP errors
Recommendation
Use SMTP for sending mail instead of the standard PHP mail() function. This increases email delivery reliability.
Orders are not saved as articles
Check:
- Category for orders is selected - a category must be specified in the plugin settings
- Category exists - check that the category has not been deleted
- Permissions - make sure Joomla has permissions to create articles
- Article status - new orders are created as unpublished articles
Find created orders: Content -> Articles -> Filter by Category
"Invalid Token" error when submitting an order
Reasons:
- CSRF token expired (user took too long to fill out the form)
- Conflict with page caching
- PHP session issues
Solution:
- Disable caching for the cart page
- Increase PHP session lifetime (session.gc_maxlifetime)
- Ask the user to reload the page and try again
Important!
Do not disable CSRF protection! This is critically important for security.
Display and Styling Issues
Cart styles are not applied or look incorrect
Solutions:
- Check CSS settings:
- Plugin: Enable CSS = Yes
- Module: check style display settings
- Clear Joomla cache:
- System -> Clear Cache
- Clear browser cache (Ctrl+F5)
- Check for template conflicts:
- Use browser inspector (F12) to check CSS
- Template styles may be overriding plugin styles
- Override styles in your template if necessary
Cart module does not update automatically
Check:
- JavaScript loaded - open browser console and check for errors
- No script conflicts - disable other extensions one by one to check
- Asset Manager is working - contentcart.js and contentcart-init.js files should be loaded
- Data-attributes not removed - if you overrode templates, check for all data-attributes
Checking script loading
Open the Network tab in the browser inspector and reload the page. Check if the following files are loaded:
- plg_content_contentcart/js/contentcart.js
- plg_content_contentcart/js/contentcart-init.js
Compatibility Issues
Conflict with caching (JCH Optimize, Cache Cleaner, etc.)
Recommendations:
- Exclude the cart page from caching
- Do not combine or minify Content Cart JS files
- Add to exclusions:
- contentcart.js
- contentcart-init.js
- Do not cache localStorage (if such an option exists)
Conflict with JL No Doubles
Mandatory setting
If you are using the JL No Doubles extension, add to stop words:
This will prevent conflicts when the cart is working
Useful Tips
- Always back up your site before updating an extension
- Test changes on a site copy or in maintenance mode
- Enable Joomla debug mode when problems arise
- Use the browser console (F12) to diagnose JavaScript errors
- Check compatibility with other extensions before installation
- Monitor for updates - they contain fixes and improvements