linking two options filed in gravity form to one another - wordpress

The issue i am facing is that i want to have two sepreate options field in gravity forms linked to one another. For example if i select option 1 in one filed then the same options get selected in the second field and update the price likewise.
enter image description here
on selecting the addon it updates the price based on number of adults.
i want to do the same with kids but if one select a addon mapped to adults the one mapped to kids should be automatically slected.

Related

Customize function Variation product in Woocommerce

I have a project in wordpress and I am using woocommerce.
I have 3 attributes for each product and some variation. Look like this:
Now is mandatory to choose at least 1 variation for each attribute in order to get a price.
I wonder if its possible to get out a price from a first choice so I dont need to be forced to select the second and third attribute.
In my case I would like to get a 25 euro price if I select "digital".
So in some way "hide" or obfuscate all the other choices when "digital" is selected.
I found this plugin: "Simple linked variations for WooCommerce". but this just hide 1 variation based on one attribute and it does not show the price either.
I guess there must be something in the code that show the price ONLY if all 3 attributes are selected. And can hide/obfuscade another attribute (or give value 0).... ?
I solved it using product add-ons" instead of variations.
https://woocommerce.com/products/product-add-ons/
This extension lets you create various add-ons for a product, and you can set up conditions like the one I describe.

Showing count of content based on the select list values Drupal 7

I have a requirement in which I need to show some content along with its count based on values in a select list. I wanted to display the allocated,released and resigned resources of a particular department in a selected date range. Using views, date range and department fields are created as exposed filters.
Created a content type for creating resources. The Resources content type is having action as a select list with values allocated,released,resigned. Department is another select list and date field is also added.
Please help me with an answer if views module is not enough. Provide some other solutions also. I'm using Drupal 7.
I figured out how to show node count in views. In my view I’ve some exposed filters and passed my select list cck field as contextual filter. If no result available I made the view to display summary as row count. In the template file, I’m planning to do some calculations for showing the resources count in and out of the project. Please correct me if there is anything wrong in this approach.

how to limit view to just show each type one time?

I have a content type what is news, the news has a field type that is List (text) to keep different types of news. for example I have Health, Sport, Economic and etc.
So now I am going to create a block and have each of these type in that as a hyperlink.
I can do it and I created a new view block but each news_type may showing more than one time according to published content.
How to set the view (for block) to just show news_types and show them just one time?
You can achieve this by following the steps given below:
Enable aggregation under Advanced Accordion of the view
Add Nid field & set aggregation type as Count Distinct
Exclude Nid field from display
Add news type field & set Aggregation type as Group results together, in Group Column select Value option from dropdown
Remove Publishing Date from sort criteria
Please check attached screenshot for reference
You can check this question for more information, and maybe help you.

Drupal Commerce Products for printing company

I'm new to Commerce I hope some kind fellow could give me some directions here.
I am creating an ecommerce website for a printing company. I will give an example of what I require
For instance they will offer A6 flyers but these come in different specifications each with differing prices
Here is an example:
http://4frontdesigns.co.uk/Untitled-1.jpg
So down the left column are quantities of flyers and along thw top different speciifications of those flyers with the prices shown in the middle.
Any help much appreciated
Can I just add each variation of these one by one as it is not possible to just say that a certain additional attribute to the product will add so much $$ to the base price.
Would I just add each variation one by one then some how pull these all into one display?
You could use the commerce price table module like Flo suggested or look at the Price attributes Module https://www.drupal.org/project/commerce_pricing_attributes
It uses option sets and then add to (or subtract from) the price based on the selected attribute.
The answer for me was to create each product variation as its own product. So every variation gets added as a separate product.
If you are wondering how to add different variations to product such as paper size or colour, you would do this with taxonomy. Simply create a taxonomy term called colour and then add all the colours into this term that you would require.
Then when you create your product type in commerce, you would add this as an option to choose from when adding products by doing the following. Go to manange fields for the product type you want to add it for and add a new field, type of data = term reference. You will then select the desired taxonomy term and also there will be an option to 'Enable this field to function as an attribute field on Add to Cart forms.' - You want to select this!
Then what you do is create a product display and pull all these in to a single page, which then gives you drop down options to change, and the price changes accordingly in real time.
You can create a product display by creating a new content type first, call it product display... Then add a field to this content type which is a 'product reference'.
Now add new content, pick to create a product display (what we have just created) and choose the products that you want to appear on that page.
Then automatically Drupal Commerce will take care of the rest. Hope this helps someone!

food-menu problem in drupal

I am trying to create a food menu for a boarding school. The idea is to let the students view what they have on menu for the whole day. That is, breakfast, lunch and dinner. This menu would be prepopulated weekly by a user.
My problem are as follows:
1) How do i use view module to just display items for one day?
2) Do i need like a date field, and calender module?
I would recommend using the Date module.
Add a date field to your 'boardingschoolmenu' content type.
Then in views you would add the fields you want visible (breakfast, lunch, dinner, etc)
Add a filter on content type 'boardingschoolmenu'
Add an argument for the date field. In the settings of the argument, under "Action to take if argument is not present", select: Provide default argument followed by: Current date (or can use php code if you want another date).

Resources