Drupal 7 Add custom fields to shopping cart display - Ubercart 3

I have Drupal 7 and UC 3 running with custom fields. I want to be able to display those fields in the shopping cart but can't seems to be able to do it. That's my first module creation attempt! I try to use hook_form_alter(&$form, &$form_state, $form_id) {} in a custom module: function swcart_form_alter(&$form, &$form_state, $form_id) { switch($form_id) { case 'uc_cart_view_form': // Adding Grade column $form['items']['#columns']['grade'] = array('cell' =&g

Drupal 7 Drupal 7 views Contextual filters with Page & Blocks

I have an issue and i'm hoping to get some advise. I have a view created that show content based on the url: eg: domain.com/item/one Shows fields for my node with the title one domain.com/item/two Shows fields for my node with the title two etc etc. The path for the PAGE in views is set to /item What I'm having trouble with is I need to have a BLOCK (becuase I'm making it collapsable) show under that page with the specific URL show the body field for that node. eg: domain.com/item/thr

Drupal 7 Field Collections of Entity References in Views

I have been tinkering with this problem and trying to research for a few hours. I am still getting familiar with the entity API for Drupal 7, and have been trying to work with PHP but to no avail--I think I am missing something VERY obvious as a result of my tired brain over-thinking things. I have two Content Types, CT1 and CT2. CT1 has a field that can hold multiple Field Collection values. In this Field Collection (field_coll_ct2) one of the fields (field_ct2_ref) is an Entity Reference to a

Drupal 7 Drupal Security for specified role

I'm have some problem with my security. I want to add security question for administrator of my site and I found "security question" module. It work good, but for autenticated user, not for administrator. I want to check the security question after login for only administrator, not for user. I try read the .module file of this module, but it's hard to understand. So, how can I do with that module. Many thanks!!

Drupal 7 Adding a ubercart line item and updating order total

I don't know why this is so complicated but all I want to do is to add a line item in my order when user changes payment method in Ubercart. I managed to do this by adding the following line in my payment method. uc_order_line_item_add($order->order_id, 'Pay at door','Pay at door',5); This seems to add the line item but the order total does not get updated. When I refresh the page, I can see the line item being added there. Obviously, I don't want to refresh the screen and I want the new orde

Drupal 7 How to customize field value in a view for a block based on the current URL or path?

I'm using Drupal 7 and have a view that lists some content with links to the full articles. The content is filtered based on the path using taxonomy terms. I would like to update the links to the article based on same filter. For example I have a vocabulary with the terms Start, Grow, Move. The pages are tagged with the terms like: Child1 (start, grow) Child2 (start, move) Child3 (grow, move) Child4 (start, grow) For the url http://domain.com/start I get a page with Child1, Child2, Child

Drupal 7 EntityFieldQuery throws an error while using fieldCondition and addTag('node_access')

I use Drupal 7. This code: $query = new EntityFieldQuery(); $resFirstName = $query->entityCondition('entity_type', 'node') ->entityCondition('bundle', 'user') ->fieldCondition('field_user_first_name', 'value', $str, 'RLIKE') ->range(0, 15) ->addTag('node_access') ->execute(); when site's user isn't Admin throws the following error: "PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_data_fie

Drupal 7 Meta tags, Drupal 7

I want to add meta tags(title,keyword,description) on each page, views and blocks in drupal 7, i have tried with two modules meta tags quick and meta tags but they are not giving the permission to add meta tags on views and blocks, it only gives the permission to add meta tags on pages. Thanks in advance!!

Drupal 7 Drupal : How to export post from drupal 7 to Excel

I've inherited a Drupal site. I need to extract the post data only post title and url of it, out of the site to be able to import it into a different system, but I've never used Drupal and the site is live so I need to tread carefully in order to extract the data without affecting the site. I try use this Export But canot understan use it, Sow How can i do that. and if any code to export data without modules or views tell me So, How can export all post from my site that created after 1/1/2014

Drupal 7 Drupal Webform - How to load values from form, filled in a previous page

Working on Drupal, I have a page with a form made with "Webform" module, containing several fields (text fields and sliders) and a "Submit" button. When the user enters the information and presses the "Submit" button, another page is loaded with custom code into it. The new page is devided into 2 parts - the first one contains new information(based on the user input from the previous page); the second one contains (block) the same form, used in the previous page. Is there a way to load the valu

Drupal 7 Drupal 7 displaying content issue

How to hide a specific field of basic page content type? Not from admin pannel Structure>content type>basic page> manage display.. I want to hide it in my page template then showing separatly so that i can customize it?

Drupal 7 Owl Carousel Can't Loop in Drupal

i have drupal website that using Owl Carousel v1.3.2 for it slideshow slider. but the slider can't loop, when i comes to the end of image,it rewind to first image while showing the previous image. I have tried to put loop : true in it js code but doesnt work. anyone can help me with this?

Drupal 7 Hook when an item is moved in drupal 7

I've been looking for a hook in drupal 7 that allows me to send an http request when the user moves a taxonomy term in or out of another taxonomy. For example: I want to be able to 'detect' when I take World War in or out of This is War. I hope you can help me, and sorry for the ignorance.

Drupal 7 Multiple field groups with empty fields

I'm trying to make this working [Title Field] [Link Field] [Add More values] // Will add a [Title Field] [Link Field] But for example the first [Title Field] is having the value: Foo. With a link to http://foogle.fo Then I click on [Add More values], and a new row of a group field is showing. In this row I only write in the [Link Field]. When I save this, it will also save the right connection between Title and Link field. But how could I possibly print this in a loop, like this print_r(

Drupal 7 Drupal commerce line items + images

I have a drupal commerce + line items + taxonomies + fancy attributes. Product: -sku -... -shape (product line item) - taxonomies (text + image) And taxonomies images doesn’t display at all (text is ok). When I do it with product variations (shape (product field) - taxonomies (image)) everything is ok, but I need 3 options of variation with many many attributes and it’s not possible to create million of SKU products for the same item. How I’ll display the taxonomy image from a

Drupal 7 Exposed date filter in Drupal - making "month" optional

I have a view on my site which lists a video archive and an exposed filter with a Year/Month granularity. My problem is that the filter only accepts inputs where both the Year and Month values are selected, but I really need to make it possible for users to filter by year without necessarily selecting the month and also to be able to select the year first and then refine the search with filtering by month if they want to. I am a Drupal beginner, so I don't know much about Drupal's infrastructur

Drupal 7 Disallow: /sites/default/files/ not working for my Drupal Website

I am currently working on a Drupal 7 website. I added the following to my robots.txt file (under the # Directories section) Disallow: /sites/default/files/ But when I type "site:www.example.com filetype:pdf" in Google, it is still able to crawl into my /sites/default/files folder. Could anyone please help me figure out why are these still being crawled? The only relevant link I got here was: Can I add sites/default/files in robots.txt? which does not answer my question.

Drupal 7 Activate view automatically in a page

I wonder how I can create a view and activate it at any given time to automatically see on a particular page , just with some option in the administrator to ativate it. Maybe could use also nodequeue ? thanks

Drupal 7 How does the country path drupal module work?

I want my Drupal site to be divided: /uk/en /uk/fr /us/en /us/es Based on this advice, I was told to use this. The problem is, the module has no configuration page, nor does it have a README. I have scanned the code and it's not immediately apparent how to use it with the Domain Module. Anybody been able to use this and get it working as described above?

Drupal 7 Not able to scan file locate at root folder using sonar scanner

I am using sonarqube and sonarqube scannner for my Drupal project. As drupal project is multi-module project and has many custom modules developed under custom_module folder. I am scanning only custom folders listed under folder custom_module. Suppose there are 3 custom modules I want to scan... custom_module1, custom_module2, custom_module3 and sub-folders inc,modules and templates under them... My sonar-project.properties file looks like # Root project information sonar.projectKey=MyProjectK

Drupal 7 Drupal Services Plugin ignoring multi-value fields

I'm using drupal 7 with services plugin 3.17 I'm trying to create a node with a field that accepts multiple values via json api with the following data: { "type":"custom_type_article", "title":"My title", "language":"und", "body": { "und": [ { "value": "Article body" } ] }, "field_article_auhtors": { "und": [{"value": "author 1"}, {"value": "author 2"}, {"value": "author 3"}] } } The node is succesfully created but only the first value of field_

Drupal 7 Drupal 7: Modifying menu HTML output?

I am trying to modify the HTML output in a Drupal 7 theme that I am creating. Basically, instead of the < li >s containing just plain < a >s with text, I want to include some additional HTML inside the < a >. I know that it's possible to modify the HTML created by the menus in Drupal. I can see the following call in page.tpl.php: <?php print theme('links__system_main_menu', array( 'links' => $main_menu, 'attributes' => array( 'id' => 'main-menu',

Drupal 7 Drupal: How to define variables in one module functions and call it from another in Drupal 7

I writing a module for Drupal 7. It must get current $node variable in one function, e.g. hook_init() or similar, and this variable should be accessible from another function. I found discussion about node_load(arg(1)) and the author of solution said that performance is no concern because of caching. So, should I call node_load() in every function I need not being afraid of performance issues of are there any other ways to pass variables between module functions? To be more exact: I've placed

Drupal 7 DotNetNuke VS Drupal 7?

I am planning to build a website for courses online, teachers can create their courses and put their exams, students can enroll, view courses and apply for exams .. I am a bit confused, to build it with DDN or Drupal ? which is easier and more powerful ? I have no problem with .NET C# or PHP, although I see C# more easy to code with, what I need to know, which CMS is better for my case ? Which CMS is more robust & complete ? Thanks in advance.

Drupal 7 Need Help creating Drupal content type with form

I am fairly new to Drupal 7.9 and still trying to get a hang of it. Understandably it has a learning curve which I am trying to scale at the moment. My challenge here is to basically create a page that has some backend processing to it. The front page consists of form elements (mostly textboxes) arranged in a tabular format. A little bit of exploring and I reckoned I might need to create a kind of content type and then add content. But I got nowhere with this. Then I discovered the webform m

Drupal 7 drupal module for making free classified site?

how to make free classified site (like www.olx.in) using drupal7. where people post there ads.and visitor according to their interest search products and reply to ad publisher.does any drupal module available to accomplish this task.

Drupal 7 How to create grid system in Drupal

http://i.imgur.com/FSueo.png I want to create a grid system like the one in picture in drupal 7. Can anyone point me in the right direction? I first tried using Zen, but I could not figure out how to use SASS to make this grid system. Then, I checked out the panels module, but that also wont help; it only makes more columns, but I want to make more rows. I am very comfortable with CSS and php so if you have suggestions regarding modifying a certain CSS or php file, its more than enough. Ju

Drupal 7 Could't change Drupal 7 password in my local system?

I am running a Drupal 7 site in live server. While set up on my local system, I can't use my username & password (It's not working). I can't even change my admin password. Could anyone please give a solution? Note: When it is set up on a different server it works without any problems.

Drupal 7 How to insert/add region inside of a node after first paragraph

I'm trying to insert a block inside of a node. The problem is that I want it to appeat automatically after a paragraph X, preferably after the first paragraph. AdSense Injector module (http://drupal.org/project/adsense_injector) is quite useful, but it isn't very flexible, because you can only insert one code. Since I plan to insert different blocks in different situations, I would like to insert a region after a first paragraph. There is a tutorial (www.werockyourweb.com/drupal-insert-adsense

Drupal 7 Drupal 7: Using Rules to add user to OG then assign OG role

The idea is to accomplish the following when a new user is added: Create a new group (OG) Save it Add user to saved group (OG) Assign group role (OG) I am using Rules with Organic Groups. All is fine apart from assigning the group role. I know you can add general system roles but does anyone know how to assign a group (OG) role programmaticaly so it happens automagically? Any help much appreciated

Drupal 7 contextual filter views in drupal 7

I have a content type which has a Entity Reference field (field_industry). I am trying to create a menu on a page containing all the nodes which have an enity reference which is the same as the title or URL of the page the view will be displayed in. EG I have a page called glass, and 2 pages below which have the Entity reference of "Glass". I have created a view, which shows the title field. If i add a field to the view (field_industry) and set it to =glass. But it needs to be dynamic. How wou

Drupal 7 Drupal subtheme won't load css, regions, or page.tpl.php

I've just migrated my Drupal 7 live site to a fresh dev site and the default theme is only partially loading. Database, code, and files are fresh copies. Everything (content, links, etc) is good except for the theme. The theme is listed under Appearance and is correctly set to default. The theme's image loads on the Appearance page, the name and info are loaded from the subtheme's .info file, and the parent theme's css is loading (zurb_foundation). But the subtheme's custom css, regions, and

Drupal 7 RSS feed from Linked In

Is it possible to get RSS feed from Linked In. Google says that it is not : http://help.linkedin.com/app/answers/detail/a_id/1277/~/rss-feed-for-network-updates---no-longer-supported http://thenextweb.com/insider/2013/12/13/linkedin-will-kill-rss-support-december-19/ At the same time i see that Drupal 7 has such module that seems can get some posts from Linked In group : https://www.drupal.org/project/linkedin_group_posts Unfortunately i cannot figure out how to make it working and not

Drupal 7 how to insert image into popup in leaflet.css

I'm needing an image to show on all my Drupal 7 leaflet map popups, below the content that it is pulling in from the drupal nodes. I have added the image test.jpg to my libraries/leaflet/images folder, and the following code to leaflet.css, though its not working. How can I correct/ do this? .leaflet-popup-tip { background: black; width: 725px; background-image: url('../images/test.jpg'); box-shadow: 0 3px 14px rgba(0,0,0,0.4); }

Drupal 7 Every user is logged in as the admin user whatever the user role/username

I have a serious login problem with my new (and first ever) Drupal 7 site. I have two different users so far, which of one is the admin which was created while installing Drupal. If, I log in with the other user's username and password, still, the hovering admin menu will and the menu shows the username of the admin user. This happens, if I log in to both accounts from the same computer, but now I tested the non-admin account from a computer that have never been used to log in the particular si

Drupal 7 Showing the correct menu a page belongs

I have a Drupal website with 3 menus (a top menu, a main menu and a footer menu), and any content I publish belongs to one of those 3. My clients wants me to show the correct menu as an accordion on the sidebar, as a navigational support. I've looked all over drupal modules and can't find anything similar. Any thoughts?

Drupal 7 Add 3 custom menu links to the navigation menu

I am using Drupal 7 and I want to add 3 menu links to the navigation menu. The links are based on the current logged in users 'uid' but I can't get it to work. I have checked this site out and ever example uses a custom module to implement. I am trying to add this to my template.php page. This is currently what I have. function mytheme_menu() { $items = array(); $items['user/%uid/following'] = array( 'title' => 'My Following Content', 'description' => 'View the item', '

Drupal 7 How to add image field to custom content type?

I am new to Drupal and I was trying to create a custom content type via programming. I have used the following code: $content_type = node_type_set_defaults($slideshow_images); node_add_body_field($content_type, $t('Body')); node_type_save($content_type); to achieve the title and body of the content type. How can I add an image field to this?

  1    2   3   4   5   6  ... 下一页 最后一页 共 9 页