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

product module (add product)

On the add product page I have removed the default multiselect box with product categories and put in my own checkboxes.

When the form is submitted it inserts into the ec_products table and into the term_node table. My problem is that there is a bit of code that is still running after my inserts that is deleting everything for that node id in the term_node table which i just added. I assume it then trys to add what would have been selected by the multiselect box. I cant find what is doing this.

I have replaced the product_save function with this:


function product_save($node) {

//$node->is_recurring = ($node->price_interval) ? 1 : 0;
//$fields = product_fields();
/* Be very sure that we have a product entry to update! */
if (db_result(db_query('SELECT COUNT(vid) FROM {ec_product} WHERE vid = %d', $node->vid))) {

db_query("UPDATE {ec_product} SET
item='%s',
description='%s',
inciChemicalName='%s',
businessManager='%s',
itemGroup='%s',
supplierName='%s',
productFunction='%s',
specification='%s',
safetyDataSheet='%s',
productType='%s',
maximum_order=%d,
deleted='%s'
WHERE nid = %d",

Does this make sense?

Hi guys,

I have a very simple doubt. I wish to give a blank login page (for entering only username password + forgot password link + contact administrator). Once they are successfully logged in they will be redirected to the front page of the site. Unless they login properly they wont be able to see any content in the website.

Does it make sense?
The motivation is to keep the information private within the group of people registered in the webiste and only registered people will be able to access the site.
Assumption is only administrator can add users and no anonymous user can see content or access the site.

What I did?

<?

User login

Username: *

Password: *

Change a node type module form title

When on a page like...

www.domain.com/node/add/custom_node_module

How can I change the form's title from "custom_node_module" to something else.
I have tried...

drupal_set_title('Cool title');

....with no luck.

imce uploaded images missing on production site --- panicked

I'm in a panick today as several of our images on searcy.com are missing. I use IMCE as the tool to upload images to articles and everything has worked fine until today. The images are missing from the files folder (I checked). The only thing I can think of right now is that the file permissions for that files folder allows people to delete the images somehow. Can anyone guide me in the right direction here???? I'm mega-panicked.

Jay

Referencing images in my module directory - not using image.module

OK, this may very well be a stupid question, but how do I access images in my module's directory? (Technically I want to have them in a subdirectory to my module's directory, but I assume one follows from the other.) I have no desire to use the image.module functionality since they pertain just to my module, nor do I want to have to put them in the /files directory. Sure such a thing must be possible, right? What am I doing wrong? If it's not possible, what is the intended solution?

Form correctly submitted and saved but edit fields not populated

I'm developing a contract management module for Drupal which needed separate database tables, given that those present in the default aren't enough for defining contracts and contract lifecycles. Anyway, I've defined a new table and a new module. The new module is working as I want it to ... the preview is ok and the form_validate is ok. However, when I want to edit the form with http://path/to/drupal/?q=node/X/edit, I see the correct form (the same form as when I add a contract) but the fields are not prepopulated.

Pages

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