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

E-Commerce module question

I'm installing the ecommerse module and can someone tell me what the difference is between the two submodules:
paypal Process payments using paypal.
paypalpro Process payments using the PayPal Pro API.

Thanks.

"Required" field no longer throwing an error

I've got a module going that was running fine until this morning. Suddenly, required fields aren't throwing errors if they aren't filled out. The end result is that whole nodes can be generated without required content.

Where should I be looking to track down this problem? I've rolled my module back to several previous versions and they're all suddenly behaving this way. I have not installed any new modules, nor have I enabled/disabled any modules.

Any ideas?

Creating new ecommerce rentable product module, need help with the Forms API

Hi,

I'm currently writing a new product type called rentable product for the ecommerce package,
but I can't get to understand how the Forms API really works.

Here's parts of my code for now:

function theme_product_rentable_view(&$node, $teaser = FALSE, $page = FALSE) {
  
  $price_string = '<div class="price"><strong>'. t('Price') .'</strong>: ' . module_invoke('payment', 'format', product_adjust_price($node)) . '</div>';
  $node->teaser .= $price_string;
  $node->body .= $price_string;
  
  $link = l(t('Check availability '),'rentable/availability/'.$node->nid);
  $node->teaser .= $link;
  $node->body .= $link; 
  
  return $node;
} 

When a rentable product is created, this puts a link on the bottom of the product body.
Clicking on the link is controlled by the following function:

function rentable_menu($may_cache) {
  $items  = array();

  if (!$may_cache) {
      
    $items[] = array(
	  'path' 	 => 'rentable/availability/' . arg(2),
      'title'    => t('Product availability'),
      'callback' => 'rentable_check_availability',
      'access'   => true,
      'type'     => MENU_CALLBACK);
  }

  return $items;
}

The next function then invokes a callback to rentable_check_availability():

function rentable_check_availability(){
$output = '';

if(!is_numeric(arg(2))){
drupal_set_message('Product not selected','error');

How to check if settings are set for a module?

Hi,

Is there a way to check if the settings are set for a module (when using hook_settings) ?
What i try to do is to stop the module from working until all the required settings are set.

Thank you,

Alex

List all users assigned to access rule for module

I currently have a hook_perm() in my module to associate features with certain access roles.

How can I find all users that belong to a role(s) that is associated with my module?

Change Blog Post Structure?

I have removed the name associated with nodes, but want it to show up with the blog posts beside the title. Is this something I need to do in blog.module or in my theme? If in the module file, I'd appreciate pointers as to which function I need to make that change in.

Thanks :-)

Pages

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