Skip to content

Documentation for Commerce Promotions Intro#272

Open
stephanieg467 wants to merge 2 commits intodrupalcommerce:masterfrom
stephanieg467:dev-promotions-intro
Open

Documentation for Commerce Promotions Intro#272
stephanieg467 wants to merge 2 commits intodrupalcommerce:masterfrom
stephanieg467:dev-promotions-intro

Conversation

@stephanieg467
Copy link
Copy Markdown

Currently there is no documentation for the intro section to Commerce Promotions. This pull request aims to fix that.

------------

The competitive nature of the current retail market has driven store owners to search for methods and strategies
to stand out from the competition and to drive sales. Creating promotions has been the strategy that has proven most effective
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a standard line length in other pages? It's odd to see lines to be such different lengths. You might want to wrap as close to 80 characters as possible without going over (like Drupal coding standards for comments) or whatever other commerce docs pages do.

Comment thread user/pages/03.commerce2/02.developer-guide/09.promotions/docs.md Outdated
to stand out from the competition and to drive sales. Creating promotions has been the strategy that has proven most effective
for achieving those two goals. Commerce Promotions in Commerce 2.x provides the site administrator with the tools necessary to
turn their innovative promotion ideas into reality.
How exactly does Commerce Promotions achieve this you ask? Commerce Promotions works with [Commerce Orders] (../07.orders)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you mean "work with" instead of "works with"?

Comment thread user/pages/03.commerce2/02.developer-guide/09.promotions/docs.md Outdated
Comment thread user/pages/03.commerce2/02.developer-guide/09.promotions/docs.md Outdated
Comment thread user/pages/03.commerce2/02.developer-guide/09.promotions/docs.md Outdated
* usage_limit [integer] - [DEFAULT = 0]
* The maximum number of times the promotion can be used. 0 for unlimited.
*
* start_date [datetime] - [datetime_type = date] [DEFAULT = current date]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder how specific we want to get here. This details could be rendered obsolete really easily. For example, https://www.drupal.org/project/commerce/issues/2977618 is changing the dates to datetime instead of just date. If we leave this more open, such as just describing what start and end date are for rather than the specific implementation, there'll be less of a burden to keep this up to date. Those details may be just as easy to look at the code to find out instead.

I'm worried that these docs would need too much maintenance done in tandem with work in the drupal.org issues (or worse, with module releases, since people probably expect these docs to match the current stable release, not the latest dev version). It'd be no fun for someone to read one thing here and find out it's changed in the code.

Copy link
Copy Markdown
Collaborator

@lisastreeter lisastreeter left a comment

Choose a reason for hiding this comment

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

There's a lot of great information in here, and I think it could be effectively broken up into multiple pages so that it's easier to digest. I suggest:

  1. For the user/pages/03.commerce2/02.developer-guide/09.promotions/docs.md page, perhaps just your "Introduction" and then a table-of-contents for the rest of the pages in the "Promotions" section of the documentation, similar to the format for the "Addresses" section of documentation: https://docs.drupalcommerce.org/commerce2/developer-guide/customers/addresses

  2. Create a new page that immediately follows the TOC for the section, something like "Promotions information structure" or "Promotions architecture" or just "Overview", like we have for "Products" documentation: https://docs.drupalcommerce.org/commerce2/developer-guide/products/overview/product-information-structure

  3. Create another new page for "Code recipes" (as the last section of the Promotions documentation). Break out code examples in this page to make the text for the overview/architecture flow more easily. Also, with respect to comments by travis-bradbury, separating code examples with specific syntax from a more conceptual discussion of Promotions as a whole would improve maintainability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants