Get a free quote now

Web Development

Web Development - Tips, HowTos, Starting, Utilities, Editors, Languages etc.

[Drupal] How to dynamically update Ubercart cart products count in Drupal?

October 19, 2012 - 16:48

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:

[Drupal] How to add a custom admin settings form to accept variable values in Drupal?

Sometimes the best way to handle variable value changes on a Drupal site, would be with an admin settings form to show/edit the value. For example, while implementing a "send test mail" functionality on a Drupal site, we might want to set the recipient address at testing time. It would be easy to create an admin settings form instead of changing the addresses each time in code.

How to generate filenames from a given string by replacing spaces and special characters using PHP preg_replace()

You might have come across a situation where you need to set the title of the content as the filename for an uploaded image or where you might need to replace the spaces and special characters from the filename of an uploaded file. In such conditions you can use preg_replace. I will show you some example code where the output string will be nice and clean and can be used for setting file names.

[Drupal] How to implement multiple color switches in Drupal theme?

Implementing multiple color mode switching is so simple! In HTML we can easily add the switching color style sheets as alternative style sheets.

But when it comes to Drupal there is a slight change. Here is how we can implement multiple color switches in Drupal theme. We normally include style sheets in .info file and we cannot specify 'alternative stylesheets' just like in HTML. So here we need a module called Drupal 'Styleswitcher'. By enabling this Drupal module you will get the option 'styleswitcher' to add alternative style sheets.

For more details just follow these steps.

[Drupal] How to enable dynamic page titles in a Drupal 6 website?

You might wish to have dynamic page titles in your Drupal 6 website. It is good for a website for the title to change according to the content of a page from an SEO perspective and also for a better content structure. It is very easy to implement dynamic page titles in a Drupal 6 website. Follow the steps below to change the page title according to the url of the page.

[Drupal] How to print a view in a node in Drupal 6 website?

There are many situations where you need to print a view within a node in your Drupal website. A good example would be a portfolio page showcasing the Drupal websites you have done using a view slideshow that showcases screenshots of your work. It is not directly possible to print a view within node just like there is no direct method to print a block within a node. However as Drupal is a very flexible CMS and there are methods to print just about anything and that includes printing a view within a node.

Zyxware releases new Drupal 7 Theme - Lightword - ported from Lightword wordpress theme

We have ported and released another Drupal 7 theme from another popular wordpress theme - Lightword. The Lightword Drupal theme - is now available on Drupal.org. You can read more at the home page for Lightword Drupal theme at our free Drupal themes site. As with our other Drupal themes, the theme is released under GPL 2.

Zyxware releases new Drupal 7 Theme - Hatch - ported from Hatch wordpress theme

We have ported and released another Drupal 7 theme from another popular wordpress theme - Hatch. The Hatch Drupal theme - is now available on Drupal.org. You can read more on the home page for the Hatch Drupal theme at our free Drupal themes site. As with our other Drupal themes, the theme is released under GPL 2.

Zyxware releases new Drupal 7 Theme - Business lite - ported from Business lite wordpress theme

We have ported and released another Drupal 7 theme from another popular wordpress theme - Business lite. The Business lite Drupal theme - is now available on Drupal.org. You can read more at the home page for Business lite Drupal theme at our free Drupal themes site. As with our other Drupal themes, the theme is released under GPL 2.

Zyxware releases new Drupal 7 Theme - Traction - ported from Traction Wordpress theme

We have ported and released another Drupal 7 theme from another popular wordpress theme - Traction. The Traction Drupal theme - is now available on Drupal.org. You can read more at the home page for Traction Drupal theme at our free Drupal themes site. As with our other Drupal themes, the theme is released under GPL 2.

Drupal Checklist - Information to be collected before you migrate your Drupal site from one server to another

When you want to move a Drupal site from one hosting server to another you have to ensure that the site works the same way on the new server as it used to work on the old server. There is no real fool proof way of doing this other than to meticulously document all the custom aspects associated with setting up the site and verifying it on the new server. The following is a checklist of information you have to collect before you move your Drupal site from one server to another.

Pages