Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Possession and allowance on its and lets

- Its is the possessive one,
  it's the contraction
- Lets is an allowance for things,
  let's usually warms our introduction

Fixes #77
  • Loading branch information...
commit ac82ddd9772ca9c1423605daa3631ea19740d8c4 1 parent 74f5f36
@randomecho randomecho authored radar committed
View
18 source/adjustments.textile
@@ -47,7 +47,7 @@ This may seem somewhat simplistic at first but our experience has shown that mos
h4. Taxation
-Tax adjustments are any adjustments with a label of "Tax." This is just a naming convention but its a standard enough case that we have a built in scope for them in Spree. You can use the following console command to list an order's tax adjustments:
+Tax adjustments are any adjustments with a label of "Tax." This is just a naming convention but it's a standard enough case that we have a built in scope for them in Spree. You can use the following console command to list an order's tax adjustments:
<shell>
>> Spree::Order.last.adjustments.tax
@@ -58,7 +58,7 @@ INFO: Tax related charges are considered "frozen":adjustments.html#frozen-adjust
h4. Shipping
-Shipping adjustments are any adjustments with a label of "Shipping." This is just a naming convention but its a standard enough case that we have a built in scope for them in Spree. You can use the following console command to list an order's shipping adjustments:
+Shipping adjustments are any adjustments with a label of "Shipping." This is just a naming convention but it's a standard enough case that we have a built in scope for them in Spree. You can use the following console command to list an order's shipping adjustments:
<shell>
>> Spree::Order.last.adjustments.shipping
@@ -159,7 +159,7 @@ When a Spree class uses this helper method it automatically adds the following c
* The ability to associate a calculator with an instance of that class (through a +has_one :calculator+ association)
* Validation rules and the ability to accept configuration params through Rails +accepts_nested_attributes_for+
-Lets look at how this works with a specific example taken from the Spree source code itself. Specifically we'll be looking at +Spree::ShippingMethod+.
+Let's look at how this works with a specific example taken from the Spree source code itself. Specifically we'll be looking at +Spree::ShippingMethod+.
<ruby>
module Spree
@@ -171,16 +171,16 @@ module Spree
end
</ruby>
-Here we see that +Spree::ShippingMethod+ declares that its going to be involved in calculations by declaring +calculated_adjustments+ in the class definition. What does that give us exactly?
+Here we see that +Spree::ShippingMethod+ declares that it's going to be involved in calculations by declaring +calculated_adjustments+ in the class definition. What does that give us exactly?
-Lets start by firing up the Ruby console and creating a new instance of +Spree::ShippingMethod+.
+Let's start by firing up the Ruby console and creating a new instance of +Spree::ShippingMethod+.
<shell>
>> s = Spree::ShippingMethod.new
=> #<Spree::ShippingMethod id: nil, name: nil, zone_id: nil, created_at: nil, updated_at: nil, display_on: nil, shipping_category_id: nil, match_none: nil, match_all: nil, match_one: nil>
</shell>
-Now we can verify that this instance of +Spree::ShippingMethod+ in fact has a +Spree::Calculator+ association (although its currently nil because we haven't assigned anything to it.)
+Now we can verify that this instance of +Spree::ShippingMethod+ in fact has a +Spree::Calculator+ association (although it's currently nil because we haven't assigned anything to it.)
<shell>
>> s.calculator
@@ -230,7 +230,7 @@ Use of the +calculated_adjustments+ helper also provides additional methods to i
|+update_adjustment+|Updates the amount of the adjustment using the instance's +Calculator+|
|+calculator_type+|Utility method to help with admin screens that need to set the +Calculator+ for a particular instance of the class.|
-The +create_adjustment+ is the process by which all adjustments should be created. Lets take a look at how this mechanism works inside the +Spree::Order+ class.
+The +create_adjustment+ is the process by which all adjustments should be created. Let's take a look at how this mechanism works inside the +Spree::Order+ class.
<ruby>
def create_tax_charge!
@@ -256,7 +256,7 @@ def compute(object = nil)
end
</ruby>
-This calculator basically just returns the same amount every time its called (note the amount is configurable of course.) Other calculators (such as +Spree::Calculator::DefaultTax+) are a bit more interesting.
+This calculator basically just returns the same amount every time it's called (note the amount is configurable of course.) Other calculators (such as +Spree::Calculator::DefaultTax+) are a bit more interesting.
<ruby>
def compute(computable)
@@ -296,7 +296,7 @@ h4. Locked Adjustments
Spree also has the notion of so-called "locked" adjustments. The concept behind this is there are certain types of adjustments which should never be changed once calculated. There are also situations where it is appropriate for an adjustment that was once subject to recalculation to be recalculated.
-WARNING: Locked adjustments are currently considered experimental. We're currently exploring the ability to configure Spree to honor certain locking strategies. For instance, locking a promotion calculation in place so that its not lost if the order is updated after the promotion expires. There are also some interesting options to allow admins with the appropriate permissions to have the ability to lock/unlock adjustments when appropriate.
+WARNING: Locked adjustments are currently considered experimental. We're currently exploring the ability to configure Spree to honor certain locking strategies. For instance, locking a promotion calculation in place so that it's not lost if the order is updated after the promotion expires. There are also some interesting options to allow admins with the appropriate permissions to have the ability to lock/unlock adjustments when appropriate.
h3. Configuration
View
12 source/checkout.textile
@@ -12,7 +12,7 @@ endprologue.
h3. Overview
-The Spree checkout process has been designed for maximum flexibility. Its been redesigned several times now, each iteration has benefited from the feedback of real world deployment experience. It is relatively simple to customize the checkout process to suit your needs. Secure transmission of customer information is possible via SSL and credit card information is never stored in the database.
+The Spree checkout process has been designed for maximum flexibility. It's been redesigned several times now, each iteration has benefited from the feedback of real world deployment experience. It is relatively simple to customize the checkout process to suit your needs. Secure transmission of customer information is possible via SSL and credit card information is never stored in the database.
h3. Default Checkout Steps
@@ -53,7 +53,7 @@ This step allows the customer to add both their billing and shipping information
The address fields include a select box for choosing state/province. The list of states will be populated via JavaScript and will contain all of the states listed in the database for the currently selected country. If there are no states configured for a particular country, or if the user has JavaScript disabled, the select box will be replaced by a text field instead.
-INFO: The default "seed" data for Spree only includes the U.S. states. Its easy enough to add states or provinces for other countries but beyond the scope of the project to maintain such a list. Feel free to add your own seed data for the states you require (and to share your seed scripts with others via "Gist":https://gist.github.com/.)
+INFO: The default "seed" data for Spree only includes the U.S. states. It's easy enough to add states or provinces for other countries but beyond the scope of the project to maintain such a list. Feel free to add your own seed data for the states you require (and to share your seed scripts with others via "Gist":https://gist.github.com/.)
NOTE: The state field can be disabled entirely by using the +address_requires_state+ preference. You can also allow for an "alternate phone" field by using the +alternative_billing_phone+ and +alternative_shipping+ fields.
@@ -69,13 +69,13 @@ h4. Payment
This step is where the customer provides payment information. This step is intentionally placed last in order to minimize security issues with credit card information. Credit card information is never stored in the database so it would be impossible to have a subsequent step and still be able to submit the information to the "payment gateway":payment_gateways.html. Spree submits the information to the gateway before saving the model so that the sensitive information can be discarded before saving the checkout information.
-WARNING: Spree discards the credit card number after this step is processed. If you do not have a gateway with payment profiles enabled then your card information will be lost before its time to authorize the card.
+WARNING: Spree discards the credit card number after this step is processed. If you do not have a gateway with payment profiles enabled then your card information will be lost before it's time to authorize the card.
INFO: Spree stores only the last four digits of the credit card number along with the expiration information. The full credit card number and verification code are never stored in the Spree database.
NOTE: Several gateways such as ActiveMerchant and Beanstream provide a secure method for storing a "payment profile" in your database. This approach typically involves the use of a "token" which can be used for subsequent purchases but only with your merchant account. If you are using a secure payment profile it would then be possible to show a final "confirmation" step after payment information is entered.
-NOTE: If you do not want to use a gateway with payment profiles then you will need to customize the checkout process so that your final step submits the credit card information. You can then perform an authorization before the order is saved. This is perfectly secure because the credit card information is not ever saved. Its transmitted to the gateway and then discarded like normal.
+NOTE: If you do not want to use a gateway with payment profiles then you will need to customize the checkout process so that your final step submits the credit card information. You can then perform an authorization before the order is saved. This is perfectly secure because the credit card information is not ever saved. It's transmitted to the gateway and then discarded like normal.
h4. Confirmation
@@ -133,7 +133,7 @@ h4. The Order Model and State Machine
The default checkout flow for the +Spree::Order+ model is defined in +app/models/spree/order/checkout.rb+ of spree_core.
-An +Spree::Order+ object has an initial state of 'cart'. From there any number of events transition the +Spree::Order+ to different states. Spree does not have a separate model or database table for the shopping cart. What the user considers a "shopping cart" is actually an in-progress +Spree::Order+. An order is considered in-progress, or incomplete when its +completed_at+ attribute is null. Incomplete orders can be easily filtered during reporting and its also simple enough to write a quick script to periodically purge incomplete orders from the system. The end result is a simplified data model along with the ability for store owners to search and report on incomplete/abandoned orders.
+An +Spree::Order+ object has an initial state of 'cart'. From there any number of events transition the +Spree::Order+ to different states. Spree does not have a separate model or database table for the shopping cart. What the user considers a "shopping cart" is actually an in-progress +Spree::Order+. An order is considered in-progress, or incomplete when its +completed_at+ attribute is null. Incomplete orders can be easily filtered during reporting and it's also simple enough to write a quick script to periodically purge incomplete orders from the system. The end result is a simplified data model along with the ability for store owners to search and report on incomplete/abandoned orders.
INFO: For more information on the state machine gem please see the "README":https://github.com/pluginaweek/state_machine
@@ -164,7 +164,7 @@ This callback would prevent transitioning to the +delivery+ step if +valid_zip_c
h5. Customizing the View for a Particular Step
-Each of the default checkout steps has its own partial defined in the spree_core's +app/views/spree/checkout+ directory. Changing the view for an existing step is as simple as overriding the relevant partial in your site extension. Its also possible the default partial in question defines a usable theme hook, in which case you could add your functionality by using "Deface":https://github.com/spree/deface.html
+Each of the default checkout steps has its own partial defined in the spree_core's +app/views/spree/checkout+ directory. Changing the view for an existing step is as simple as overriding the relevant partial in your site extension. It's also possible the default partial in question defines a usable theme hook, in which case you could add your functionality by using "Deface":https://github.com/spree/deface.html
INFO: See also the brief discussion in "checkout partials":#checkout-partials for additional information.
View
4 source/contributing_to_spree.textile
@@ -46,7 +46,7 @@ You should file an issue if you have found (or suspect) a bug in the "core" func
h4. Providing a Patch
-If you are filing and issue and supplying a patch at the same time, please file a "Pull Request":#creating-a-pull-request instead. The pull request will also create an issue at the same time but its superior to just creating an issue because the code and issue can be linked.
+If you are filing and issue and supplying a patch at the same time, please file a "Pull Request":#creating-a-pull-request instead. The pull request will also create an issue at the same time but it's superior to just creating an issue because the code and issue can be linked.
If the ticket already exists, however, and you want to supply a patch after the fact, you can simply reference the issue number in your commit message. For example, if your commit fixed issue #123 you could use the following commit message:
@@ -96,7 +96,7 @@ INFO: See the GitHub guide on "creating forks":https://help.github.com/articles/
h4. Topic Branches
-Git branches are “cheap.” Creating branches in Git is incredibly easy and its an ideal way to isolate a specific set of changes. You may be fixing several things at one time but by keeping your changes isolated it will help us to find and apply only the changes we’re interested in. You should create a clean branch based on the latest spree/master when doing this. It is important you follow these steps exactly, it will prevent you from accidentally including unrelated changes from your local repository into the branch.
+Git branches are “cheap.” Creating branches in Git is incredibly easy and it's an ideal way to isolate a specific set of changes. You may be fixing several things at one time but by keeping your changes isolated it will help us to find and apply only the changes we’re interested in. You should create a clean branch based on the latest spree/master when doing this. It is important you follow these steps exactly, it will prevent you from accidentally including unrelated changes from your local repository into the branch.
For example, if we were submitting a patch to fix an issue with the CSS in the flash error message you could create a branch as follows:
View
2  source/deployment_application_processes.textile
@@ -110,6 +110,6 @@ end
The -c (or --concurrency) switch accepts the process type and an integer for the number of processes to start up. You specify mulitple types by comma separating as follows: processname=2,processname=4
-WARNING: Its important to not export more than one :web process when using the default unicorn configuration, as this refers to the master process and not the workers, the worker count can be configured via the Deployment's Service UI.
+WARNING: It's important to not export more than one :web process when using the default unicorn configuration, as this refers to the master process and not the workers, the worker count can be configured via the Deployment's Service UI.
.
View
6 source/deployment_tips.textile
@@ -26,13 +26,13 @@ INFO: There is a good reason why this is disabled by default in Rails which is t
h5. Configure the Web Server to Use the +public+ Directory
-The recommended approach for handling static assets is to allow your web server to handle serving these files. If you want to follow this approach just make sure that its configured properly in the +config/environments/production.rb+ of your Rails app.
+The recommended approach for handling static assets is to allow your web server to handle serving these files. If you want to follow this approach just make sure that it's configured properly in the +config/environments/production.rb+ of your Rails app.
<ruby>
config.serve_static_assets = false
</ruby>
-INFO: This is the default setting of Rails so its also fine if this setting is missing or commented out.
+INFO: This is the default setting of Rails so it's also fine if this setting is missing or commented out.
The following is an example of how to configure Apache so that its document root is pointing to the +public+ folder.
@@ -105,7 +105,7 @@ To properly enable email delivery, you need to provide valid SMTP information. T
Note that mail settings are configured on a per-environment basis. This will allow you to configure the settings differently for staging or production mode. For example, you might want to intercept all outgoing email in the staging environment and re-route it to test@yourstore.com. This would prevent someone from accidentally sending an email to a real world customer when testing operations such as canceling an order or marking it shipped.
-NOTE: Its generally considered a bad idea to send email on the same "thread" as a web request. Many web applications (including e-commerce ones) manage to get by doing this but high volume stores should consider using standard Rails techniques such as "Delayed Job":https://github.com/tobi/delayed_job for handling email delivery as a separate process.
+NOTE: It's generally considered a bad idea to send email on the same "thread" as a web request. Many web applications (including e-commerce ones) manage to get by doing this but high volume stores should consider using standard Rails techniques such as "Delayed Job":https://github.com/tobi/delayed_job for handling email delivery as a separate process.
INFO: The Spree core team is actively working on a solution for improved email processing - perhaps involving an optional extension for Delayed Job support.
View
4 source/getting_started.textile
@@ -121,7 +121,7 @@ Let's start by creating a standard Rails application using the following command
rails new mystore
</shell>
-This creates a new Rails application using all of the default options (including a Sqlite3 database.) If you wish to create your application with a different database you can use the +-d+ option (again this is not specific to Spree - its standard Rails at this point.)
+This creates a new Rails application using all of the default options (including a Sqlite3 database.) If you wish to create your application with a different database you can use the +-d+ option (again this is not specific to Spree - it's standard Rails at this point.)
For example, to create your application using Mysql you use the following command instead:
@@ -152,7 +152,7 @@ After you create the store application, switch to its folder to continue work di
cd mystore
</shell>
-Now lets add Spree to our Rails application:
+Now let's add Spree to our Rails application:
<shell>
spree install
View
4 source/i18n.textile
@@ -134,7 +134,7 @@ WARNING: These instructions pertain to the use of the +spree_18n+ gem. They ass
h4. Refreshing the Default Locale
-The default Spree locale is actually maintained as part of the Spree project (and not part of +spree_i18n+ project.) A copy of the default locale information is, however, available in the +spree_i18n+ source. Before you run any of the other rake tasks, its a good idea to "refresh" the localization information for +en.yml+.
+The default Spree locale is actually maintained as part of the Spree project (and not part of +spree_i18n+ project.) A copy of the default locale information is, however, available in the +spree_i18n+ source. Before you run any of the other rake tasks, it's a good idea to "refresh" the localization information for +en.yml+.
<shell>
$ bundle exec rake spree_i18n:update_default
@@ -201,7 +201,7 @@ h4. Default Values
You will notice in some of the locales (especially newly created ones), that there are default values in English that are commented out. These commented values are provided as a guide to help people performing the translations since the translation key does not always give you the best idea of the complete English phrase in question.
-Lets fire up the Rails console and test our new locale.
+Let's fire up the Rails console and test our new locale.
<shell>
>> I18n.locale = "es-PE"
View
2  source/migration.textile
@@ -10,7 +10,7 @@ know:
endprologue.
-WARNING: This documentation on this topic is out of date and we're working to update it. In the meantime if you see things in here that are confusing its possible that they no longer apply, etc.
+WARNING: This documentation on this topic is out of date and we're working to update it. In the meantime if you see things in here that are confusing it's possible that they no longer apply, etc.
h3. Overview
View
10 source/payment_gateways.textile
@@ -145,7 +145,7 @@ INFO: It is important that you use the exact spelling of the Active Merchant gat
If you examine the source code for the Active Merchant gateway that you are trying to configure, you will likely notice some specific options documented in the Active Merchant source code. It is these options that you need to expose to the Spree system for configuration in the admin screen.
-Lets take the Authorize.net implementation as an example. The Active Merchant implementation reveals that there are two important configuration options: +login+ and +password+.
+Let's take the Authorize.net implementation as an example. The Active Merchant implementation reveals that there are two important configuration options: +login+ and +password+.
NOTE: You can ignore the +test+ option. This is a standard preference for all gateways that is already provided for you by the base +Gateway+ class.
@@ -175,13 +175,13 @@ This approach to implementing and configuring gateways is extremely flexible. I
h5. Support of Non ActiveMerchant Gateways
-This architecture allows Spree to support gateways that are not officially supported by Active Merchant. Many times a new gateway is donated by someone in the community but its languishing in the queue waiting for someone to test and accept the patch. You have the option of taking that code (or writing your own from scratch) and implementing it within Spree. Instead of delegating to an Active Merchant class, you can simply implement that functionality yourself. You could also include the new gateway code from an Active Merchant fork inside your implementation and delegate the standard authorize, capture, etc operations to it.
+This architecture allows Spree to support gateways that are not officially supported by Active Merchant. Many times a new gateway is donated by someone in the community but it's languishing in the queue waiting for someone to test and accept the patch. You have the option of taking that code (or writing your own from scratch) and implementing it within Spree. Instead of delegating to an Active Merchant class, you can simply implement that functionality yourself. You could also include the new gateway code from an Active Merchant fork inside your implementation and delegate the standard authorize, capture, etc operations to it.
h5. Ability to "Patch" ActiveMerchant Gateways
-We've noticed that sometimes it takes a while for a crucial Active Merchant patch to be applied. That's certainly understandable, the "Shopify":http://shopify.com team has a business to run and its probably not a high priority for them to make sure that the latest obscure gateway patch is applied in a timely fashion. Fortunately, the Spree approach to wrapping these gateways provides you with a convenient option.
+We've noticed that sometimes it takes a while for a crucial Active Merchant patch to be applied. That's certainly understandable, the "Shopify":http://shopify.com team has a business to run and it's probably not a high priority for them to make sure that the latest obscure gateway patch is applied in a timely fashion. Fortunately, the Spree approach to wrapping these gateways provides you with a convenient option.
-Lets say there is a bug with the +authorize+ method. You could simply provide an implementation of the gateway that has the patched version of the +authorize+ method and then delegates to the Active Merchant class for everything else (since that works just fine.)
+Let's say there is a bug with the +authorize+ method. You could simply provide an implementation of the gateway that has the patched version of the +authorize+ method and then delegates to the Active Merchant class for everything else (since that works just fine.)
h5. Gateways supporting payment profiles
@@ -212,7 +212,7 @@ Note that capture is called differently for gateways supporting payment profiles
h5. Additional Functionality Beyond Active Merchant
-Another benefit of the architecture is that it makes it possible for Spree to provide additional common functionality that was not envisioned by Active Merchant. Specifically, it is possible to provide an abstraction for storing credit card profiles to be used with recurring payments. There's a good reason for Active Merchant to not care about this functionality. Its designed for people who just want to drop a single gateway provider into their application. Most programmers don't need three different gateways at once. Spree is a specialized use case. Its providing multiple gateways for you to choose from and so its desirable to have a standard method for operations such as this.
+Another benefit of the architecture is that it makes it possible for Spree to provide additional common functionality that was not envisioned by Active Merchant. Specifically, it is possible to provide an abstraction for storing credit card profiles to be used with recurring payments. There's a good reason for Active Merchant to not care about this functionality. It's designed for people who just want to drop a single gateway provider into their application. Most programmers don't need three different gateways at once. Spree is a specialized use case. It's providing multiple gateways for you to choose from and so it's desirable to have a standard method for operations such as this.
INFO: Recurring payments are not yet supported in Spree although there are plans to provide this in the near future.
View
8 source/payments.textile
@@ -127,11 +127,11 @@ For example, if the source of the payment is a +Creditcard+ then then following
This bit of code can be interpreted as follows
- * You cannot credit a payment unless its already been processed by the gateway successfully
+ * You cannot credit a payment unless it's already been processed by the gateway successfully
* You cannot credit a payment unless there is an over-payment on the order (which will happen if the order is canceled or if you make some type of adjustment to the order that reduces its total.)
* You cannot credit a payment if you've already issued one or more credits against that payment that completely offset the original payment.
-WARNING: Certain actions on credit card payments may result in an error due to a timing issue with the settlement. Once the funds have been deposited in the merchant account its generally not possible to void such a payment. Conversely, it is also generally not possible to issue a credit against a payment before it has settled. Settlement typically occurs 12-24 hours after the initial transaction.
+WARNING: Certain actions on credit card payments may result in an error due to a timing issue with the settlement. Once the funds have been deposited in the merchant account it's generally not possible to void such a payment. Conversely, it is also generally not possible to issue a credit against a payment before it has settled. Settlement typically occurs 12-24 hours after the initial transaction.
h4. Creating a New Payment
@@ -194,7 +194,7 @@ h4. Custom Payment Source
If you are creating a new +PaymentMethod+ you may well need to also have a corresponding Rails model to represent that method's "source":payments.html#source. If you look at an existing +PaymentMethod+ in Spree you can see an example of this in how Spree handles credit card payments. In this case +Gateway+ is the +PaymentMethod+ and the payments it creates have a source instance of the +Creditcard+ model.
-Lets consider another example where a +PaymentMethod+ might require its own payment source class as well. The "spree_paypal_express":https://github.com/spree/spree_paypal_express extension has a +PaymentMethod+ of +BillingIntegration::PaypalExpress+ and this class creates a +Payment+ with a source of +PaypalAccount+.
+Let's consider another example where a +PaymentMethod+ might require its own payment source class as well. The "spree_paypal_express":https://github.com/spree/spree_paypal_express extension has a +PaymentMethod+ of +BillingIntegration::PaypalExpress+ and this class creates a +Payment+ with a source of +PaypalAccount+.
h4. Custom Actions
@@ -202,7 +202,7 @@ The +Payment#actions+ method is responsible for listing the actions associated w
Along with a method for each action you must define a "can_...?" method to indicate if that particular action is possible based on the state of the payment or other rules. Both your custom action methods and their "can_" predicates must be defined with a payment parameter.
-Lets return to the "spree_paypal_express":https://github.com/spree/spree_paypal_express example once again to see how all of this is done.
+Let's return to the "spree_paypal_express":https://github.com/spree/spree_paypal_express example once again to see how all of this is done.
<ruby>
class PaypalAccount < ActiveRecord::Base
View
2  source/searching.textile
@@ -65,7 +65,7 @@ a new instance of your search class.
h5. +get_products_conditions_for(query)+
-This is the main call. Its purpose is to format the query appropriately and retrieve information from
+This is the main call. It's purpose is to format the query appropriately and retrieve information from
the search platform, then return it in the form of a named scope.
Typically, you will retrieve a list of product ids +i1, i2, ...+
from the platform and produce the result +{:conditions => "products.id IN (i1, i2, ...)"}+ (though
View
2  source/security.textile
@@ -92,7 +92,7 @@ The above rule set has the following practical effects for Spree users
h4. Enforcing the Rules
-CanCan is only effective in enforcing authorization rules if its asked. In other words, if the source code does not check permissions there is no way to deny access based on those permissions. This is generally handled by adding the appropriate code to your Rails controllers.
+CanCan is only effective in enforcing authorization rules if it's asked. In other words, if the source code does not check permissions there is no way to deny access based on those permissions. This is generally handled by adding the appropriate code to your Rails controllers.
h4. Custom Authorization Rules
View
18 source/taxation.textile
@@ -28,7 +28,7 @@ You must also create a tax zone before your products can be taxed. A tax zone is
h5. Basic Examples
-Lets say you need to charge 5% tax for all items that ship to New York and 6% on only clothing items that ship to Pennsylvania. This will mean you need to construct two different zones. One zone containing just the state of New York and another zone consistng of the single state of Pennsylvania.
+Let's say you need to charge 5% tax for all items that ship to New York and 6% on only clothing items that ship to Pennsylvania. This will mean you need to construct two different zones. One zone containing just the state of New York and another zone consistng of the single state of Pennsylvania.
Here's another hypothetical scenario. You would like to charge 10% tax on all electronic items and 5% tax on everything else. This tax should apply to all countries in the European Union (EU.) In this case you would construct just a single zone consisting of all the countries in the EU. The fact that you want to charge two different rates depending on the type of good does not mean you need two zones.
@@ -80,7 +80,7 @@ Tax rates are set up through the admin interface (Configurations | Tax Rates). A
* The zone in which the order address must fall within
* The tax category that a product must belong to in order to be considered taxable.
-Spree will calculate tax based on the best matching zone for the order. Its also possible to have more than one applicable tax rate for a single zone. In order for a tax rate to apply to a particular product, that product must have a tax category that matches the tax category of the tax rate.
+Spree will calculate tax based on the best matching zone for the order. It's also possible to have more than one applicable tax rate for a single zone. In order for a tax rate to apply to a particular product, that product must have a tax category that matches the tax category of the tax rate.
h3. Tax Types
@@ -92,9 +92,9 @@ In some cases you may need to charge one type of tax for orders falling within o
h4. Sales Tax
-Sales tax is the default tax type for any tax rate in Spree. Its the simplest type of tax to calculate and it is the method by which your tax will be determined assuming you leave the "Included in Price" checkbox unchecked.
+Sales tax is the default tax type for any tax rate in Spree. It's the simplest type of tax to calculate and it is the method by which your tax will be determined assuming you leave the "Included in Price" checkbox unchecked.
-Lets take an example of a 5% tax on clothing items for a zone that covers all of North America. If the customer purchases a single clothing item for $17.99 and they live in the United States (which is within the North America zone we defined) they are eligible to pay sales tax.
+Let's take an example of a 5% tax on clothing items for a zone that covers all of North America. If the customer purchases a single clothing item for $17.99 and they live in the United States (which is within the North America zone we defined) they are eligible to pay sales tax.
The sales tax calculation is $17.99 x 0.05 for a total tax of $0.90. Note that in the case of sales tax the tax is added to the item total an adjustment.
@@ -102,11 +102,11 @@ The sales tax calculation is $17.99 x 0.05 for a total tax of $0.90. Note that i
INFO: See the "Adjustments Guide":adjustments.html if you need more information on adjustments.
-Now lets change the quantity on that clothing item from 1 to 2. The tax is now $35.98 x 0.05 for a total of $1.80.
+Now let's change the quantity on that clothing item from 1 to 2. The tax is now $35.98 x 0.05 for a total of $1.80.
!images/taxes/sales_tax_applied2.png(Sales Tax Applied)!
-Now lets add a coffee mug that costs $13.99 to the order. Since the coffe mug is not clothing its not taxable. The tax total therefore should not change ($35.98 x 0.05)
+Now let's add a coffee mug that costs $13.99 to the order. Since the coffe mug is not clothing it's not taxable. The tax total therefore should not change ($35.98 x 0.05)
!images/taxes/sales_tax_applied3.png(Sales Tax Applied)!
@@ -130,7 +130,7 @@ WARNING: Prior versions of Spree handled VAT differently. If you are upgrading t
When tax is included in the price there is no order adjustment needed (unlike the sales tax case.) Stores are, however, typically interested in showing the amount of tax the user paid. These totals are for informational purposes only and do not affect the order total.
-Lets start by looking at an example where there is a 5% included on all products and its included in the price. We'll further assume that this tax should only apply to orders within the United Kingdom (UK).
+Let's start by looking at an example where there is a 5% included on all products and it's included in the price. We'll further assume that this tax should only apply to orders within the United Kingdom (UK).
In the case where the order address is within the UK and we purchase a single clothing item for £17.99 we see an order total of £17.99. We also see an additional line included for the customer's reference that shows they paid a total of £0.90 in tax.
@@ -140,7 +140,7 @@ INFO: Notice how the tax is included below the order total. This is because the
NOTE: These informational totals are considered adjustments to the @LineItem@ class. This allows us to preserve them for reporting purposes and to avoid including them in the @Order#adjustment_total@.
-Now lets increase the quantity on the item from 1 to 2. The order total changes to £35.98 with a tax total of £1.80.
+Now let's increase the quantity on the item from 1 to 2. The order total changes to £35.98 with a tax total of £1.80.
!images/taxes/vat_tax_breakout2.png(VAT tax breakout)!
@@ -148,7 +148,7 @@ Next we'll add a different clothing item costing £19.99 to our order. The order
!images/taxes/vat_tax_breakout3.png(VAT tax breakout)!
-Now lets assume an additional tax rate of 10% on consumer electronics. When we add a product of this category to our order with a price of £16.99 we will now also see a second tax total of £1.70.
+Now let's assume an additional tax rate of 10% on consumer electronics. When we add a product of this category to our order with a price of £16.99 we will now also see a second tax total of £1.70.
!images/taxes/vat_tax_breakout4.png(VAT tax breakout)!
View
8 source/testing.textile
@@ -78,7 +78,7 @@ The generator used by Spree to create new extensions will do all of the work to
h4. Testing Integrated Extensions
-When you first start out coding a new extension, you may want to work with it right alongside the Spree project that you plan to use it in. Even if you're eventually planning to break it out into a gem and share the source code its sometimes easier to develop with it side by side with your application.
+When you first start out coding a new extension, you may want to work with it right alongside the Spree project that you plan to use it in. Even if you're eventually planning to break it out into a gem and share the source code it's sometimes easier to develop with it side by side with your application.
If you've read the "Creating Extensions Guide":/creating_extensions.html you know by now how easy it is to create a Spree extension within the context of a Rails/Spree application:
@@ -86,14 +86,14 @@ If you've read the "Creating Extensions Guide":/creating_extensions.html you kno
$ spree extension foofah
</shell>
-This generator automatically creates a +spec+ directory along with a +spec_helper.rb+ file. If you're not a fan of RSpec you can feel free to switch to a test framework of your choosing. You'll also need to add the rspec-rails gem to your Gemfile if its not already present.
+This generator automatically creates a +spec+ directory along with a +spec_helper.rb+ file. If you're not a fan of RSpec you can feel free to switch to a test framework of your choosing. You'll also need to add the rspec-rails gem to your Gemfile if it's not already present.
<ruby>
#Gemfile
gem 'rspec-rails'
</ruby>
-Then its time to write some specs/tests for your extension. We're not going to cover how to write tests here - there's already plenty of resources that cover this topic in depth. Once your tests are written you simply use the standard rspec command to verify them.
+Then it's time to write some specs/tests for your extension. We're not going to cover how to write tests here - there's already plenty of resources that cover this topic in depth. Once your tests are written you simply use the standard rspec command to verify them.
<shell>
$ bundle exec rspec spec
@@ -103,7 +103,7 @@ h4. Testing Standalone Extensions
Most extensions that you'll be working with (including all of the ones in the extension registry) are so-called isolated extensions. They exist in their own GitHub repositories independent of any specific Rails application. Fortunately we have devised a way to test these extensions as well.
-Lets start by creating a new extension - although the procedure is basically the same for an extension that you've cloned from GitHub.
+Let's start by creating a new extension - although the procedure is basically the same for an extension that you've cloned from GitHub.
<shell>
$ spree extension foofah
View
2  source/zones.textile
@@ -39,7 +39,7 @@ The following is an example of this method as visible in the Rails console:
h3. Building a Zone
-Lets examine the steps for building a new zone more closely.
+Let's examine the steps for building a new zone more closely.
# Click on the "Configuration" tab in the admin menu.
# Click the "Zones" link.
Please sign in to comment.
Something went wrong with that request. Please try again.