guy_schneerson's blog

Drupal 7 commerce multi currency site using a price list

Below are my notes taken as I investigate techniques to achieve my Objective,
(This post is not a normalised set of instructions but the process I went through to figure out the best way to handle multiple currencies c objective)
if I get a chance ill create another post with a normalised set of instructions/explanation.


Objective

A custom/optional Drupal teaser in a view using the Views Custom Field module

A client needed implementing a custom teaser/short description for a CCK field (not the body) in his Drupal 6 site. The requirements: if the short description/ teaser is available use it otherwise get the data from the CCK field. It is important to note that Display Suite Drupal module was not available as I think it provides a much better approach (will post about in the future).

I have used the Views Custom Field module , this adds a PHP field that allows us to add PHP code to a view.

Drupal Node actions

Drupal nodes typically have an Edit and View links (rendered as tabs at the top of the node by most themes).
 
Ever wanted to add you own links so you can add custom functionality?
This can be used to automatically populate node data.

The below example will show you how to add a link titled “reviewed” to an article node type, this link will prompt the user for a comment and set two cck field “reviewed” and “note”.

This is not intended as a real example but as an illustration of the how the following techniques can be used as the bases for the creation of powerful work flow.
The techniques covered are
•    hooking into the Drupal menu routing system
•    form creation and validation
•    node manipulation (node_load and node_save)
•    url redirect
 

Drupal Building blocks

- Talk notes from the BAD Monday meetup

By Guy Shneerson of Blue-Bag Ltd (www.blue-bag.com)    Guy@blue-bag.com

Notes form my presentation at the Brighton Area Drupal meetup (BAD monday) on Monday 18/04/2011 at the Skiff

Thanks to Steve for organising the evening and to all that attended