This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Surcharge percent value, possible?

Hello,

It's possible using surcharge value in percent, in E-Commerce module?

Like:

Product variations: Price
Attribute:

  • Variation: Normal portion
    • Price: 0.00 (the result price e.g.: $100)
  • Variation: Small portion
    • Price: *0.75% (the result price e.g.: $75)

Thx, Paul

form date

Hi,

I am using the 'date' form element. But i need some info on how i can manipulate this. More specifically i want to know how I can rearrange the different select boxes (e.g. first the day then the mont and then the year). And the select boxes appear each on newlines, is there also a way to put them al on the same line.

Thx !

P.S.: I find it quite hard to find substantial developpers info on drupal. Am I overlooking something ? I use api.drupal.org and some parts of the handbook.

Pop-up windows using Tiny MCE

I am developing a module, in which the administrator part should have the ability to open a pop-up window, when the user clicks a link. This pop-up window should contain a textfield. The problem is: I use the TinyMCE WYSIWIG editor. How do I make sure that this applies to the text field in the pop-up window too?

By the way, does anyone know how to assign the properties of a pop-up windows(width, height, visibility of adress field etc.)?

problem with a block module that implements a form

Hi all,

I'm tryng to define a block module that includes a form in it.
The functionality of the module is plainly to display a form that includes a single 'select' item and a submit
button. The select item will allow a user to choose from a list of categories. When the submit button is chosen, the page will simply redirect to the chosen category's main page. Hope that is clear.

I've still not tried writing the code for the redirecting of the page. Thats because my code
for the form is not working and I cant get it to work.
I've tried all sort of things but just getting a blank page all the time..
I thought it might be an incorrect syntax for the code that generates the form. I'm running drupal 4.7, can anyone tell me if theres something wrong with my syntax???
The following is the code for my module, can some one please help me out on this?
Or if there are any suggestions on how I can achieve the same thing using a different approach that maybe
doesn't include using a new module....
cheers

<?php
// $Id: top_menu.module,v 1.118 2006/04/07 15:32:17 unconed Exp $

/**
* @file
* Enables the top menu
*/

function top_menu_help($section='') {
$output = '';
switch ($section) {
case "admin/modules#description":
$output = t("Displays a Combo Box top menu for the Categories");
break;
}
return $output;
}

function top_menu_perm() {
return array('access top_menu', 'administer top_menu');

Post count rank module

Helo. I'm trying to port the post count rank module to drupal 4.7. I think is almost finish all the porting, but I can't make the settings page saves the postcount_rank_fieldid and postcount_rank_metrics vars.

I'm a little noob whit drupal so I can't figure where I'm wrong. Here is the code please help me.


<?php
define('PROFILE_HIDDEN',4);

function postcount_rank_help($section) {
switch($section) {
case 'admin/modules#description':
return t("This module allows you to give users a custom rank based on postcount and assign it to a custom 'list' type profile field");
break;
}
}

function postcount_rank_settings() {
$result = db_query("SELECT fid, title, options FROM {profile_fields} WHERE visibility = %d AND type = 'selection'",PROFILE_HIDDEN);
$fid = variable_get('postcount_rank_fieldid',-1);
$list_values = '';
while($field = db_fetch_array($result)) {
$options[$field['fid']] = $field['title'];
if ($field['fid'] == $fid)
$list_values = $field['options'];
}

$form['profile_field'] = array(
'#type' => 'fieldset',
'#title' => t('Postcount rank settings'),
);

if ($options){
$form['profile_field']['field'] = array(
'#type' => 'select',
'#title' => t('Profile Field'),
'#default_value' => $fid,
'#options' => $options,

Hidden form fileds getting lost, filestore2

I need filestore2 working in 4.7, so I took the cvs and figured I could make it work. It was 90% converted to 4.7. I have corrected several bugs but have hit the wall with this. The field fsid is not getting set in the db record. If I amend the db manually, everything is good. My debugging tells me that $node->fsid disappears between validate and insert. Other fields (eg url) are fine. The only thing different about fsid is that it is a hidden field on the form because the user has no need to know about it, it is the record number in fscache.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions