Drupal Errors

The website encountered an unexpected error. Please try again later
| 2 min read
"The website encountered an unexpected error. Please try again later." this is the most common error encountered by a Drupal developer. Usually, errors are logged by Drupal and the logs can be accessed from Admin->Reports->Recent log messages. But when you get "The website encountered an unexpected error. Please try again later." you cannot even access the reports dashboard.
Zyxware default image4
| 2 min read
A Drupal+Ubercart site with a store where users can purchase your products and no links to indicate the number of products anywhere in your site seems too annoying. It would be nice if there is a way to update the cart count as soon as a product is added to the cart. Here is the code snippet to get the total number of contents in the cart: <?php print count(uc_cart_get_contents()); ?> You can theme the content accordingly to show the contents in style: <?php print count(uc_cart_get_contents()); ?> items