decode json data in drupal

Hi,

I have managed to post data to drupal using ajax post. So far Ive successfully accessed posted json data if its a simple array and I use something like the following on the server side:

foreach ($_POST as $key=>$value) {

	$citynames[$key]= $value;

  }

Im wanting to be able to now interpret json arrays of objects..
so for example if I post something like:

[{"place":"London","position":"2"}, {"place":"Melbourne","position":"3"}]

Drupal commerce for multiple suppliers

Hello everyone
I have 1 question. I need a drupal store. But...
* The product should have multiple prices, not just 1
* every price should be from a different supplier
* and every supplier should be able to edit the prices himself. But he should not be allowed to view other suppliers orders or change their prices.
can that be done easyly?
i mean are there any modules for this allready out there?

Thank you in advance

Features of drupal 7

I am new to drupal development.I would like to know following features directly comes with drupal 7 or they are free add on.

NTLM Authentication
Sandbox
Drag N Drop Content
WYSIWYG Editor
Database Replication
Package Deployment
Work flow Engine
Database Reports

please let me know.Thanks.

How can I add a CSS class around one specific value of one field in a view?

I have a field called pricing option that gives two options: Numerical or Market Price. If the answer is numerical, the user gets a field to put a number in.

If Market Price than that field shows up on the field and the user is not given another option as a result. I have this field in a view because I need to show instances of "Market Price" mixed in with items that are numbers. (This is for a menu.)

Here is my question. How do I hide the value "numerical"?

Check for cookie and redirect if it exists.

I am new to Drupal and also have very limited PHP knowledge.

On my first Drupal site, (7.x) I have built a gated page that site visitors can get to only after filling out a form.

I'd like people to be able to revisit that gated page without having to fill out the form again, so I was thinking I could set a cookie the first time they fill out the form, then if they landed on the form page a subsequent time Drupal could check for a cookie and if it was there, redirect them straight to the gated page.

On a regular site, I would set a cookie then check for the cookie, but as far as I can tell in Drupal I need to use modules to do this rather than add code to the page template head, so I have set up a very simple one.

First, I'm using the webform module which sets a cookie on submission of the form, then sends the user to the gated page.

I just can't figure out how to get Drupal to check for the cookie and redirect (if the cookie is there) when users land on that form page a second, third, etc. time.

I copied and adjusted something similar I found in the Drupal forums but it's not working. It could be really simple error or maybe there is a way better way to do this? Thanks for any help. My code is below.

Caitlin


<?php
//$Id: check_cookie.module $
function check_cookie() {
global $base_url;
global $cookie_domain;

Configuration Items Suddenly Missing Plus Other Issues

I received an out of memory message for some reason. After it cleared up, quite a few items that should be on the Admin>Config page are missing. I don't have Performance, Text Inputs, and several others. I have some, just not all. Additionally, there are other things not working. For example, if I go to configure a block I just get returned to the block page and cannot actually view or edit the block itself.

And it looks like on the config page most of the items there are module-related and not core.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x