Suppose your Drupal projects handles products which can be purchased through online. And you are using Ubercart PayPal and Ubercart Payment modules to handle payments related to purchase. Either registerd or non registered user can buy the product. User can use paypal through two ways. "Can purchase through sandbox environment or Can purchase using credit card". So a tester can test the paypal functionality using both these ways. Here I am going to explain how can you test the purchasing functionality through Sandbox.
Drupal Technical
This is a simple and easy way to theme an ubercart shopping cart block in a Drupal site. When we enable ubercart in our Drupal website we will get a block called shopping cart. This block will show us number of items in which are added to cart. When we use our own theme this block may not looks good, but we can theme it in a very easy manner. This article can be useful if you want to theme shopping cart block in Drupal.
Owl carousel, Is a responsive image or content carousel with various customization option. Views has an owl carousel plugin to making it easy for the integration of owl carousel with Drupal.
We had faced an issue with invoice sent by authorize.net, for anonymous purchase a product in ubercart in one of our Drupal 7 site. After the purchase is completed, the user receives an invoice from authorize.net. But if the user is anonymous, the invoice's customer id is set as zero. We had sorted out the issue and fixed it. Read on to know how to solve this problem
While working on Drupal sites, we could come across a requirement to show the contents aggregated from different domains. The content could be a blog of the site, list of recent articles and comments etc. For Aggregating contents into Drupal, feeds system is used. By aggregating the contents we can show the combined collection of data/content from different Drupal sites on one single domain.
Drupal stands apart from open-source content management systems, such as Joomla and WordPress, due to various reasons. What gives Drupal a far greater edge over other content management systems is the the development of tightly configured sites that are scalable and secure. Moreover, the Drupal modules are simple and iterative, thus easing the burden of administering Drupal.
Drupal views help in querying and displaying information fast and it becomes so hard when it comes to custom table fields to be accessed in the view arguments. To help Drupal views understand the exposure of modules and custom table data, we use hook_views_data().
Drupal 7 has a contributed module "Nodequeue" which allows users to collect nodes in an arbitrarily ordered list. It provides a simple drag-and-drop interface to manually order any queue. If you want to create a node to the nodequeue programmatically then you need to read this article. For creating you need to have two things: node id $nid and the queue name queue_name. Here how it can done, we firstly load the nodequeue by name and then add the node to the queue using function nodequeue_subqueue_add. Below code snippets adds a node to the queue.
Drupal 7 provides a flexible supports to create a Taxonomy. There is powerful core module called Taxonomy which allows us to create, manage and apply vocabularies. In Drupal, the terms are gathered within "vocabularies". Taxonomy has a ability to add taxonomy fields to vocabularies and terms. When we come across inserting the taxonomy terms programmatically, we will need to add fields values to that taxonomy term. So In this section we are going to create a custom field values to the taxonomy terms. Below is the code snippet, that is the array structure to create field values.
Drupal provides creating an image style in different ways through configuration. Adding a watermark to the image to provide its originality is a must thing needed by the clients. While running in to this we have found out a solution to add a watermark to the image styles.
Suppose you website sells products. Both anonymous user and registered user will be able to purchase products. And the registration process takes place in two ways.
Normal registration process.
When an anonymous user first time purchase a product, registration process will take place automatically.
To change the group manager of a group usually we search into option as "change group manager" but we dont find it anywhere. Because there is no option within Organic Groups holding such a decription. So we need to think futher and deeper into the concepts of organic groups. This articles tells you simple method to change the group manager of the group.
The article explain how to make mp3 files directly streaming on your website without users having to download the file. To do so I am using contributed module from Drupal that is Soundmanager2 module. It provides the Drupal interaction with the soundmanager2 libraries containing three default player style. Here I am just creating a content type for uploading the mp3 files. By creating a node to this content type we can upload the files and displaying mp3 player will be done by soundmanager2 libraries. For integrating MP3 file in your Drupal 7 , you need download modules and the libraries.
In Drupal 6, the configuration of vocabulary itself has an option to specify the content types that requires this vocabulary. There is only global settings for the vocabulary. If we set the vocabulary as multiple select, it will apply to all of the content types to which it belongs. We can not set this field as multiple select in one content type and single select in others.
One of our Drupal clients was using banner ads for their affiliates to bring in more members. Unfortunately these banner ads were placed inside the content with a page (A Drupal node) and the embed code for the banner ads generated using PHP code by enabling the PHP filter. If you have spent time in the Drupal world you would be knowing that enabling the PHP filter within the content area is a big security vulnerability. So the alternative was to use tokens. Read on to know how to replace a token within the content area of a node in Drupal.
In Drupal we have got a module namely Registration with Profile , to bring an option to upload the profile picture. But here let us gather some information on how this can be brought programmatically.
So let's start up with Form API.
Following are the steps to get the profile picture uploading option in registration form.
Step 1 : In registration form alter :
There are certain cases were we need a copy of our database. In this case we need to export the database in the sql format. This is a simple process and can done in few steps. Certain cases we need full database for example if we need a backup copy of database we need to export the full database and in cases we need to export only certain table from the database. Both are possible. Both the exporting steps are given below
Sometimes the best way to handle variable values on a Drupal site would be with an admin settings form. For example if you want to store different sizes of the same image which has to be displayed in a page, using admin settings form may be more useful as you have the option to change the image whenever desired.
[Drupal] How to display Affiliate links on page load for the contents using Category as reference id
In my previouds article "How to display Affiliate Links on page load for the contents using Category as reference id-Part 1?" I have provided a brief intrduction on affliate links and what all configurations we must do. In this article I will be explaining how to generate Affiliate Link on page load using hook_nodeapi().
Many of the sites now a days are designed to play video in pop-up window.This can be implemented using color box module and adding link to the video url in anchor tag with class as colorbox-load.Read on to know how to implement this.