Showing posts with label DRUPAL. Show all posts
Showing posts with label DRUPAL. Show all posts

Thursday, August 19, 2010

What you need in order to get credit card payment working with Ubercart

Issue: Get credit card payments working for Ubercart in DRUPAL

Solution: You need to do the following things:

  1. Buy and install an SSL Certificate (possible sites Verison, GeoTrust, and RapidSSL)
  2. Download and Install Secure Pages module and Secure Pages Hijack Prevention module
  3. Set a folder outside of the DRUPAL root directory that the Ubercart module is allowed to access so it can create the keyfile to encrypt credit card data
If you do steps 1 and 2 you have met the current security standards (PCI DSS). And doing step three satisfies Ubercart's remaining requirement.

You will also need to set the payment gateway for credit cards. As of 8/19/10 I am still looking into what those settings need to be.

- Daniel Casey

Wednesday, August 18, 2010

Granting new roles to DRUPAL users using Ubercart

So you want to great new roles to users using Ubercart...

Welcome to the right place.

Step 1
First you need to make sure you have create the DRUPAL roles you will want to assign.

Step 2
Then you need to make sure you have installed Ubercart module and turned on the following modules in "Module" list:

  • Ubercart - Core (all)
  • Ubercart - Core - Optional (Catalog, Roles)
Step 3
Now you need to create the categories (or for Ubercart, "Classes") of products you will want to create. I knew I had two main types of roles with two sub roles in each main type. So I went to "Store Administration >>> Products >>> Manage Classes" and added two classes for my two main role types.

Doing this creates two new content types within DRUPAL.

Step 4
However before I can create my instances of these new content types I need to add category terms to the Ubercart Catalog, which is ultimately responsible for the grouping and presentation of my products on my website. To do this I need to go to "Content management >>> Taxonomy >>> List" and select the "Add Terms" for the Catalog taxonomy list.

I added two terms, Role Type A and Role Type B.

Step 5
Now you need to create the actual products that a customer will buy and that will grant them a new role.

To create the content go to "Content management >>> Create Content" and select the appropriate content node type. Then fill in the required information, make sure to select the appropriate catalog category and hit save.

You now have a product that you can play with.

Step 6
Click on "Content management >>> Content" to view a list of all your site content. Find your newly created content and select "edit". Find and select the "features" menu item, make sure that "Add new feature" is set to "Role assignment" and hit the "Add" button.

Chose the "SKU" value that corresponds to this product, select the appropriate role that you want granted once a customer purchases this product, make any other setting adjustments and then hit "save feature"

Step 7
Now you should be able to go to your website's catalog, select the product that will grant the role, purchase the product, and upon successful completion of payment you will:

  • Receive an e-mail from the website to your user account e-mail address notifying you of your role addition
  • Be given a new role for the website

Note: it is important to make sure that user can see the catalog to buy the role. Therefore you need to make sure the proper permissions are in place for "view catalog".

- Daniel Casey



Possible SEO modules for SEOing in DRUPAL

While searching through DRUPAL's modules I came across these that could be the bases for SEO functionality. Still need to review them:


It was interesting to see that there are some monthly pay services that offer automated SEO support.

- Daniel Casey

Doing something after a customer has bought a product in Ubercart

To do something in DRUPAL after a customer has bought a product in Ubercart you can use Ubercart's Conditional Action feature.

We were trying to figure out how to:
  • update a interger field (counter) in a node
  • call a print/email function
  • send a user to a certain DRUPAL page
once they bought a product through Ubercart. However we needed to be sure that the user actually bought and paid for the product and that the payment was successful.

The simplest way for us was to create a predicate in Ubercart's Conditional Actions where the tigger was "User Completes Checkout" with the following Conditions:
  • order balance = $0.00
  • AND product type = (we were able to set the appropriate product type we wanted given the resulting action we wanted to take place)
This trigger and conditions combination allows us to then call an action "Run Custom PHP Code" where we were able to write the custom code we wanted to occur after a user has successfully purchased a specific product.

With the right conditions and the custom PHP code we were home.

- Daniel Casey
dcasey@data-that.com
www.data-that.com

Testing PayPal Functionality of Your Ecommerce Site with PayPal Sandbox

If you are developing an e-commerce site you can use PayPal's Sandbox to your site's PayPal functionality.

We were developing a DRUPAL site and using Ubercart. Took about 10 minutes to:

  • create the PayPal sandbox account (do not use the e-mail for existing PayPal account);
  • set up a buyer and a seller;
  • and copy the PayPal Sandbox API credentials into the Ubercart PayPal configuration settings
Then we were able to test the PayPal functionality of our site. It was amazing.


- Daniel Casey