Additional fields in Drupal Commerce Kickstart2 - drupal-7

I Would like to have a register form like that one
http://www.blackfire.eu/account.php?act=register
so I thought I go with this tutorial
https://www.youtube.com/watch?v=XSJYDjhkZJ0
but he doesn't show how to add fields or how to change some. So is some able to help me?

You can add customer specific fields by adding fields to the Billing or Shipping Customer profiles.
Via the Admin menu:
Store -> Customer profiles -> Profile Types -> Billing/Shipping Information -> Manage Fields.
URL: yoursite.com/admin/commerce/customer-profiles/types/billing/fields
If you need to customise the checkout form further, there are a number of ways, including the following:
1) Use an existing Commerce module that provides extra fields or checkout "panes".
Commerce Agree Terms - Adds a Terms and Conditions checkbox
Commerce Extra Panes - Lets you load nodes within the checkout form
2) Create a custom module and add your own checkout pane. In this pane you can add any required fields. This tutorial provides further details on how this is implemented. http://atendesigngroup.com/blog/custom-commerce-checkout-panes
3) Use the standard Drupal hook_form_alter() to modify the existing checkout form. There is an example here https://drupal.stackexchange.com/questions/107310/how-to-alter-commerce-checkout-form-in-a-custom-module

Related

Adding an optional checkbox to a user registration form in wordpress

I would like to add an optional checkbox to a user registration form saying "I want to be included in marketing activities and product updates". I would like to then accordingly register the user preference... is there a way to do that?
Thank you in advance!
So far, I did not find any plugin or able to do so.
One way to do this is to use a plugin like Gravity Forms or Contact Form 7. These plugins allow you to create custom forms and include checkboxes or other form fields. Once the form is submitted, the plugin will store the user's preference in the database.
There are a few different paid plugins available that do user registration such as Gravity Forms, Fluent Forms, and WP Forms.
There is also the following free plugin for user registrations... User Registration – Custom Registration Form, Login Form And User Profile For WordPress
However, do note that you will need to upgrade to the premium plugin (or use one of the paid plugins mentioned) if you are looking to conditionally integrate user submissions into your marketing email campaign (e.g. sync with Mailchimp).

How do I link a Wagtail custom form to its output?

When a custom form is created in Wagtail, I can see that it stores in the DB. What I'm not clear on is how to make it so that the admin UI contains the results in some manner. (A new link which lets you download a CSV would be fine, but I don't see how to do that)
How do I allow admin users the ability to see the results of the custom forms? Is this library the only way?
Once you create your first form page (i.e. a page of any page type that subclasses AbstractForm), a 'Forms' item will automatically appear in the left menu of the Wagtail admin. This provides a listing of all the form pages that exist on the site, allowing you to access the results of each one and download them as a CSV.

Drupal Commerce Kickstart - allow anonymous users to see disabled products

I have a very simple implementation of Drupal Commerce Kickstart on http://casacinepoa.com.br/loja. I do not use the stock modules and I am not planning in use those, as the stock is handled by the customer's ERP (they also sell their products in their real store, using the existing stock management).
What I want to do, however, is to change the "add to cart" button to "product not available" when the product is disabled and still show the product on display and searches, so people will know they exist. I noticed this works the way as expected if I access the product page directly: http://www.casacinepoa.com.br/loja/pt-br/productdisplay/decamer%C3%A3o-com%C3%A9dia-do-sexo - there you will see the Product not Available. However, the product will not show under its category (http://www.casacinepoa.com.br/loja/pt-br/product_category/5) or in the search results if I search for its name.
Anonymous users already have the permission to see all products.
I have been searching all over and I could not find a way to do this.
All help is welcome.
You will have to create a new view that has disable and enabled products in its filters with products as its relationship.

Best way to implement custom search form

Firstly, I am a Drupal newbie and am still alien to many of Drupal's core concepts. My questions probably seem lame but .... I am trying my best.
I want to implement a custom search form like in the picture attached.
Hotel, flight, etc. are taxonomy terms.
Depending on the taxonomy term selected, the parameters below will also change, like in the picture below:
I came across Drupal Search API. I saw the Munich DrupalCon screencast on search api.
http://www.youtube.com/watch?v=rArRwp_1h8Q
From what I have seen so far, I am not sure whether this can be implemented using Search API.
I know this can be implemted using Forms API (I will create the form manually).
I want to know which way will be faster, Forms API or Search API.
I am using : Drupal 7.26
A simple way is to build a regular view with exposed filters.
To add and configure a views exposed filter:
Go to your views edit page.
Create the filter criteria that we want our users to be able to control, by clicking the "Add" button, in the filter criteria box.
Choose the fields that you want your users to be able to filter through them and click "Add".
In Configure filter criterion, check the option Expose this filter to visitors, to allow them to change it.
Configure the rest of the settings to your liking and click "Next".
After saving the view, this filter should be exposed to your users and they are able to search your view.
For a demo with screenshots; Check this tutorial.

Drupal 7: Add duplicates for form fields on the fly

I've got a form that's being generated using the Form API. There is a fieldset that contains several text fields. What I need to do is have a link or button that a user clicks if they want to add a duplicate of that fieldset to the form so they can add another set of similar information to the form. This is to essentially allow them to add multiple records without having to add each record individually. Is there a good way to go about adding this kind of functionality using the Forms API in Drupal 7?
There's a good example of this in the examples module package:
http://api.drupal.org/api/examples/ajax_example%21ajax_example_graceful_degradation.inc/function/ajax_example_add_more/7
It's a little complex, but that is very well documented, so you should be able to follow along.
You'll want to look at the entire ajax_example module (part of http://drupal.org/project/examples) for the relevant menu callbacks as well.

Resources