Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #2600564: Integrate profile into commerce #269

Merged
merged 2 commits into from
Nov 8, 2015

Conversation

subhojit777
Copy link
Contributor

This will cover:

  • Add the profile module dependency to order
  • Create the “billing” profile bundle and export it to order/config/install
  • Create the "address" field on the "billing" profile and export it to order/config/install
  • Create a billing_profile reference field on the order (base field definition), add a getter and a setter

@bojanz
Copy link
Contributor

bojanz commented Nov 4, 2015

Since we're providing the field ourselves, can we name it address instead of field_address?

@subhojit777
Copy link
Contributor Author

@bojanz corrected.

bundle: billing
label: Address
description: ''
required: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be required :)

@bojanz
Copy link
Contributor

bojanz commented Nov 5, 2015

Almost there!

@subhojit777
Copy link
Contributor Author

@bojanz corrected :) is it okay now?

@bojanz bojanz force-pushed the 8.x-2.x branch 2 times, most recently from e126ab0 to 8c79d1e Compare November 7, 2015 17:27
@bojanz
Copy link
Contributor

bojanz commented Nov 7, 2015

Almost there!

You added methods to the Order entity, but not to the OrderInterface. Did those changes get lost by mistake?

->setRequired(TRUE)
->setSetting('target_type', 'profile')
->setSetting('handler', 'default')
->setTranslatable(TRUE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need a ->setSetting('handler_settings', ['target_bundles' => ['profile']]); This will limit the reference field to the appropriate bundle.

@subhojit777
Copy link
Contributor Author

@bojanz changes made.

@@ -151,4 +151,40 @@ public function getEmail();
*/
public function setEmail($mail);

/**
* Get billing profile.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verbs in docblocks must be in the third person. "Gets the billing profile."

@subhojit777
Copy link
Contributor Author

@bojanz comment corrected :)

bojanz added a commit that referenced this pull request Nov 8, 2015
Issue #2600564: Integrate profile into commerce
@bojanz bojanz merged commit 8f3c611 into drupalcommerce:8.x-2.x Nov 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants