need support, trying to implement ajax in a view

Hi, this is what im trying to do:

I made an inventory management, that was easy, I just did the content type product with its respective fields of cuantity, and others.
In a view I did 2 tables the normal stock and the critic stock, where I show the name of the product, the quantity and 2 buttons for each product, the button (+) and the button (-) those buttons are for add or remove products of the stock, you understand, this is an example

Get all nodes attached to a vocabulary,Get all nodes directly attached with a term id,Get all nodes belong to a term id recursively(parent-child taxonomy terms)

<?php

/**
* function to get all term ids inside a vocab in a flat array
* No matter if vocab consists of hierarichal order of terms,you will get all term ids in a flat array.
* @param
* $vocab_machine_name takes vocabulary machine name as parameter.
* @return
* $tids return array of tids in a flat array format
*/
function get_taxonomy_term_ids_inside_vocab($vocab_machine_name) {
$vocab = taxonomy_vocabulary_machine_name_load($vocab_machine_name);
if (is_object($vocab)) {
$term_tree = taxonomy_get_tree($vocab->vid);
if (is_array($term_tree) && !empty($term_tree)) {
foreach ($term_tree as $key => $value) {
$tids[] = $value->tid;
}
} if (empty($term_tree)) {
$tids = array();
}
} else
return "No Vocab Found with the given name";

return ($tids);
}

/**
* function to get all the node ids directly mapped to the given taxonomy terms.
* Returns Flat array of node ids belong to the given term ids.
* @param
* $tid takes term id can be a single term or array of terms.
* @return
* $nid/$nids returns node ids array or sinly node id directly mapped to the given taxonomy term.
*/
function get_nodes_directly_mapped_to_term($tid) {
if (is_array($tid) && !empty($tid)) {
foreach ($tid as $key => $value) {
$nids[] = taxonomy_select_nodes($value);

Panels 3: How to use variants and views to create node displays. (D7)

You can view your nodes in a custom layout using Panels without having to edit a node template file or use modules such as Content template.

The following example will create a product-page, displaying some of the products content-fields.

Using Panels we will build the node to display in node column.

Requirements for this example

I will asume you have an understanding of the following 3 modules:

Preparation

  • Create a new node type called Product.
    Create Product Type
  • Add the following fields:
  • Product-Image: Use one of the various CCK image field widgets.
    Product Type fIelds
  • Create an Imagecache preset to show the product-thumbnail in a suitable size.
  • Now create some Product content.

Creating a view to display product-fields

  • Create a View that will show node-items.
    Create View
  • Add Field "Product Image".
  • Add Filter-Criteria "Content: Type(=Product)"

Nodeblock: Use nodes as blocks

How to use Nodeblock:

  1. Install the Nodeblock module the usual way at admin/build/modules.(D6) and /admin/modules. (D7)
  2. Edit the content type that you wish to use as a block. In most situations you would create a simple content type named Block to use as your custom blocks, but you shouldn't feel limited to just this usage. Any type of node, using any type of field may be used as a nodeblock.
  3. Select the Enabled radio button on the Available as block field.
  4. Create block nodes and watch them populate your block list!

Using settings to change display for specific blocks on their block configuration pages:

  1. You can get rid of node links like comment, edit, etc. by unchecking that box under "Block specific settings"
  2. You can remove the title by placing <none> in the title box

Using settings to change display for all blocks of a certain node type :

  1. To remove post information, the "submitted by" field, uncheck the box for that node type under "display post information on:" at admin/build/themes/settings

How to theme your node blocks:

Content, the Drupal Way

Organizing content in Drupal can be very liberating — or very frustrating, depending on what methods you're used to using.

Almost all information in Drupal is stored as a 'node', the basic unit of content. By default, there is no hierarchy or structure imposed on these nodes: they do not reside in specific 'sections' of your site, and different kinds of nodes (images, blog posts, news articles, etc.) are not automatically grouped or sorted into different groups. Rather than hard-coding specific hierarchies or styles of display, Drupal treats your content as a giant soup, with each piece of content having properties like a title and an author, a 'published' flag, a publication date, and so on. Specific kinds of pages, specific sections of your site, and so on are created by pulling up any content with certain properties and listing it.

Some examples can help clarify this concept.

  1. Default front page
Subscribe with RSS Subscribe to RSS - Node